original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Processes one grading definition element
  
  @param array $data element data
docstring_tokens: Processes one grading definition element