public function get_total_mark() {
        $mark = 0;
        foreach ($this->questionattempts as $qa) {
            if ($qa->get_max_mark() > 0 && $qa->get_state() == question_state::$needsgrading) {
                return null;
            }
            $mark += $qa->get_mark();
        }
        return $mark;
    }
public function get_total_mark() {
        $mark = 0;
        foreach ($this->questionattempts as $qa) {
            if ($qa->get_max_mark() > 0 && $qa->get_state() == question_state::$needsgrading) {
                return null;
            }
            $mark += $qa->get_mark();
        }
        return $mark;
    }
public function get_total_mark ( ) { $ mark = 0 ; foreach ( $ this -> questionattempts as $ qa ) { if ( $ qa -> get_max_mark ( ) > 0 && $ qa -> get_state ( ) == question_state :: $ needsgrading ) { return null ; } $ mark += $ qa -> get_mark ( ) ; } return $ mark ; }
Get the total mark for all questions in this usage.
@return number The sum of marks of all the question_attempts in this usage.
Get the total mark for all questions in this usage .