]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed MDL-6334 by removing the group-setting popup
authormoodler <moodler>
Wed, 27 Sep 2006 08:29:24 +0000 (08:29 +0000)
committermoodler <moodler>
Wed, 27 Sep 2006 08:29:24 +0000 (08:29 +0000)
mod/assignment/lib.php

index cbb8eb603db6c6bbe73a59672bbb72604ff6d413..d3d0289bdfa1d1d4166224eb67ece41426bb6f5c 100644 (file)
@@ -806,18 +806,16 @@ class assignment_base {
             $subtype = 'assignmentold';
         }
 
-        ///construct SQL, using current offset to find the data of the next student
+    /// construct SQL, using current offset to find the data of the next student
         $course     = $this->course;
         $assignment = $this->assignment;
         $cm         = $this->cm;
     
-        if ($groupmode = groupmode($course, $cm)) {   // Groups are being used
-            $currentgroup = setup_and_print_groups($course, $groupmode, 'submissions.php?id='.$this->cm->id);
-        } else {
-            $currentgroup = false;
-        }
 
     /// Get all teachers and students
+
+        $currentgroup = get_current_group($course->id);
+
         if ($currentgroup) {
             $users = get_group_users($currentgroup);
         } else {
@@ -831,7 +829,8 @@ class assignment_base {
                'WHERE u.id IN ('.implode(',', array_keys($users)).') ';
                
         require_once($CFG->libdir.'/tablelib.php');
-        if($sort = flexible_table::get_sql_sort('mod-assignment-submissions')) {
+
+        if ($sort = flexible_table::get_sql_sort('mod-assignment-submissions')) {
             $sort = 'ORDER BY '.$sort.' ';
         }