LabExercise.cs
1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using log4net;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
namespace AIAHTML5.API.Models
{
public class LabExercise
{
public int userId { get; set; }
public string labExerciseIdentifier { get; set; }
public int lastQuestion { get; set; }
public int totalQuestions { get; set; }
public List<LabEcerciseDetails> labExercise;
internal int insertLabExerciseAttempt(LabExercise le, DataTable labExeciseQuizAttemptedData)
{
ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
logger.Debug("inside insertLabExerciseAttempt for UserId =" + le.userId + ",labExerciseIdentifier= " + le.labExerciseIdentifier + ",LastQuestion= " + le.lastQuestion + "TotalQuestions =" + le.totalQuestions);
int result = 0;
DBModel objModel = new DBModel();
result = objModel.SaveLabExerciseAttempt(le, labExeciseQuizAttemptedData);
return result;
}
internal LabExercise GetLabExercise(int userId, string labExIdentifier)
{
DBModel objModel = new DBModel();
LabExercise le = objModel.GetLabExercise(userId, labExIdentifier);
return le;
}
}
public class LabEcerciseDetails
{
public int MaxScore { get; set; }
public string UserAnswers { get; set; }
public int QuestionNo { get; set; }
public string CorrectAnswers { get; set; }
public string DragItems { get; set; }
public int Score { get; set; }
public string StateObject { get; set; }
}
}