public function manual_grade($comment, $mark, $commentformat = null, $timestamp = null, $userid = null) {
        $submitteddata = array('-comment' => $comment);
        if (is_null($commentformat)) {
            debugging('You should pass $commentformat to manual_grade.', DEBUG_DEVELOPER);
            $commentformat = FORMAT_HTML;
        }
        $submitteddata['-commentformat'] = $commentformat;
        if (!is_null($mark)) {
            $submitteddata['-mark'] = $mark;
            $submitteddata['-maxmark'] = $this->maxmark;
        }
        $this->process_action($submitteddata, $timestamp, $userid);
    }