Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-36092 Course/AJAX Ensure that dropdown resource pickers are shown…

… when JS is disabled
  • Loading branch information...
commit 2757a205c8995889f3952dad89a8a25cce6df01c 1 parent 6109f21
@andrewnicols andrewnicols authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 course/lib.php
View
5 course/lib.php
@@ -1824,8 +1824,9 @@ function print_section_add_menus($course, $section, $modnames = null, $vertical=
$output = html_writer::tag('div', $output, array('class' => 'hiddenifjs addresourcedropdown'));
$modchooser = html_writer::tag('div', $modchooser, array('class' => 'visibleifjs addresourcemodchooser'));
} else {
- $output = html_writer::tag('div', $output, array('class' => 'visibleifjs addresourcedropdown'));
- $modchooser = html_writer::tag('div', $modchooser, array('class' => 'hiddenifjs addresourcemodchooser'));
+ // If the module chooser is disabled, we need to ensure that the dropdowns are shown even if javascript is disabled
+ $output = html_writer::tag('div', $output, array('class' => 'show addresourcedropdown'));
+ $modchooser = html_writer::tag('div', $modchooser, array('class' => 'hide addresourcemodchooser'));
}
$output = $modchooser . $output;
}
Please sign in to comment.
Something went wrong with that request. Please try again.