From 2757a205c8995889f3952dad89a8a25cce6df01c 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 0227f970091..ec8f3dba71f 100644 --- a/course/lib.php +++ b/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; }