From 8a309823f096e23de1a7febbb82186871a337cd5 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Wed, 12 Jun 2013 21:29:39 +1200 Subject: [PATCH] MDL-38359: assign - prevent loss of associated marker certain markers don't see the marker allocation column. --- mod/assign/gradingtable.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mod/assign/gradingtable.php b/mod/assign/gradingtable.php index d71f2a17384..70c22871dfb 100644 --- a/mod/assign/gradingtable.php +++ b/mod/assign/gradingtable.php @@ -485,6 +485,13 @@ class assign_grading_table extends table_sql implements renderable { if ($this->quickgrading && !$gradingdisabled) { $name = 'quickgrade_' . $row->id . '_workflowstate'; $o .= html_writer::select($workflowstates, $name, $workflowstate, array('' => get_string('markingworkflowstatenotmarked', 'assign'))); + // Check if this user is a marker that can't manage allocations and doesn't have the marker column added. + if ($this->assignment->get_instance()->markingallocation && + !has_capability('mod/assign:manageallocations', $this->assignment->get_context())) { + + $name = 'quickgrade_' . $row->id . '_allocatedmarker'; + $o .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>$name, 'value'=>$row->allocatedmarker)); + } } else { $o .= $this->output->container(get_string('markingworkflowstate' . $workflowstate, 'assign'), $workflowstate); }