Closed jojoob closed 7 months ago
Dear @Jojoob, Thank you for your thorough and insightful bug report regarding the issue encountered with custom automated program assessment in VPL 4.2.2. In response to your findings, we have implemented a solution in the VPL 4.2.3 release. If a non-numeric format is detected, VPL will display an error message to the user, indicating the specific nature of the format issue. This should effectively prevent the type of error you encountered and provide more clarity to users when input format issues arise. Additionally, as per your suggestion, we are updating our documentation to explicitly specify the expected format for grade lines, complete with example formats. This should aid in preventing similar misunderstandings in the future. We value your contribution to improving. Best regards, Juan Carlos
Resolved in VPL 4.2.3
We had a case were a lecturer customized the automatic program assessment to automate the evaluation and grading. His python script for the evaluation used
print('Grade :=>> {}/100'.format(grade_count))
which produces output likeGrade :=>> 85/100
.As soon as a submission was evaluated opening the editor led to the following error:
After investigation it turned out that the
/100
part triggered the error.The analysis of the error showed that mod_vpl_submission->find_proposedgrade() just grabs everything behind
Grade :=>>
until the end of the line. mod_vpl_submission->get_ce_for_editor() passes that value to mod_vpl_submission->get_grade_core() which in turn calls Moodles format_float() and finally PHPs number_format().I propose checking the grabbed part to be a number and if it is not showing a descriptive error message to the user. Or at least doing a silent conversation or cast to float to prevent that error message above. In any case the documentation should include the exact format of the grade line with an example.
We are using mod_vpl version 4.2.2 on Moodle 4.1 running with PHP 8.1 and VPL execution server 3.0.1.