Kaynağa Gözat

Improve store traces in submissions

Igor 4 yıl önce
ebeveyn
işleme
19d430e5f1
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 6 0
      locallib.php

+ 6 - 0
locallib.php

@@ -820,6 +820,8 @@ class iassign {
     if ($this->write_solution == 1) {
       $timenow = time();
 
+      $newentry = null;
+
       // new record
       if (!$iassign_submission) {
         $newentry = new stdClass();
@@ -938,6 +940,10 @@ class iassign {
           print $OUTPUT->box_end();
           }
         }
+        if ($newentry) {
+          unset($newentry->timemodified);
+          $DB->insert_record("iassign_submission_trace", $newentry);
+        }
       } // if ($this->write_solution == 1)
 
     print $OUTPUT->footer();