mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-19799 Converted calls to popup_form()
This commit is contained in:
parent
7e97f14939
commit
d81b05e701
@ -74,8 +74,11 @@
|
||||
} else {
|
||||
$currlang = current_language();
|
||||
$langs = get_list_of_languages();
|
||||
$langlabel = get_accesshide(get_string('language'));
|
||||
$langmenu = popup_form($CFG->wwwroot .'/index.php?lang=', $langs, 'chooselang', $currlang, '', '', '', true, 'self', $langlabel);
|
||||
|
||||
$select = moodle_select::make_popup_form($CFG->wwwroot .'/index.php', 'lang', $langs, 'chooselang', $currlang);
|
||||
$select->nothinglabel = false;
|
||||
$select->set_label(get_accesshide(get_string('language')));
|
||||
$langmenu = $OUTPUT->select($select);
|
||||
}
|
||||
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
|
||||
$PAGE->set_url('');
|
||||
|
@ -1337,7 +1337,7 @@ function matching_page_type_patterns($pagetype) {
|
||||
* cannot add any blocks here.
|
||||
*/
|
||||
function block_add_block_ui($page, $output) {
|
||||
global $CFG;
|
||||
global $CFG, $OUTPUT;
|
||||
if (!$page->user_is_editing() || !$page->user_can_edit_blocks()) {
|
||||
return null;
|
||||
}
|
||||
@ -1361,9 +1361,11 @@ function block_add_block_ui($page, $output) {
|
||||
}
|
||||
asort($menu, SORT_LOCALE_STRING);
|
||||
|
||||
// TODO convert to $OUTPUT.
|
||||
$actionurl = $page->url->out_action() . '&bui_addblock=';
|
||||
$bc->content = popup_form($actionurl, $menu, 'add_block', '', get_string('adddots'), '', '', true);
|
||||
$actionurl = $page->url->out_action();
|
||||
$select = moodle_select::make_popup_form($actionurl, 'bui_addblock', $menu, 'add_block');
|
||||
$select->nothinglabel = get_string('adddots');
|
||||
|
||||
$bc->content = $OUTPUT->select($select);
|
||||
return $bc;
|
||||
}
|
||||
|
||||
|
@ -412,7 +412,7 @@ function groups_get_activity_groupmode($cm, $course=null) {
|
||||
* @return mixed void or string depending on $return param
|
||||
*/
|
||||
function groups_print_course_menu($course, $urlroot, $return=false) {
|
||||
global $CFG, $USER, $SESSION;
|
||||
global $CFG, $USER, $SESSION, $OUTPUT;
|
||||
|
||||
if (!$groupmode = $course->groupmode) {
|
||||
if ($return) {
|
||||
@ -480,7 +480,10 @@ function groups_print_course_menu($course, $urlroot, $return=false) {
|
||||
$groupname = reset($groupsmenu);
|
||||
$output = $grouplabel.': '.$groupname;
|
||||
} else {
|
||||
$output = popup_form($urlroot.'&group=', $groupsmenu, 'selectgroup', $activegroup, '', '', '', true, 'self', $grouplabel);
|
||||
$select = moodle_select::make_popup_form($urlroot, 'group', $groupsmenu, 'selectgroup', $activegroup);
|
||||
$select->nothinglabel = false;
|
||||
$select->set_label($grouplabel);
|
||||
$output = $OUTPUT->select($select);
|
||||
}
|
||||
|
||||
$output = '<div class="groupselector">'.$output.'</div>';
|
||||
@ -511,7 +514,7 @@ function groups_print_course_menu($course, $urlroot, $return=false) {
|
||||
* @return mixed void or string depending on $return param
|
||||
*/
|
||||
function groups_print_activity_menu($cm, $urlroot, $return=false, $hideallparticipants=false) {
|
||||
global $CFG, $USER, $SESSION;
|
||||
global $CFG, $USER, $SESSION, $OUTPUT;
|
||||
|
||||
// groupings are ignored when not enabled
|
||||
if (empty($CFG->enablegroupings)) {
|
||||
@ -585,7 +588,10 @@ function groups_print_activity_menu($cm, $urlroot, $return=false, $hideallpartic
|
||||
$groupname = reset($groupsmenu);
|
||||
$output = $grouplabel.': '.$groupname;
|
||||
} else {
|
||||
$output = popup_form($urlroot.'&group=', $groupsmenu, 'selectgroup', $activegroup, '', '', '', true, 'self', $grouplabel);
|
||||
$select = moodle_select::make_popup_form($urlroot, 'group', $groupsmenu, 'selectgroup', $activegroup);
|
||||
$select->nothinglabel = false;
|
||||
$select->set_label($grouplabel);
|
||||
$output = $OUTPUT->select($select);
|
||||
}
|
||||
|
||||
$output = '<div class="groupselector">'.$output.'</div>';
|
||||
|
@ -50,9 +50,10 @@
|
||||
} else {
|
||||
$currlang = current_language();
|
||||
$langs = get_list_of_languages();
|
||||
$langlabel = get_accesshide(get_string('language'));
|
||||
$langmenu = popup_form($CFG->wwwroot . '/my/index.php?lang=', $langs,
|
||||
'chooselang', $currlang, '', '', '', true, 'self', $langlabel);
|
||||
$select = moodle_select::make_popup_form($CFG->wwwroot .'/my/index.php', 'lang', $langs, 'chooselang', $currlang);
|
||||
$select->nothinglabel = false;
|
||||
$select->set_label(get_accesshide(get_string('language')));
|
||||
$langmenu = $OUTPUT->select($select);
|
||||
}
|
||||
|
||||
print_header($strmymoodle, $header, $navigation, '', '', true, $button, $loggedinas . $langmenu);
|
||||
|
Loading…
x
Reference in New Issue
Block a user