File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 420420$ string ['moodleerrors ' ] = 'You have errors related to Moodle \'s basic question setup. ' ;
421421$ string ['stackerrors ' ] = 'You have errors in your question. ' ;
422422$ string ['markedasbroken ' ] = 'The question has been marked as broken and will not be accessible to students. ' ;
423+ $ string ['alwaysmanuallygrade ' ] = 'This question is always manually graded. ' ;
423424
424425// Strings used by input elements.
425426$ string ['studentinputtoolong ' ] = 'Your input is longer than permitted by STACK. ' ;
Original file line number Diff line number Diff line change @@ -1950,7 +1950,18 @@ public function validate_warnings($errors = false) {
19501950 $ warnings [] = stack_string_error ('questionbroken ' );
19511951 }
19521952
1953- // 4. Language warning checks.
1953+ // 4. Warn if always maually graded.
1954+ $ manualgraded = false ;
1955+ if (!empty ($ this ->inputs )) {
1956+ foreach ($ this ->inputs as $ input ) {
1957+ $ manualgraded = $ manualgraded || $ input ->get_extra_option ('manualgraded ' );
1958+ }
1959+ }
1960+ if ($ manualgraded ) {
1961+ $ warnings [] = stack_string_error ('alwaysmanuallygrade ' );
1962+ }
1963+
1964+ // 5. Language warning checks.
19541965 // Put language warning checks last (see guard clause below).
19551966 // Check multi-language versions all have the same languages.
19561967 $ ml = new stack_multilang ();
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class stack_freetext_input extends stack_string_input {
3333 'hideanswer ' => false ,
3434 'allowempty ' => false ,
3535 'validator ' => false ,
36- 'manualgraded ' => false ,
36+ 'manualgraded ' => true ,
3737 ];
3838
3939 /**
You can’t perform that action at this time.
0 commit comments