]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14685 remove print_group_menu()
authormudrd8mz <mudrd8mz>
Tue, 6 May 2008 18:36:42 +0000 (18:36 +0000)
committermudrd8mz <mudrd8mz>
Tue, 6 May 2008 18:36:42 +0000 (18:36 +0000)
lib/deprecatedlib.php

index 1a3c7885beebafeeb79dce5a44d3d01f51aa9699..5ea4669905df20adb245e878cbeda0b664f95429 100644 (file)
@@ -849,50 +849,7 @@ function get_and_set_current_group($course, $groupmode, $groupid=-1) {
 
 
 
-/**
- * Prints an appropriate group selection menu
- *
- * @uses VISIBLEGROUPS
- * @param array $groups ?
- * @param int $groupmode ?
- * @param string $currentgroup ?
- * @param string $urlroot ?
- * @param boolean $showall: if set to 0, it is a student in separate groups, do not display all participants
- * @todo Finish documenting this function
- */
-function print_group_menu($groups, $groupmode, $currentgroup, $urlroot, $showall=1, $return=false) {
-
-    $output = '';
-    $groupsmenu = array();
-
-/// Add an "All groups" to the start of the menu
-    if ($showall){
-        $groupsmenu[0] = get_string('allparticipants');
-    }
-    foreach ($groups as $key => $group) {
-        $groupsmenu[$key] = format_string($group->name);
-    }
 
-    if ($groupmode == VISIBLEGROUPS) {
-        $grouplabel = get_string('groupsvisible');
-    } else {
-        $grouplabel = get_string('groupsseparate');
-    }
-
-    if (count($groupsmenu) == 1) {
-        $groupname = reset($groupsmenu);
-        $output .= $grouplabel.': '.$groupname;
-    } else {
-        $output .= popup_form($urlroot.'&amp;group=', $groupsmenu, 'selectgroup', $currentgroup, '', '', '', true, 'self', $grouplabel);
-    }
-
-    if ($return) {
-        return $output;
-    } else {
-        echo $output;
-    }
-
-}
 
 
 /**