original_string: public function validate_manual_mark($currentmark) {
          if ($currentmark === null || $currentmark === '') {
              return '';
          }
  
          $mark = question_utils::clean_param_mark($currentmark);
          if ($mark === null) {
              return get_string('manualgradeinvalidformat', 'question');
          }
  
          $maxmark = $this->get_max_mark();
          if ($mark > $maxmark * $this->get_max_fraction() || $mark < $maxmark * $this->get_min_fraction()) {
              return get_string('manualgradeoutofrange', 'question');
          }
  
          return '';
      }
code: public function validate_manual_mark($currentmark) {
          if ($currentmark === null || $currentmark === '') {
              return '';
          }
  
          $mark = question_utils::clean_param_mark($currentmark);
          if ($mark === null) {
              return get_string('manualgradeinvalidformat', 'question');
          }
  
          $maxmark = $this->get_max_mark();
          if ($mark > $maxmark * $this->get_max_fraction() || $mark < $maxmark * $this->get_min_fraction()) {
              return get_string('manualgradeoutofrange', 'question');
          }
  
          return '';
      }
code_tokens: public function validate_manual_mark ( $ currentmark ) { if ( $ currentmark === null || $ currentmark === '' ) { return '' ; } $ mark = question_utils :: clean_param_mark ( $ currentmark ) ; if ( $ mark === null ) { return get_string ( 'manualgradeinvalidformat' , 'question' ) ; } $ maxmark = $ this -> get_max_mark ( ) ; if ( $ mark > $ maxmark * $ this -> get_max_fraction ( ) || $ mark < $ maxmark * $ this -> get_min_fraction ( ) ) { return get_string ( 'manualgradeoutofrange' , 'question' ) ; } return '' ; }
docstring: Validate the manual mark for a question.
  @param string $currentmark the user input (e.g. '1,0', '1,0' or 'invalid'.
  @return string any errors with the value, or '' if it is OK.
docstring_tokens: Validate the manual mark for a question .