Commit 9856eadb authored by Eloy Lafuente (stronk7)'s avatar Eloy Lafuente (stronk7) Committed by Dan Poltawski
Browse files

Merge branch 'MDL-51720-28' of git://github.com/damyon/moodle into MOODLE_28_STABLE

parents 86eaf831 c0388258
......@@ -406,8 +406,6 @@ class assign_grading_table extends table_sql implements renderable {
foreach ($extrauserfields as $extrafield) {
$this->column_class($extrafield, $extrafield);
}
// We require at least one unique column for the sort.
$this->sortable(true, 'userid');
$this->no_sorting('recordid');
$this->no_sorting('finalgrade');
$this->no_sorting('userid');
......@@ -1364,6 +1362,16 @@ class assign_grading_table extends table_sql implements renderable {
has_capability('moodle/grade:viewall', $context);
}
/**
* Always return a valid sort - even if the userid column is missing.
* @return array column name => SORT_... constant.
*/
public function get_sort_columns() {
$result = parent::get_sort_columns();
$result = array_merge($result, array('userid' => SORT_ASC));
return $result;
}
/**
* Override the table show_hide_link to not show for select column.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment