original_string: public function shuffle_anonym_responses() {
          global $DB;
          $params = array('feedback' => $this->feedback->id,
              'random_response' => 0,
              'anonymous_response' => FEEDBACK_ANONYMOUS_YES);
  
          if ($DB->count_records('feedback_completed', $params, 'random_response')) {
              // Get all of the anonymous records, go through them and assign a response id.
              unset($params['random_response']);
              $feedbackcompleteds = $DB->get_records('feedback_completed', $params, 'id');
              shuffle($feedbackcompleteds);
              $num = 1;
              foreach ($feedbackcompleteds as $compl) {
                  $compl->random_response = $num++;
                  $DB->update_record('feedback_completed', $compl);
              }
          }
      }
code: public function shuffle_anonym_responses() {
          global $DB;
          $params = array('feedback' => $this->feedback->id,
              'random_response' => 0,
              'anonymous_response' => FEEDBACK_ANONYMOUS_YES);
  
          if ($DB->count_records('feedback_completed', $params, 'random_response')) {
              // Get all of the anonymous records, go through them and assign a response id.
              unset($params['random_response']);
              $feedbackcompleteds = $DB->get_records('feedback_completed', $params, 'id');
              shuffle($feedbackcompleteds);
              $num = 1;
              foreach ($feedbackcompleteds as $compl) {
                  $compl->random_response = $num++;
                  $DB->update_record('feedback_completed', $compl);
              }
          }
      }
code_tokens: public function shuffle_anonym_responses ( ) { global $ DB ; $ params = array ( 'feedback' => $ this -> feedback -> id , 'random_response' => 0 , 'anonymous_response' => FEEDBACK_ANONYMOUS_YES ) ; if ( $ DB -> count_records ( 'feedback_completed' , $ params , 'random_response' ) ) { // Get all of the anonymous records, go through them and assign a response id. unset ( $ params [ 'random_response' ] ) ; $ feedbackcompleteds = $ DB -> get_records ( 'feedback_completed' , $ params , 'id' ) ; shuffle ( $ feedbackcompleteds ) ; $ num = 1 ; foreach ( $ feedbackcompleteds as $ compl ) { $ compl -> random_response = $ num ++ ; $ DB -> update_record ( 'feedback_completed' , $ compl ) ; } } }
docstring: If there are any new responses to the anonymous feedback, re-shuffle all
  responses and assign response number to each of them.
docstring_tokens: If there are any new responses to the anonymous feedback re - shuffle all responses and assign response number to each of them .