forked from RunestoneInteractive/RunestoneServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrouped_assignments.py
More file actions
71 lines (66 loc) · 3.07 KB
/
grouped_assignments.py
File metadata and controls
71 lines (66 loc) · 3.07 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
db.define_table(
"assignments",
Field("course", db.courses),
Field("name", "string"),
Field(
"points", "integer", default=0
), # max possible points on the assignment, cached sum of assignment_question points
Field(
"threshold_pct", "float"
), # threshold required to qualify for maximum points on the assignment; null means use actual points
Field("released", "boolean"),
Field(
"allow_self_autograde", "boolean"
), # if True, when student clicks to autograde assignment, it calculates totals; otherwise it only scores individual questions but doesn't calculate score for the assignment
Field("description", "text"),
Field("duedate", "datetime"),
Field("visible", "boolean"),
Field("is_timed", "boolean", default=False),
Field("time_limit", "integer"),
Field("from_source", "boolean"),
Field("nofeedback", "boolean"),
format="%(name)s",
migrate=table_migrate_prefix + "assignments.table",
)
db.define_table(
"grades",
# This table records grades on whole assignments, not individual questions
Field("auth_user", db.auth_user),
Field("assignment", db.assignments),
Field("score", "double"),
Field("manual_total", "boolean"),
Field("projected", "double"),
# guid for the student x assignment cell in the external gradebook
#
# Guessing that the ``lis_outcome_url`` length is actually inteded for this field, use that as its maximum length.
Field("lis_result_sourcedid", "string", length=1024),
# web service endpoint where you send signed xml messages to insert into gradebook; guid above will be one parameter you send in that xml; the actual grade and comment will be others
#
# Per the ``LTI spec v1.1.1 <https://www.imsglobal.org/specs/ltiv1p1p1/implementation-guide>`_ in section 6, the maximum length of the ``lis_outcome_url`` field is 1023 characters.
Field("lis_outcome_url", "string", length=1024),
migrate=table_migrate_prefix + "grades.table",
)
db.define_table(
"practice_grades",
Field("auth_user", db.auth_user),
Field("course_name", "string"),
Field("score", "double"),
Field("lis_result_sourcedid", "string"),
# guid for the student x assignment cell in the external gradebook
Field("lis_outcome_url", "string"),
# web service endpoint where you send signed xml messages to insert into gradebook; guid above will be one parameter you send in that xml; the actual grade and comment will be others
migrate=table_migrate_prefix + "practice_grades.table",
)
db.define_table(
"question_grades",
# This table records grades on individual gradeable items
Field("sid", type="string", notnull=True),
Field("course_name", type="string", notnull=True),
Field("div_id", type="string", notnull=True),
# The ID of a record in the answer table (mchoice_answers, fitb_answers, etc.) that was graded.
Field("answer_id", type="integer"),
Field("deadline", "datetime"),
Field("score", type="double"),
Field("comment", type="text"),
migrate=table_migrate_prefix + "question_grades.table",
)