original_string: protected function store_settings($enabled, $reset, workshop_random_allocator_setting $settings, workshop_allocation_result $result) {
          global $DB;
  
  
          $data = new stdClass();
          $data->workshopid = $this->workshop->id;
          $data->enabled = $enabled;
          $data->submissionend = $this->workshop->submissionend;
          $data->settings = $settings->export_text();
  
          if ($reset) {
              $data->timeallocated = null;
              $data->resultstatus = null;
              $data->resultmessage = null;
              $data->resultlog = null;
          }
  
          $result->log($data->settings, 'debug');
  
          $current = $DB->get_record('workshopallocation_scheduled', array('workshopid' => $data->workshopid), '*', IGNORE_MISSING);
  
          if ($current === false) {
              $DB->insert_record('workshopallocation_scheduled', $data);
  
          } else {
              $data->id = $current->id;
              $DB->update_record('workshopallocation_scheduled', $data);
          }
      }
code: protected function store_settings($enabled, $reset, workshop_random_allocator_setting $settings, workshop_allocation_result $result) {
          global $DB;
  
  
          $data = new stdClass();
          $data->workshopid = $this->workshop->id;
          $data->enabled = $enabled;
          $data->submissionend = $this->workshop->submissionend;
          $data->settings = $settings->export_text();
  
          if ($reset) {
              $data->timeallocated = null;
              $data->resultstatus = null;
              $data->resultmessage = null;
              $data->resultlog = null;
          }
  
          $result->log($data->settings, 'debug');
  
          $current = $DB->get_record('workshopallocation_scheduled', array('workshopid' => $data->workshopid), '*', IGNORE_MISSING);
  
          if ($current === false) {
              $DB->insert_record('workshopallocation_scheduled', $data);
  
          } else {
              $data->id = $current->id;
              $DB->update_record('workshopallocation_scheduled', $data);
          }
      }
code_tokens: protected function store_settings ( $ enabled , $ reset , workshop_random_allocator_setting $ settings , workshop_allocation_result $ result ) { global $ DB ; $ data = new stdClass ( ) ; $ data -> workshopid = $ this -> workshop -> id ; $ data -> enabled = $ enabled ; $ data -> submissionend = $ this -> workshop -> submissionend ; $ data -> settings = $ settings -> export_text ( ) ; if ( $ reset ) { $ data -> timeallocated = null ; $ data -> resultstatus = null ; $ data -> resultmessage = null ; $ data -> resultlog = null ; } $ result -> log ( $ data -> settings , 'debug' ) ; $ current = $ DB -> get_record ( 'workshopallocation_scheduled' , array ( 'workshopid' => $ data -> workshopid ) , '*' , IGNORE_MISSING ) ; if ( $ current === false ) { $ DB -> insert_record ( 'workshopallocation_scheduled' , $ data ) ; } else { $ data -> id = $ current -> id ; $ DB -> update_record ( 'workshopallocation_scheduled' , $ data ) ; } }
docstring: Stores the pre-defined random allocation settings for later usage
  
  @param bool $enabled is the scheduled allocation enabled
  @param bool $reset reset the recent execution info
  @param workshop_random_allocator_setting $settings settings form data
  @param workshop_allocation_result $result logger
docstring_tokens: Stores the pre - defined random allocation settings for later usage