]> git.mjollnir.org Git - moodle.git/commitdiff
Removed some unnecessary code
authorgustav_delius <gustav_delius>
Wed, 5 Apr 2006 18:52:37 +0000 (18:52 +0000)
committergustav_delius <gustav_delius>
Wed, 5 Apr 2006 18:52:37 +0000 (18:52 +0000)
mod/assignment/type/online/assignment.class.php
mod/assignment/type/uploadsingle/assignment.class.php

index bae32e14216fc149e4978daf7117134182719763..1afca647bc0bde8ef00085d409f74000fbd1524c 100644 (file)
@@ -176,51 +176,6 @@ class assignment_online extends assignment_base {
     }
 
 
-    /*
-     *  Display and process the submissions 
-     */ 
-    function process_feedback() {                 
-                
-        global $USER;
-                    
-        if (!$feedback = data_submitted()) {      // No incoming data?
-            return false;
-        }       
-        
-        ///For save and next, we need to know the userid to save, and the userid to go...
-        ///We use a new hidden field in the form, and set it to -1. If it's set, we use this
-        ///as the userid to store...
-        if ((int)$feedback->saveuserid !== -1){
-            $feedback->userid = $feedback->saveuserid;
-        }
-        
-        if (!empty($feedback->cancel)) {          // User hit cancel button
-            return false;
-        }       
-        
-        $newsubmission = $this->get_submission($feedback->userid, true);  // Get or make one
-            
-        $newsubmission->grade      = $feedback->grade;
-        $newsubmission->comment    = $feedback->comment;
-        $newsubmission->format     = $feedback->format;
-        $newsubmission->teacher    = $USER->id;
-        $newsubmission->mailed     = 0;       // Make sure mail goes out (again, even)
-        $newsubmission->timemarked = time();
-
-        unset($newsubmission->data1);  // Don't need to update this.
-        unset($newsubmission->data2);  // Don't need to update this.
-
-        if (! update_record('assignment_submissions', $newsubmission)) {
-            return false;
-        }
-        
-        add_to_log($this->course->id, 'assignment', 'update grades', 
-                   'submissions.php?id='.$this->assignment->id.'&user='.$feedback->userid, $feedback->userid, $this->cm->id);   
-        
-        return $newsubmission;
-                 
-    }   
-
     function print_student_answer($userid, $return=false){
         global $CFG;
         if (!$submission = $this->get_submission($userid)) {
index 791db7966f4867aaf18d7143c4e67a3e4d32d0b5..50484b4b58ca174e734ea19729ba3ea901c0679a 100644 (file)
@@ -152,50 +152,6 @@ class assignment_uploadsingle extends assignment_base {
     }
 
 
-    /*
-     *  Display and process the submissions 
-     */ 
-    function process_feedback() {                 
-                
-        global $USER;
-         
-        if (!$feedback = data_submitted()) {      // No incoming data?
-            return false;
-        }     
-                          
-        ///For save and next, we need to know the userid to save, and the userid to go...
-        ///We use a new hidden field in the form, and set it to -1. If it's set, we use this
-        ///as the userid to store...
-        if ((int)$feedback->saveuserid !== -1){
-            $feedback->userid = $feedback->saveuserid;
-        }       
-        
-        if (!empty($feedback->cancel)) {          // User hit cancel button
-            return false;
-        }       
-        
-        $newsubmission = $this->get_submission($feedback->userid, true);  // Get or make one
-                
-        $newsubmission->grade      = $feedback->grade;
-        $newsubmission->comment    = $feedback->comment;
-        $newsubmission->format     = $feedback->format;
-        $newsubmission->teacher    = $USER->id;
-        $newsubmission->mailed     = 0;       // Make sure mail goes out (again, even)
-        $newsubmission->timemarked = time();
-
-        unset($newsubmission->data1);  // Don't need to update this.
-        unset($newsubmission->data2);  // Don't need to update this.
-
-        if (! update_record('assignment_submissions', $newsubmission)) {
-            return false;
-        }
-        
-        add_to_log($this->course->id, 'assignment', 'update grades', 
-                   'submissions.php?id='.$this->assignment->id.'&user='.$feedback->userid, $feedback->userid, $this->cm->id);   
-        
-        return $newsubmission;
-                 
-    }   
 
 
 }