original_string: public function repaginate_n_question_per_page($slots, $number) {
          $slots = $this->get_slots_by_slot_number($slots);
          $newslots = array();
          $count = 0;
          $page = 1;
          foreach ($slots as $key => $slot) {
              for ($page + $count; $page < ($number + $count + 1); $page++) {
                  if ($slot->slot >= $page) {
                      $slot->page = $page;
                      $count++;
                  }
              }
              $newslots[$slot->id] = $slot;
          }
          return $newslots;
      }
code: public function repaginate_n_question_per_page($slots, $number) {
          $slots = $this->get_slots_by_slot_number($slots);
          $newslots = array();
          $count = 0;
          $page = 1;
          foreach ($slots as $key => $slot) {
              for ($page + $count; $page < ($number + $count + 1); $page++) {
                  if ($slot->slot >= $page) {
                      $slot->page = $page;
                      $count++;
                  }
              }
              $newslots[$slot->id] = $slot;
          }
          return $newslots;
      }
code_tokens: public function repaginate_n_question_per_page ( $ slots , $ number ) { $ slots = $ this -> get_slots_by_slot_number ( $ slots ) ; $ newslots = array ( ) ; $ count = 0 ; $ page = 1 ; foreach ( $ slots as $ key => $ slot ) { for ( $ page + $ count ; $ page < ( $ number + $ count + 1 ) ; $ page ++ ) { if ( $ slot -> slot >= $ page ) { $ slot -> page = $ page ; $ count ++ ; } } $ newslots [ $ slot -> id ] = $ slot ; } return $ newslots ; }
docstring: Return the slots with the new pagination, regardless of current pagination.
  @param stdClass[] $slots the slots to repaginate.
  @param int $number number of question per page
  @return stdClass[] the updated slots.
docstring_tokens: Return the slots with the new pagination regardless of current pagination .