diff --git a/src/app/api/models/task-definition.ts b/src/app/api/models/task-definition.ts index 96a010af6..f5d5c9102 100644 --- a/src/app/api/models/task-definition.ts +++ b/src/app/api/models/task-definition.ts @@ -33,7 +33,7 @@ export class TaskDefinition extends Entity { hasTaskResources: boolean; hasEnabledNumbasTest: boolean; hasNumbasData: boolean; - numbasTimeDelay: string = 'no delay'; + hasNumbasTimeDelay: boolean; numbasAttemptLimit: number = 0; hasTaskAssessmentResources: boolean; isGraded: boolean; diff --git a/src/app/api/services/task-definition.service.ts b/src/app/api/services/task-definition.service.ts index e835c20f0..3fe9ebe86 100644 --- a/src/app/api/services/task-definition.service.ts +++ b/src/app/api/services/task-definition.service.ts @@ -105,7 +105,7 @@ export class TaskDefinitionService extends CachedEntityService { 'hasTaskAssessmentResources', 'hasEnabledNumbasTest', 'hasNumbasData', - 'numbasTimeDelay', + 'hasNumbasTimeDelay', 'numbasAttemptLimit', 'isGraded', 'maxQualityPts', diff --git a/src/app/units/states/edit/directives/unit-tasks-editor/task-definition-editor/task-definition-numbas/task-definition-numbas.component.html b/src/app/units/states/edit/directives/unit-tasks-editor/task-definition-editor/task-definition-numbas/task-definition-numbas.component.html index 712f01547..e0021065a 100644 --- a/src/app/units/states/edit/directives/unit-tasks-editor/task-definition-editor/task-definition-numbas/task-definition-numbas.component.html +++ b/src/app/units/states/edit/directives/unit-tasks-editor/task-definition-editor/task-definition-numbas/task-definition-numbas.component.html @@ -24,25 +24,18 @@ @if (taskDefinition.hasEnabledNumbasTest) {
+ + Enable incremental time delays between test attempts + - Time delay - - No delay - 30 min - 2 hours - 1 day - See tutor - - - - Attempt Limit + Attempt limit
diff --git a/src/app/units/states/edit/directives/unit-tasks-editor/task-definition-editor/task-definition-numbas/task-definition-numbas.component.ts b/src/app/units/states/edit/directives/unit-tasks-editor/task-definition-editor/task-definition-numbas/task-definition-numbas.component.ts index 6a26501ba..658845343 100644 --- a/src/app/units/states/edit/directives/unit-tasks-editor/task-definition-editor/task-definition-numbas/task-definition-numbas.component.ts +++ b/src/app/units/states/edit/directives/unit-tasks-editor/task-definition-editor/task-definition-numbas/task-definition-numbas.component.ts @@ -20,7 +20,7 @@ export class TaskDefinitionNumbasComponent { private taskDefinitionService: TaskDefinitionService ) {} - public scoreControl = new FormControl('', [Validators.max(100), Validators.min(0)]); + public attemptLimitControl = new FormControl('', [Validators.max(100), Validators.min(0)]); public get unit(): Unit { return this.taskDefinition?.unit;