chat_delete_old_users();
- redirect('index.php?id='.$id.'&newonly='.$newonly.'&last='.$last);
+ $url = new moodle_url('/mod/chat/gui_basic/index.php', array('id'=>$id, 'newonly'=>$newonly, 'last'=>$last));
+ redirect($url);
}
$PAGE->set_title("$strchat: $course->shortname: ".format_string($chat->name,true)."$groupname");
echo $OUTPUT->header();
-echo '<div id="page-mod-chat-gui_basic">';
-echo '<h2>'.get_string('participants').'</h2>';
-echo '<div id="participants"><ul>';
+echo '<div id="">';
+echo $OUTPUT->container_start(null, 'page-mod-chat-gui_basic');
+echo $OUTPUT->heading(get_string('participants'), 2, 'mdl-left');
+
+echo $OUTPUT->box_start('generalbox', 'participants');
+echo '<ul>';
foreach($chatusers as $chu) {
echo '<li class="clearfix">';
echo $OUTPUT->user_picture($chu, array('size'=>24, 'courseid'=>$course->id));
echo '</div>';
echo '</li>';
}
-echo '</ul></div>';
+echo '</ul>';
+echo $OUTPUT->box_end();
echo '<div id="send">';
echo '<form id="editing" method="post" action="index.php">';
-$usehtmleditor = can_use_html_editor();
echo '<h2><label for="message">'.get_string('sendmessage', 'message').'</label></h2>';
echo '<div>';
echo '<input type="text" id="message" name="message" value="'.s($refreshedmessage, true).'" size="60" />';
echo '</div>';
echo '<div id="messages">';
-echo '<h2>'.get_string('messages', 'chat').'</h2>';
+echo $OUTPUT->heading(get_string('messages', 'chat'), 2, 'mdl-left');
$allmessages = array();
$options = new stdClass();
}
}
-echo '</div></div>';
+echo '</div>';
+echo $OUTPUT->container_end();
echo $OUTPUT->footer();
-
$currentgroup = groups_get_activity_group($cm, true);
groups_print_activity_menu($cm, $CFG->wwwroot . "/mod/chat/view.php?id=$cm->id");
+// url parameters
+$params = array();
if ($currentgroup) {
$groupselect = " AND groupid = '$currentgroup'";
$groupparam = "&groupid=$currentgroup";
+ $params['groupid'] = $currentgroup;
} else {
$groupselect = "";
$groupparam = "";
}
if (empty($USER->screenreader)) {
- $chattarget = "/mod/chat/gui_$CFG->chat_method/index.php?id=$chat->id$groupparam";
+ $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>';
// users with screenreader set, will only see 1 link, to the manual refresh page
// for better accessibility
// show frame/js-less alternative
- $link = new moodle_url("/mod/chat/gui_basic/index.php?id=$chat->id$groupparam");
- $action = new popup_action('click', $link, "chat$course->id$chat->id$groupparam", array('height' => 500, 'width' => 700));
+ $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));
echo '<p>';
echo $OUTPUT->action_link($link, get_string('noframesjs', 'message'), $action, array('title'=>get_string('modulename', 'chat')));
echo '</p>';