original_string: public function prevent_new_attempt($numprevattempts, $lastattempt) {
          $reasons = array();
          foreach ($this->rules as $rule) {
              $reasons = $this->accumulate_messages($reasons,
                      $rule->prevent_new_attempt($numprevattempts, $lastattempt));
          }
          return $reasons;
      }
code: public function prevent_new_attempt($numprevattempts, $lastattempt) {
          $reasons = array();
          foreach ($this->rules as $rule) {
              $reasons = $this->accumulate_messages($reasons,
                      $rule->prevent_new_attempt($numprevattempts, $lastattempt));
          }
          return $reasons;
      }
code_tokens: public function prevent_new_attempt ( $ numprevattempts , $ lastattempt ) { $ reasons = array ( ) ; foreach ( $ this -> rules as $ rule ) { $ reasons = $ this -> accumulate_messages ( $ reasons , $ rule -> prevent_new_attempt ( $ numprevattempts , $ lastattempt ) ) ; } return $ reasons ; }
docstring: Whether or not a user should be allowed to start a new attempt at this quiz now.
  If there are any restrictions in force now, return an array of reasons why access
  should be blocked. If access is OK, return false.
  
  @param int $numattempts the number of previous attempts this user has made.
  @param object|false $lastattempt information about the user's last completed attempt.
  if there is not a previous attempt, the false is passed.
  @return mixed An array of reason why access is not allowed, or an empty array
  (== false) if access should be allowed.
docstring_tokens: Whether or not a user should be allowed to start a new attempt at this quiz now . If there are any restrictions in force now return an array of reasons why access should be blocked . If access is OK return false .