original_string: public function process_workshopform_accumulative_dimension($data) {
          global $DB;
  
          $data = (object)$data;
          $oldid = $data->id;
  
          $data->workshopid = $this->get_new_parentid('workshop');
          if ($data->grade < 0) { // scale found, get mapping
              $data->grade = -($this->get_mappingid('scale', abs($data->grade)));
          }
  
          $newitemid = $DB->insert_record('workshopform_accumulative', $data);
          $this->set_mapping($this->get_namefor('dimension'), $oldid, $newitemid, true);
  
          // Process files for this workshopform_accumulative->id only
          $this->add_related_files('workshopform_accumulative', 'description', $this->get_namefor('dimension'), null, $oldid);
      }
code: public function process_workshopform_accumulative_dimension($data) {
          global $DB;
  
          $data = (object)$data;
          $oldid = $data->id;
  
          $data->workshopid = $this->get_new_parentid('workshop');
          if ($data->grade < 0) { // scale found, get mapping
              $data->grade = -($this->get_mappingid('scale', abs($data->grade)));
          }
  
          $newitemid = $DB->insert_record('workshopform_accumulative', $data);
          $this->set_mapping($this->get_namefor('dimension'), $oldid, $newitemid, true);
  
          // Process files for this workshopform_accumulative->id only
          $this->add_related_files('workshopform_accumulative', 'description', $this->get_namefor('dimension'), null, $oldid);
      }
code_tokens: public function process_workshopform_accumulative_dimension ( $ data ) { global $ DB ; $ data = ( object ) $ data ; $ oldid = $ data -> id ; $ data -> workshopid = $ this -> get_new_parentid ( 'workshop' ) ; if ( $ data -> grade < 0 ) { // scale found, get mapping $ data -> grade = - ( $ this -> get_mappingid ( 'scale' , abs ( $ data -> grade ) ) ) ; } $ newitemid = $ DB -> insert_record ( 'workshopform_accumulative' , $ data ) ; $ this -> set_mapping ( $ this -> get_namefor ( 'dimension' ) , $ oldid , $ newitemid , true ) ; // Process files for this workshopform_accumulative->id only $ this -> add_related_files ( 'workshopform_accumulative' , 'description' , $ this -> get_namefor ( 'dimension' ) , null , $ oldid ) ; }
docstring: Processes the workshopform_accumulative_dimension element
docstring_tokens: Processes the workshopform_accumulative_dimension element