Hi,
A teacher reported an error trying to manual grade Calculated multichoice questions in a test.
No errors when creating the questions and no errors when the students answered the questions. The error came out only when grading the questions.
https://[moodle...]/mod/quiz/report.php?id=80147&mode=grading&slot=7&qid=182261&grade=all&includeauto=1%C2%A0
Grading attempts 1 to 5 of 14 Illegal formula syntax starting with '2*{Vi}' More information about this error Debug info: Error code: illegalformulasyntax Stack trace: line 438 of /question/type/calculated/question.php: moodle_exception thrown line 426 of /question/type/calculated/question.php: call to qtype_calculated_variable_substituter->calculate_raw() line 476 of /question/type/calculated/question.php: call to qtype_calculated_variable_substituter->calculate() line ? of unknownfile: call to qtype_calculated_variable_substituter->{closure}() line 477 of /question/type/calculated/question.php: call to preg_replace_callback() line 156 of /question/type/calculatedmulti/question.php: call to qtype_calculated_variable_substituter->replace_expressions_in_text() line 65 of /question/type/calculatedmulti/question.php: call to qtype_calculatedmulti_calculate_helper::calculate_all_expressions() line 169 of /question/type/calculated/question.php: call to qtype_calculatedmulti_single_question->calculate_all_expressions() line 60 of /question/type/calculatedmulti/question.php: call to qtype_calculated_question_helper::apply_attempt_state() line 1415 of /question/engine/questionattempt.php: call to qtype_calculatedmulti_single_question->apply_attempt_state() line 862 of /question/engine/questionusage.php: call to question_attempt::load_from_records() line 355 of /question/engine/datalib.php: call to question_usage_by_activity::load_from_records() line 84 of /question/engine/lib.php: call to question_engine_data_mapper->load_questions_usage_by_activity() line 409 of /mod/quiz/report/grading/report.php: call to question_engine::load_questions_usage_by_activity() line 155 of /mod/quiz/report/grading/report.php: call to quiz_grading_report->display_grading_interface() line 96 of /mod/quiz/report.php: call to quiz_grading_report->display()
The formulas:
{=2*{Vi}} V, {=0.78*{Vi}*sqrt(2)/sqrt( {R}*{R}+6.28*{Fc}*{L}*6.28*{Fc}*{L} )} A
{=2*{Vi}} V, {=0.78*{Vi}*sqrt(2)/sqrt(3)/sqrt( {R}*{R}+6.28*{Fc}*{L}*6.28*{Fc}*{L} )} A
On Moodle 2.7 Postgresql
Thank you!
susana