From 37ceb6cbed3eb68671a504649cd0d8a9b48788c8 Mon Sep 17 00:00:00 2001 From: Andrew Robert Nicols Date: Fri, 26 Oct 2012 17:33:57 +0800 Subject: [PATCH] MDL-36092 Course/AJAX Ensure that dropdown resource pickers are shown when JS is disabled --- course/lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/course/lib.php b/course/lib.php index 51b4b0c8d45b7..7c050940f22ef 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1876,8 +1876,9 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false, $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; }