MDL-36908 Assignment: Additional fixes for preventing empty submissions
[moodle.git] / mod / assign / submission / onlinetext / locallib.php
index a94cc85..26ab289 100644 (file)
@@ -422,7 +422,9 @@ class assign_submission_onlinetext extends assign_submission_plugin {
      * @return bool
      */
     public function is_empty(stdClass $submission) {
-        return $this->view($submission) == '';
+        $onlinetextsubmission = $this->get_onlinetext_submission($submission->id);
+
+        return empty($onlinetextsubmission->onlinetext);
     }
 
     /**