public function get_current_manual_mark() {
        // Is there a current value in the current POST data? If so, use that.
        $mark = $this->get_submitted_var($this->get_behaviour_field_name('mark'), PARAM_RAW_TRIMMED);
        if ($mark !== null) {
            return $mark;
        }

        // Otherwise, use the stored value.
        // If the question max mark has not changed, use the stored value that was input.
        $storedmaxmark = $this->get_last_behaviour_var('maxmark');
        if ($storedmaxmark !== null && ($storedmaxmark - $this->get_max_mark()) < 0.0000005) {
            return $this->get_last_behaviour_var('mark');
        }

        // The max mark for this question has changed so we must re-scale the current mark.
        return format_float($this->get_mark(), 7, true, true);
    }