Skip to content

Commit

Permalink
MDL-46188 course:show/hide button disappears after action
Browse files Browse the repository at this point in the history
  • Loading branch information
shashitechno committed Aug 14, 2014
1 parent e1eb180 commit c285740
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions course/classes/management_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1213,21 +1213,18 @@ public function search_listitem_actions(course_in_list $course) {
}
// Show/Hide.
if ($course->can_change_visibility()) {
if ($course->visible) {
$actions[] = $this->output->action_icon(
new moodle_url($baseurl, array('action' => 'hidecourse')),
new pix_icon('t/show', get_string('hide')),
null,
array('data-action' => 'hide', 'class' => 'action-hide')
);
} else {
$actions[] = $this->output->action_icon(
new moodle_url($baseurl, array('action' => 'showcourse')),
new pix_icon('t/hide', get_string('show')),
null,
array('data-action' => 'show', 'class' => 'action-show')
);
}
}
}
if (empty($actions)) {
Expand Down

0 comments on commit c285740

Please sign in to comment.