users with screenreader flag set should only see 1 link to manual refresh chat rooms

This commit is contained in:
toyomoyo 2007-01-04 01:13:26 +00:00
parent b776b27738
commit 7dc6c73e33

View file

@ -104,10 +104,20 @@
if (has_capability('mod/chat:chat',$context)) {
print_simple_box_start('center');
link_to_popup_window ("/mod/chat/gui_$CFG->chat_method/index.php?id=$chat->id$groupparam",
// users with screenreader set, will only see 1 link, to the manual refresh page
// for better accessibility
if ($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";
}
link_to_popup_window ($chattarget,
"chat$course->id$chat->id$groupparam", "$strenterchat", 500, 700, get_string('modulename', 'chat'));
print_simple_box_end();
if ($CFG->chat_method == 'header_js') {
// if user is using screen reader, then there is no need to display this link again
if ($CFG->chat_method == 'header_js' && !$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",