original_string: public function process_submission() {
          global $DB;
          // Delete all records, then add back the ones that should be allowed.
          $DB->delete_records($this->tablename);
          foreach ($this->roles as $fromroleid => $notused) {
              foreach ($this->roles as $targetroleid => $alsonotused) {
                  if (optional_param('s_' . $fromroleid . '_' . $targetroleid, false, PARAM_BOOL)) {
                      $this->set_allow($fromroleid, $targetroleid);
                  }
              }
          }
      }
code: public function process_submission() {
          global $DB;
          // Delete all records, then add back the ones that should be allowed.
          $DB->delete_records($this->tablename);
          foreach ($this->roles as $fromroleid => $notused) {
              foreach ($this->roles as $targetroleid => $alsonotused) {
                  if (optional_param('s_' . $fromroleid . '_' . $targetroleid, false, PARAM_BOOL)) {
                      $this->set_allow($fromroleid, $targetroleid);
                  }
              }
          }
      }
code_tokens: public function process_submission ( ) { global $ DB ; // Delete all records, then add back the ones that should be allowed. $ DB -> delete_records ( $ this -> tablename ) ; foreach ( $ this -> roles as $ fromroleid => $ notused ) { foreach ( $ this -> roles as $ targetroleid => $ alsonotused ) { if ( optional_param ( 's_' . $ fromroleid . '_' . $ targetroleid , false , PARAM_BOOL ) ) { $ this -> set_allow ( $ fromroleid , $ targetroleid ) ; } } } }
docstring: Update the data with the new settings submitted by the user.
docstring_tokens: Update the data with the new settings submitted by the user .