Skip to content

Commit

Permalink
MDL-70441 mod_assign: change condition to check if variable is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze committed May 15, 2024
1 parent d630535 commit 2a58c95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/assign/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -7884,7 +7884,7 @@ public function add_grade_form_elements(MoodleQuickForm $mform, stdClass $data,
$options = array('' => get_string('markingworkflowstatenotmarked', 'assign')) + $states;
$select = $mform->addElement('select', 'workflowstate', get_string('markingworkflowstate', 'assign'), $options);
$mform->addHelpButton('workflowstate', 'markingworkflowstate', 'assign');
if (isset($data->workflowstate) && !array_key_exists($data->workflowstate, $states)) {
if (!empty($data->workflowstate) && !array_key_exists($data->workflowstate, $states)) {
// In a workflow state that user should not be able to change, so freeze workflow selector.
// Have to add the state so it shows in the frozen selector.
$allworkflowstates = $this->get_all_marking_workflow_states();
Expand Down

0 comments on commit 2a58c95

Please sign in to comment.