original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Get the total mark for all questions in this usage.
  @return number The sum of marks of all the question_attempts in this usage.
docstring_tokens: Get the total mark for all questions in this usage .