-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathgradedQuestion.gs
More file actions
112 lines (95 loc) · 2.66 KB
/
gradedQuestion.gs
File metadata and controls
112 lines (95 loc) · 2.66 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// File: graded_question.gas
// Description:
// This file contains the class for a graded question.
// GradedQuestion class:
// Contains information about a question that can be, or has been, graded.
function GradedQuestion(ques_index, full_question_text, full_subm_text, gopt,
help_tips_present, help_tips_val,
full_anskey_text, full_anskey_text_lc,
graded_val, formula, manually_graded_teacher_comment,
category_name, is_timestamp
)
{
this.full_question_text = full_question_text;
this.full_subm_text = full_subm_text;
this.gopt = gopt;
this.full_anskey_text = full_anskey_text;
this.full_anskey_text_lc = full_anskey_text_lc;
this.graded_val = graded_val;
this.formula = formula;
this.is_timestamp = is_timestamp;
this.help_tips_present = help_tips_present;
this.help_tips_val = help_tips_val;
this.manually_graded_teacher_comment = manually_graded_teacher_comment;
this.category_name = category_name;
// This ties the question back to the GradedSubmission it originates from, in which all
// information about questions are stored in linear arrays. This is the index into that array.
this.ques_index = ques_index;
}
GradedQuestion.prototype.getGradedVal = function()
{
return this.graded_val;
}
GradedQuestion.prototype.getFormula = function()
{
return this.formula;
}
GradedQuestion.prototype.hasFormula = function()
{
return (this.formula != "");
}
GradedQuestion.prototype.setGradedVal = function(graded_val)
{
this.graded_val = graded_val;
}
GradedQuestion.prototype.setFormula = function(formula)
{
return this.formula = formula;
}
GradedQuestion.prototype.getFullQuestionText = function()
{
return this.full_question_text;
}
GradedQuestion.prototype.getAnswerKeyText = function()
{
return this.full_anskey_text;
}
GradedQuestion.prototype.getAnswerKeyLCText = function()
{
return this.full_anskey_text_lc;
}
GradedQuestion.prototype.getFullSubmissionText = function()
{
return this.full_subm_text;
}
GradedQuestion.prototype.getGradingOption = function()
{
return this.gopt;
}
GradedQuestion.prototype.isTimestamp = function()
{
return this.is_timestamp;
}
GradedQuestion.prototype.getQuesIndex = function()
{
return this.ques_index;
}
GradedQuestion.prototype.getHelpTip = function()
{
if (this.help_tips_present)
{
return this.help_tips_val;
}
else
{
return "";
}
}
GradedQuestion.prototype.getGradedTeacherComment = function()
{
return this.manually_graded_teacher_comment;
}
GradedQuestion.prototype.getCategoryName = function()
{
return this.category_name;
}