public function is_empty(stdClass $submission) {
        $onlinetextsubmission = $this->get_onlinetext_submission($submission->id);
        $wordcount = 0;

        if (isset($onlinetextsubmission->onlinetext)) {
            $wordcount = count_words(trim($onlinetextsubmission->onlinetext));
        }

        return $wordcount == 0;
    }