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;
    }
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;
    }
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 ; }
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
Saves a raw grade for submission as calculated from the assessment form fields