original_string: public function set_peer_grade($assessmentid, $grade) {
          global $DB;
  
          if (is_null($grade)) {
              return false;
          }
          $data = new stdclass();
          $data->id = $assessmentid;
          $data->grade = $grade;
          $data->timemodified = time();
          $DB->update_record('workshop_assessments', $data);
          return $grade;
      }
code: public function set_peer_grade($assessmentid, $grade) {
          global $DB;
  
          if (is_null($grade)) {
              return false;
          }
          $data = new stdclass();
          $data->id = $assessmentid;
          $data->grade = $grade;
          $data->timemodified = time();
          $DB->update_record('workshop_assessments', $data);
          return $grade;
      }
code_tokens: public function set_peer_grade ( $ assessmentid , $ grade ) { global $ DB ; if ( is_null ( $ grade ) ) { return false ; } $ data = new stdclass ( ) ; $ data -> id = $ assessmentid ; $ data -> grade = $ grade ; $ data -> timemodified = time ( ) ; $ DB -> update_record ( 'workshop_assessments' , $ data ) ; return $ grade ; }
docstring: Saves a raw grade for submission as calculated from the assessment form fields
  
  @param array $assessmentid assessment record id, must exists
  @param mixed $grade        raw percentual grade from 0.00000 to 100.00000
  @return false|float        the saved grade
docstring_tokens: Saves a raw grade for submission as calculated from the assessment form fields