-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodel.py
314 lines (314 loc) · 10.5 KB
/
model.py
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
models = {
'Context': {
'id': [],
'title': [],
'label': [],
'type': ['', 'List[str]']
},
'ResourceLink': {
'id': [],
'title': [],
'description':[]
},
'ToolPlatform': {
},
'LaunchPresentation': {
},
'Custom': {},
'DeeplinkSettings': {
'return_url': ["deep_link_return_url"],
"accept_types": ['', 'List[str]'],
"accept_media_types": ['', 'List[str]'],
"accept_presentation_document_targets": ['', 'List[str]'],
"accept_multiple": ['', 'bool'],
"accept_lineitem": ['', 'bool'],
"auto_create": ['', 'bool'],
"title": [],
"text": [],
"data": []
},
'DeepLinkService': {
'contentitems': [],
'contentitem': [],
'scopes':['', 'List[str]']
},
'GradeService': {
'lineitem': [],
'lineitems': [],
'scope':['', 'List[str]']
},
'MembershipService': {
'context_memberships_url': [],
'service_version': []
},
'User': {
'user_id': [],
'person_sourcedid': [],
'given_name': [],
'family_name': [],
'name': [],
'email': []
},
'LTIMessage': {
"iss": [],
"sub": [],
"given_name": [],
"family_name": [],
"name": [],
"email": [],
"lti_launch_id": ["https://purl.imsglobal.org/spec/lti/claim/lti_launch_id"],
"deployment_id": ["https://purl.imsglobal.org/spec/lti/claim/deployment_id"],
"target_link_uri": ["https://purl.imsglobal.org/spec/lti/claim/target_link_uri"],
"message_type": ["https://purl.imsglobal.org/spec/lti/claim/message_type"],
"version": ["https://purl.imsglobal.org/spec/lti/claim/version"],
"role": ["https://purl.imsglobal.org/spec/lti/claim/roles", "List[str]"],
"context": ["https://purl.imsglobal.org/spec/lti/claim/context", 'Context'],
"resource_link": ["https://purl.imsglobal.org/spec/lti/claim/resource_link", 'ResourceLink'],
"tool_platform": ["https://purl.imsglobal.org/spec/lti/claim/tool_platform", 'ToolPlatform'],
"launch_presentation": ["https://purl.imsglobal.org/spec/lti/claim/launch_presentation", 'LaunchPresentation'],
"custom": ["https://purl.imsglobal.org/spec/lti/claim/custom", 'Custom'],
"deep_linking_settings": ["https://purl.imsglobal.org/spec/lti-dl/claim/deep_linking_settings", 'DeeplinkSettings'],
"grade_service": ['https://purl.imsglobal.org/spec/lti-ags/claim/endpoint', 'GradeService'],
"deeplinking_service": ['https://purl.imsglobal.org/spec/lti-dl/claim/deeplinkingservice', 'DeepLinkService'],
"membership_service": ["https://purl.imsglobal.org/spec/lti-nrps/claim/namesroleservice", 'MembershipService'],
"for_user": ["https://purl.imsglobal.org/spec/lti/claim/for_user", 'User']
},
'DeeplinkResponse': {
"version": ["https://purl.imsglobal.org/spec/lti/claim/version", "str", "1.3.0"],
"message_type": ["https://purl.imsglobal.org/spec/lti/claim/message_type", "str", "LtiDeepLinkingResponse"],
"data": ["https://purl.imsglobal.org/spec/lti-dl/claim/data"],
"deployment_id": ["https://purl.imsglobal.org/spec/lti/claim/deployment_id"],
"content_items": ["https://purl.imsglobal.org/spec/lti-dl/claim/content_items", "List"]
},
'SubmissionReview': {
'label': [],
'url': [],
'custom': ['', 'Custom']
},
'LineItem': {
'cls_const': {
'mime': 'application/vnd.ims.lis.v2.lineitem+json',
'mime_collection': 'application/vnd.ims.lis.v2.lineitemcontainer+json',
'read_scope': 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readonly',
'write_scope': 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem'
},
'id': [],
'label': [],
'scoreMaximum': ['', 'float'],
'tag': [],
'submissionReview': ['', 'SubmissionReview'],
'resourceId': [],
'resourceLinkId': [],
'startDateTime': [],
'endDateTime': [],
},
'GradingProgress': (
'NotReady',
'Failed',
'Pending',
'PendingManual',
'FullyGraded'
),
'ActivityProgress' : (
'Initialized',
'Started',
'InProgress',
'Submitted',
'Completed'
),
'Score': {
'cls_const': {
'mime': 'application/vnd.ims.lis.v1.score+json',
'write_scope': 'https://purl.imsglobal.org/spec/lti-ags/scope/score',
'path_suffix': 'scores'
},
'userId': [],
'scoreGiven': ['', 'float'],
'scoreMaximum': ['', 'float'],
'comment': [],
'timestamp': ['', 'datetime'],
'activityProgress': ['', 'ActivityProgress'],
'gradingProgress': ['', 'GradingProgress']
},
'Result': {
'cls_const': {
'mime': 'application/vnd.ims.lis.v2.resultcontainer+json',
'read_scope': 'https://purl.imsglobal.org/spec/lti-ags/scope/result.readonly',
'path_suffix': 'results'
},
'userId': [],
'resultScore': ['', 'float'],
'resultMaximum': ['', 'float'],
'comment': [],
'timestamp': [],
},
'DLIFrame': {
'width': ['', 'float'],
'height': ['', 'float']
},
'DLWindow': {
'targetName': []
},
'DLEmbed': {
'html': []
},
'TimeSpan': {
'startDateTime': [],
'endDateTime': []
},
'LTIResourceLink': {
'type': ['', 'str', 'ltiResourceLink'],
'title': [],
'text': [],
'url': [],
'custom': ['', 'Dict[str,str]'],
'line_item': ['lineItem', 'LineItem'],
'max_points': ['lineItem:LineItem->scoreMaximum', 'float'],
'resource_id': ['lineItem:LineItem->resourceId', 'str'],
'tag': ['lineItem:LineItem->tag', 'str'],
'available': ['', 'TimeSpan'],
'submission': ['', 'TimeSpan'],
'iframe': ['', 'DLIFrame'],
'window': ['', 'DLWindow']
},
'DLHTMLFragment': {
'type': ['', 'str', 'html'],
'title': [],
'text': [],
'html': []
},
'DLImage': {
'type': ['', 'str', 'image'],
'title': [],
'text': [],
'url': [],
'width': ['', 'float'],
'height': ['', 'float']
},
'DLLink': {
'type': ['', 'str', 'link'],
'title': [],
'text': [],
'url': [],
'embed': ['', 'DLEmbed'],
'window': ['', 'DLWindow'],
'embed': ['', 'DLEmbed'],
'iframe': ['', 'DLIFrame']
},
'MemberStatus': ('Active', 'Inactive', 'Deleted'),
'Member': {
'status': ['', 'MemberStatus'],
'context_id': [],
'context_label': [],
'context_title': [],
'name': [],
'picture': [],
'given_name': [],
'family_name': [],
'middle_name': [],
'email': [],
'user_id': [],
'roles': ['', 'List[str]']
},
'Members': {
'cls_const': {
'mime': 'application/vnd.ims.lti-nrps.v2.membershipcontainer+json',
'read_scope': 'https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly',
'collection_attribute': 'members'
},
'id': [],
'members': ['', 'List[Member]']
},
'DeepLinkingItem': {
'cls_const': {
'mime': 'application/vnd.1edtech.lti.contentitem+json',
'read_scope': 'https://purl.imsglobal.org/spec/lti-dl/scope/contentitem.read',
'write_scope': 'https://purl.imsglobal.org/spec/lti-dl/scope/contentitem.update',
},
'type': [],
'title': [],
'text': [],
'url': [],
'resource_link_id': ['resourceLinkId'],
'custom': ['', 'Dict[str,str]'],
'lineitem_id': ['lineItemId'],
'available': ['', 'TimeSpan'],
'submission': ['', 'TimeSpan'],
'iframe': ['', 'DLIFrame'],
'window': ['', 'DLWindow']
},
'DeepLinkingItems': {
'cls_const': {
'mime': 'application/vnd.1edtech.lti.contentitems+json',
'read_scope': 'https://purl.imsglobal.org/spec/lti-dl/scope/contentitem.read',
'write_scope': 'https://purl.imsglobal.org/spec/lti-dl/scope/contentitem.update',
'collection_attribute': 'items'
},
'id': [],
'items': ['', 'List[DeepLinkingItem]']
},
'SupportedMessage': {
'type': [],
'placements': ['', 'List[str]']
},
'PlatformConfig': {
'product_family_code': [],
'variables': ['', 'List[str]'],
'messages_supported': ['', 'List[SupportedMessage]'],
},
'PlatformOIDCConfig': {
'issuer': [],
'authorization_endpoint': [],
'token_endpoint': [],
'token_endpoint_auth_methods_supported': ['', 'List[str]'],
'token_endpoint_auth_signing_alg_values_supported': ['', 'List[str]'],
'jwks_uri': [],
'registration_endpoint': [],
'scopes_supported': ['', 'List[str]'],
'response_types_supported': ['', 'List[str]'],
'subject_types_supported': ['', 'List[str]'],
'id_token_signing_alg_values_supported': ['', 'List[str]'],
'claims_supported': ['', 'List[str]'],
'lti_config': ['https://purl.imsglobal.org/spec/lti-platform-configuration', 'PlatformConfig']
},
'MessageDef': {
"type": [],
"target_link_uri": [],
"label": [],
"custom_parameters": ['', 'Custom'],
"placements": ['', 'List[str]'],
"roles": ['', 'List[str]']
},
'Oauth11Consumer': {
"key": [],
"nonce": [],
"sign": []
},
'ToolConfig': {
"version": [],
"domain": [],
"description": [],
"oauth_consumer": ['', 'Oauth11Consumer'],
"target_link_uri": [],
"custom_parameters": ['', 'Custom'],
"scopes": ['', 'List[str]'],
"claims": ['', 'List[str]'],
"messages": ['', 'List[MessageDef]'],
},
'ToolOIDCConfig': {
"client_id": [],
"registration_client_uri": [],
"application_type": [],
"response_types": ['', 'List[str]'],
"grant_types": ['', 'List[str]'],
"initiate_login_uri": [],
"redirect_uris": ['', 'List[str]'],
"client_name": [],
"jwks_uri": [],
"logo_uri": [],
"token_endpoint_auth_method": [],
"contacts": ['', 'List[str]'],
"scope": [],
"lti_config": ["https://purl.imsglobal.org/spec/lti-tool-configuration", 'ToolConfig']
}
}