Permalink
Browse files

MDL-30901 mod_chat Removing screenreader setting usage

  • Loading branch information...
1 parent 13cd661 commit 36ab2fedffee3c46ed8ed71434b34c4dad988568 @dmonllao dmonllao committed Sep 17, 2012
Showing with 9 additions and 18 deletions.
  1. +4 −7 mod/chat/lib.php
  2. +5 −11 mod/chat/view.php
View
@@ -1203,7 +1203,7 @@ function chat_supports($feature) {
}
function chat_extend_navigation($navigation, $course, $module, $cm) {
- global $CFG, $USER, $PAGE, $OUTPUT;
+ global $CFG;
$currentgroup = groups_get_activity_group($cm, true);
@@ -1219,12 +1219,9 @@ function chat_extend_navigation($navigation, $course, $module, $cm) {
$links = array();
- // If user is using screenreader, display gui_basic gui link only
- if (empty($USER->screenreader)) {
- $url = new moodle_url($target.'gui_'.$CFG->chat_method.'/index.php', $params);
- $action = new popup_action('click', $url, 'chat'.$course->id.$cm->instance.$currentgroup, array('height' => 500, 'width' => 700));
- $links[] = new action_link($url, $strenterchat, $action);
- }
+ $url = new moodle_url($target.'gui_'.$CFG->chat_method.'/index.php', $params);
+ $action = new popup_action('click', $url, 'chat'.$course->id.$cm->instance.$currentgroup, array('height' => 500, 'width' => 700));
+ $links[] = new action_link($url, $strenterchat, $action);
$url = new moodle_url($target.'gui_basic/index.php', $params);
$action = new popup_action('click', $url, 'chat'.$course->id.$cm->instance.$currentgroup, array('height' => 500, 'width' => 700));
View
@@ -126,18 +126,12 @@
echo '</p>';
}
- if (empty($USER->screenreader)) {
- $params['id'] = $chat->id;
- $chattarget = new moodle_url("/mod/chat/gui_$CFG->chat_method/index.php", $params);
- echo '<p>';
- echo $OUTPUT->action_link($chattarget, $strenterchat, new popup_action('click', $chattarget, "chat$course->id$chat->id$groupparam", array('height' => 500, 'width' => 700)));
- echo '</p>';
- }
+ $params['id'] = $chat->id;
+ $chattarget = new moodle_url("/mod/chat/gui_$CFG->chat_method/index.php", $params);
+ echo '<p>';
+ echo $OUTPUT->action_link($chattarget, $strenterchat, new popup_action('click', $chattarget, "chat$course->id$chat->id$groupparam", array('height' => 500, 'width' => 700)));
+ echo '</p>';
- // if user is using screen reader, then there is no need to display this link again
- // users with screenreader set, will only see 1 link, to the manual refresh page
- // for better accessibility
- // show frame/js-less alternative
$params['id'] = $chat->id;
$link = new moodle_url('/mod/chat/gui_basic/index.php', $params);
$action = new popup_action('click', $link, "chat{$course->id}{$chat->id}{$groupparam}", array('height' => 500, 'width' => 700));

0 comments on commit 36ab2fe

Please sign in to comment.