diff --git a/course/lib.php b/course/lib.php index 0b6f90cac15..ae8133bcacc 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1383,7 +1383,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false, } else { // Normal activity - if ($USER->screenreader) { + if (!empty($USER->screenreader)) { $typestring = '('.get_string('modulename',$mod->modname).') '; } else { $typestring = ''; diff --git a/mod/chat/view.php b/mod/chat/view.php index edba6aee3c2..4d8a65d83d1 100644 --- a/mod/chat/view.php +++ b/mod/chat/view.php @@ -106,7 +106,7 @@ print_simple_box_start('center'); // users with screenreader set, will only see 1 link, to the manual refresh page // for better accessibility - if ($USER->screenreader) { + if (!empty($USER->screenreader)) { $chattarget = "/mod/chat/gui_basic/index.php?id=$chat->id$groupparam"; } else { $chattarget = "/mod/chat/gui_$CFG->chat_method/index.php?id=$chat->id$groupparam"; @@ -117,7 +117,7 @@ print_simple_box_end(); // if user is using screen reader, then there is no need to display this link again - if ($CFG->chat_method == 'header_js' && !$USER->screenreader) { + if ($CFG->chat_method == 'header_js' && empty($USER->screenreader)) { // show frame/js-less alternative print_simple_box_start('center'); link_to_popup_window ("/mod/chat/gui_basic/index.php?id=$chat->id$groupparam", diff --git a/mod/resource/type/file/resource.class.php b/mod/resource/type/file/resource.class.php index 1ba435270d6..254952927c1 100644 --- a/mod/resource/type/file/resource.class.php +++ b/mod/resource/type/file/resource.class.php @@ -349,7 +349,7 @@ function display() { /// Now check whether we need to display a frameset $frameset = optional_param( 'frameset','' ); - if (empty($frameset) and !$embedded and !$inpopup and ($resource->options == "frame") and !$USER->screenreader) { + if (empty($frameset) and !$embedded and !$inpopup and ($resource->options == "frame") and empty($USER->screenreader)) { @header('Content-Type: text/html; charset=utf-8'); echo "\n"; echo "\n"; diff --git a/mod/resource/type/repository/resource.class.php b/mod/resource/type/repository/resource.class.php index 248e78cc10c..06c0b9b3883 100644 --- a/mod/resource/type/repository/resource.class.php +++ b/mod/resource/type/repository/resource.class.php @@ -333,7 +333,7 @@ function display() { /// Now check whether we need to display a frameset - if (empty($_GET['frameset']) and !$embedded and !$inpopup and $resource->options == "frame" and !$USER->screenreader) { + if (empty($_GET['frameset']) and !$embedded and !$inpopup and $resource->options == "frame" and empty($USER->screenreader)) { echo "\n"; echo "\n"; echo '
'; diff --git a/question/type/multianswer/questiontype.php b/question/type/multianswer/questiontype.php index 6f28fc8698c..2ee75436884 100644 --- a/question/type/multianswer/questiontype.php +++ b/question/type/multianswer/questiontype.php @@ -200,7 +200,7 @@ class embedded_cloze_qtype extends default_questiontype { // adding an icon with alt to warn user this is a fill in the gap question // MDL-7497 - if ($USER->screenreader) { + if (!empty($USER->screenreader)) { echo "