if ($this->assignment->get_instance()->markingallocation) {
if (has_capability('mod/assign:manageallocations', $this->assignment->get_context())) {
- //Check to see if marker filter is set
+ // Check to see if marker filter is set.
$markerfilter = (int)get_user_preferences('assign_markerfilter', '');
if (!empty($markerfilter)) {
$where .= ' AND uf.allocatedmarker = :markerid';
$workflowstates = $this->assignment->get_marking_workflow_states_for_current_user();
if (!empty($workflowstates)) {
$workflowfilter = get_user_preferences('assign_workflowfilter', '');
- if (array_key_exists($workflowfilter, $workflowstates) || $workflowfilter == ASSIGN_MARKING_WORKFLOW_STATE_NOTMARKED) {
- if ($workflowfilter == ASSIGN_MARKING_WORKFLOW_STATE_NOTMARKED) {
- $where .= ' AND (uf.workflowstate = :workflowstate OR uf.workflowstate IS NULL OR '.
- $DB->sql_isempty('assign_user_flags', 'workflowstate', true, true).')';
- $params['workflowstate'] = $workflowfilter;
- } else {
- $where .= ' AND uf.workflowstate = :workflowstate';
- $params['workflowstate'] = $workflowfilter;
- }
+ if ($workflowfilter == ASSIGN_MARKING_WORKFLOW_STATE_NOTMARKED) {
+ $where .= ' AND (uf.workflowstate = :workflowstate OR uf.workflowstate IS NULL OR '.
+ $DB->sql_isempty('assign_user_flags', 'workflowstate', true, true).')';
+ $params['workflowstate'] = $workflowfilter;
+ } else if (array_key_exists($workflowfilter, $workflowstates)) {
+ $where .= ' AND uf.workflowstate = :workflowstate';
+ $params['workflowstate'] = $workflowfilter;
}
}
}
$columns[] = 'teamstatus';
$headers[] = get_string('teamsubmissionstatus', 'assign');
}
- //allocated marker
+ // Allocated marker.
if ($this->assignment->get_instance()->markingallocation &&
has_capability('mod/assign:manageallocations', $this->assignment->get_context())) {
// Add a column for the allocated marker.
$workflowstate = ASSIGN_MARKING_WORKFLOW_STATE_NOTMARKED;
}
if ($this->quickgrading && !$gradingdisabled) {
+ $notmarked = get_string('markingworkflowstatenotmarked', 'assign');
$name = 'quickgrade_' . $row->id . '_workflowstate';
- $o .= html_writer::select($workflowstates, $name, $workflowstate, array('' => get_string('markingworkflowstatenotmarked', 'assign')));
+ $o .= html_writer::select($workflowstates, $name, $workflowstate, array('' => $notmarked));
// 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())) {
* @param stdClass $row - The row of data
* @return id the user->id of the marker.
*/
- function col_allocatedmarker(stdClass $row) {
+ public function col_allocatedmarker(stdClass $row) {
static $markers = null;
static $markerlist = array();
if ($markers === null) {