Skip to content
Snippets Groups Projects
Commit 04ceb3cd authored by Matt Petro's avatar Matt Petro
Browse files

UWMOODLE-668: When searching for archives, always show advanced columns to archive managers

parent 25754983
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ class local_archive_renderer extends plugin_renderer_base {
$courses = $component->search($page*$perpage, $perpage);
$showadvanced = $component->get_showadvanced();
$canshowadvanced = $component->can_show_advanced();
// Get subject mapping
$subjects = array();
......@@ -69,7 +70,7 @@ class local_archive_renderer extends plugin_renderer_base {
/* Display archive selection table */
$output .= html_writer::start_tag('div', array('class' => 'ics-results'));
$table = new html_table();
if (!$showadvanced) {
if (!$canshowadvanced) {
$table->head = array('', 'Term', 'Catalog', get_string('fullnamecourse'), 'Archived', 'Size');
} else {
$table->head = array('', 'Term', 'Catalog', get_string('fullnamecourse'), 'Type', 'Filename', 'Archived', 'Size', 'Teachers');
......@@ -107,7 +108,7 @@ class local_archive_renderer extends plugin_renderer_base {
if ($course->id === $selected) {
$inputparams['checked'] = 'checked';
}
if (!$showadvanced) {
if (!$canshowadvanced) {
$row->cells = array(
html_writer::empty_tag('input', $inputparams),
$term,
......
......@@ -75,7 +75,7 @@ abstract class archive_course_search_base implements renderable {
}
public function get_showadvanced() {
if ($this->can_show_advanced()) {
if (!empty($this->state['advanced']) && $this->can_show_advanced()) {
return true;
} else {
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment