]> git.mjollnir.org Git - moodle.git/commitdiff
Tidied up groups interface to make it a bit more intuitive
authormoodler <moodler>
Sun, 1 Oct 2006 08:37:15 +0000 (08:37 +0000)
committermoodler <moodler>
Sun, 1 Oct 2006 08:37:15 +0000 (08:37 +0000)
course/groups-edit.html
course/groups.php

index 05620d4443305b70bc803a8125ee1af54d701c09..ed0cf2a0e97130e13586b52af1115c448f18a93c 100755 (executable)
@@ -1,8 +1,8 @@
 <script type="text/javascript">
 <!-- Begin
 <?php 
+    $roleoptions = array(0 => get_string('all'));
     $roles = get_all_roles();
-    $roleoptions = array();
     foreach ($roles as $rolex) {
         $roleoptions[$rolex->id] = $rolex->name;
     }
@@ -80,6 +80,11 @@ function groupWindow(selectgroup) {
 // end hiding script -->
 </script>
 
+        <form name="rolesform1" action="groups.php" method="get">
+        <input type="hidden" name="id" value="<?php echo $courseid ?>">
+        <div align="center"><?php echo get_string('currentrole', 'role') ?>: 
+            <?php choose_from_menu ($roleoptions, 'roleid', $roleid, '', $script='rolesform1.submit()') ?>
+        </div></form>
 
   <table cellspacing="0" cellpadding="10" align="center" class="generaltable generalbox">
     <tr>
@@ -123,11 +128,6 @@ function groupWindow(selectgroup) {
                    onclick="return userWindow(document.form1['nonmembers[]']);" />
           </p>
         </form>
-        <form name="rolesform1" action="groups.php" method="get">
-        <input type="hidden" name="id" value="<?php echo $courseid ?>">
-        <div align="center"><?php echo get_string('selectrole', 'role') ?>: 
-            <?php choose_from_menu ($roleoptions, 'roleid', $roleid, 'choose', $script='rolesform1.submit()') ?>
-        </div></form>
       </td>
       <td class="generalboxcontent"><p>
         <form name="form2" id="form2" method="post" action="groups.php">
index 5d7a8ef0d872d7e2b1262ca9a434a5a941793faa..36ddd19043cfd5fb62624ce63208e3596b4c7129 100644 (file)
@@ -30,7 +30,7 @@
 
     $courseid      = required_param('id', PARAM_INT);           // Course id
     $selectedgroup = optional_param('group', NULL, PARAM_INT);  // Current group id
-    $roleid        = optional_param('roleid', 0, PARAM_INT);  // Current group id
+    $roleid        = optional_param('roleid', 0, PARAM_INT);    // Current role id
 
     if (! $course = get_record('course', 'id', $courseid) ) {
         error("That's an invalid course id");