9
9
AssessmentType ,
10
10
BaseQuestion ,
11
11
emptyLibrary ,
12
- GradingStatuses ,
13
12
IMCQQuestion ,
14
13
IProgrammingQuestion ,
15
14
Library ,
@@ -72,6 +71,7 @@ const makeAssessmentOverview = (result: any, maxXpVal: number): AssessmentOvervi
72
71
return {
73
72
type : capitalizeFirstLetter ( rawOverview . kind ) as AssessmentType ,
74
73
isManuallyGraded : true , // TODO: This is temporarily hardcoded to true. To be redone when overhauling MissionControl
74
+ isPublished : false ,
75
75
closeAt : rawOverview . duedate ,
76
76
coverImage : rawOverview . coverimage ,
77
77
id : EDITING_ID ,
@@ -84,8 +84,8 @@ const makeAssessmentOverview = (result: any, maxXpVal: number): AssessmentOvervi
84
84
shortSummary : task . WEBSUMMARY ? task . WEBSUMMARY [ 0 ] : '' ,
85
85
status : AssessmentStatuses . attempting ,
86
86
story : rawOverview . story ,
87
+ isGradingPublished : false ,
87
88
xp : 0 ,
88
- gradingStatus : 'none' as GradingStatuses ,
89
89
maxTeamSize : 1 ,
90
90
hasVotingFeatures : false
91
91
} ;
@@ -167,7 +167,11 @@ const makeQuestions = (task: XmlParseStrTask): [Question[], number] => {
167
167
168
168
const makeMCQ = ( problem : XmlParseStrCProblem , question : BaseQuestion ) : IMCQQuestion => {
169
169
const choicesVal : MCQChoice [ ] = [ ] ;
170
- const solution = problem . SNIPPET ? problem . SNIPPET [ 0 ] . SOLUTION : undefined ;
170
+ const snippet = problem . SNIPPET ;
171
+ // FIXME: I think `XmlParseStrCProblem` type definition is incorrect
172
+ // FIXME: Remove `as unknown as keyof typeof snippet` when fixed
173
+ // @ts -expect-error broken type definition to be fixed above
174
+ const solution = snippet ? snippet [ 0 as unknown as keyof typeof snippet ] . SOLUTION : undefined ;
171
175
let solutionVal = 0 ;
172
176
problem . CHOICE . forEach ( ( choice : XmlParseStrProblemChoice , i : number ) => {
173
177
choicesVal . push ( {
@@ -269,7 +273,8 @@ const exportLibrary = (library: Library) => {
269
273
name : library . external . name
270
274
}
271
275
}
272
- } ;
276
+ // FIXME: Replace any with proper type
277
+ } as any ;
273
278
274
279
if ( library . external . symbols . length !== 0 ) {
275
280
/* tslint:disable:no-string-literal */
@@ -327,7 +332,8 @@ export const assessmentToXml = (
327
332
} ,
328
333
TEXT : question . content ,
329
334
CHOICE : [ ] as any [ ]
330
- } ;
335
+ // FIXME: Replace any with proper type
336
+ } as any ;
331
337
332
338
if ( question . library . chapter !== - 1 ) {
333
339
/* tslint:disable:no-string-literal */
0 commit comments