protected function process_grading_definition($data) {
        global $DB;

        $task = $this->get_task();
        $data = (object)$data;
        $oldid = $data->id;
        $data->areaid = $this->get_new_parentid('grading_area');
        $data->copiedfromid = null;
        $data->timecreated = time();
        $data->usercreated = $task->get_userid();
        $data->timemodified = $data->timecreated;
        $data->usermodified = $data->usercreated;

        $newid = $DB->insert_record('grading_definitions', $data);
        $this->set_mapping('grading_definition', $oldid, $newid, true);
    }
protected function process_grading_definition($data) {
        global $DB;

        $task = $this->get_task();
        $data = (object)$data;
        $oldid = $data->id;
        $data->areaid = $this->get_new_parentid('grading_area');
        $data->copiedfromid = null;
        $data->timecreated = time();
        $data->usercreated = $task->get_userid();
        $data->timemodified = $data->timecreated;
        $data->usermodified = $data->usercreated;

        $newid = $DB->insert_record('grading_definitions', $data);
        $this->set_mapping('grading_definition', $oldid, $newid, true);
    }
protected function process_grading_definition ( $ data ) { global $ DB ; $ task = $ this -> get_task ( ) ; $ data = ( object ) $ data ; $ oldid = $ data -> id ; $ data -> areaid = $ this -> get_new_parentid ( 'grading_area' ) ; $ data -> copiedfromid = null ; $ data -> timecreated = time ( ) ; $ data -> usercreated = $ task -> get_userid ( ) ; $ data -> timemodified = $ data -> timecreated ; $ data -> usermodified = $ data -> usercreated ; $ newid = $ DB -> insert_record ( 'grading_definitions' , $ data ) ; $ this -> set_mapping ( 'grading_definition' , $ oldid , $ newid , true ) ; }
Processes one grading definition element

@param array $data element data
Processes one grading definition element