mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-29441 Chat: Use a valid name for chat popup actions
This commit is contained in:
parent
f8eff10319
commit
ee4ece6822
@ -1313,10 +1313,10 @@ function openpopup(event, args) {
|
||||
args.name = '_blank';
|
||||
} else if (args.name.match(nameregex)) {
|
||||
// Cleans window name because IE does not support funky ones.
|
||||
args.name = args.name.replace(nameregex, '_');
|
||||
if (M.cfg.developerdebug) {
|
||||
alert('DEVELOPER NOTICE: Invalid \'name\' passed to openpopup()');
|
||||
alert('DEVELOPER NOTICE: Invalid \'name\' passed to openpopup(): ' + args.name);
|
||||
}
|
||||
args.name = args.name.replace(nameregex, '_');
|
||||
}
|
||||
|
||||
var fullurl = args.url;
|
||||
|
@ -100,7 +100,7 @@ $currentgroup = groups_get_activity_group($cm, true);
|
||||
$params = array();
|
||||
if ($currentgroup) {
|
||||
$groupselect = " AND groupid = '$currentgroup'";
|
||||
$groupparam = "&groupid=$currentgroup";
|
||||
$groupparam = "_group{$currentgroup}";
|
||||
$params['groupid'] = $currentgroup;
|
||||
} else {
|
||||
$groupselect = "";
|
||||
@ -130,12 +130,12 @@ if (has_capability('mod/chat:chat', $context)) {
|
||||
$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 $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;
|
||||
$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));
|
||||
$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>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user