Skip to content

Commit

Permalink
Merge pull request #23 from danmarsden/main
Browse files Browse the repository at this point in the history
Fix #22 - use correct sortorder for criteria.
  • Loading branch information
marcusgreen authored Jun 13, 2024
2 parents 69a1bbb + a9b0065 commit 6b1d734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function init(array $data): array {
$criteriatable = 'gradingform_' . $data['grademethod'] . '_criteria';
}
$data['criteriarecord'] = $DB->get_records_menu($criteriatable,
['definitionid' => (int) $data['gradingdefinition']->definitionid], null, 'id, description');
['definitionid' => (int) $data['gradingdefinition']->definitionid], 'sortorder', 'id, description');
$data = header_fields($data, $data['criteriarecord'], $data['course'], $data['cm'], $data['gradingdefinition']);
$data['definition'] = get_grading_definition($data['cm']->instance);
$data['formaction'] = 'action='.$data['grademethod'] .'.php?id='.$data['courseid'].'&modid='.$data['modid'];
Expand Down

0 comments on commit 6b1d734

Please sign in to comment.