} else { // Normal activity
- if ($USER->screenreader) {
+ if (!empty($USER->screenreader)) {
$typestring = '('.get_string('modulename',$mod->modname).') ';
} else {
$typestring = '';
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";
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",
/// 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 "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n";
echo "<html dir=\"ltr\">\n";
/// 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 "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n";
echo "<html dir=\"ltr\">\n";
echo '<head>';
// 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 "<img src=\"$CFG->wwwroot/question/type/$question->qtype/icon.gif\" ".
"height=\"16\" width=\"16\" alt=\"".get_string('clozeaid','qtype_multichoice')."\" /> ";
}
case 'numerical':
echo " <input $style $readonly $popup name=\"$inputname\"
type=\"text\" value=\"".s($response)."\" size=\"12\" /> ";
- if (!empty($feedback) && $USER->screenreader) {
+ if (!empty($feedback) && !empty($USER->screenreader)) {
echo "<img src=\"$CFG->pixpath/i/feedback.gif\" alt=\"$feedback\" />";
}
echo $feedbackimg;
echo "<span $style><select $popup $readonly $style name=\"$inputname\">";
echo $outputoptions;
echo '</select></span>';
- if (!empty($feedback) && $USER->screenreader) {
+ if (!empty($feedback) && !empty($USER->screenreader)) {
echo "<img src=\"$CFG->pixpath/i/feedback.gif\" alt=\"$feedback\" />";
}
echo $feedbackimg;