original_string: public function check_file_access($slot, $reviewing, $contextid, $component,
              $filearea, $args, $forcedownload) {
          $options = $this->get_display_options($reviewing);
  
          // Check permissions - warning there is similar code in review.php and
          // reviewquestion.php. If you change on, change them all.
          if ($reviewing && $this->is_own_attempt() && !$options->attempt) {
              return false;
          }
  
          if ($reviewing && !$this->is_own_attempt() && !$this->is_review_allowed()) {
              return false;
          }
  
          return $this->quba->check_file_access($slot, $options,
                  $component, $filearea, $args, $forcedownload);
      }
code: public function check_file_access($slot, $reviewing, $contextid, $component,
              $filearea, $args, $forcedownload) {
          $options = $this->get_display_options($reviewing);
  
          // Check permissions - warning there is similar code in review.php and
          // reviewquestion.php. If you change on, change them all.
          if ($reviewing && $this->is_own_attempt() && !$options->attempt) {
              return false;
          }
  
          if ($reviewing && !$this->is_own_attempt() && !$this->is_review_allowed()) {
              return false;
          }
  
          return $this->quba->check_file_access($slot, $options,
                  $component, $filearea, $args, $forcedownload);
      }
code_tokens: public function check_file_access ( $ slot , $ reviewing , $ contextid , $ component , $ filearea , $ args , $ forcedownload ) { $ options = $ this -> get_display_options ( $ reviewing ) ; // Check permissions - warning there is similar code in review.php and // reviewquestion.php. If you change on, change them all. if ( $ reviewing && $ this -> is_own_attempt ( ) && ! $ options -> attempt ) { return false ; } if ( $ reviewing && ! $ this -> is_own_attempt ( ) && ! $ this -> is_review_allowed ( ) ) { return false ; } return $ this -> quba -> check_file_access ( $ slot , $ options , $ component , $ filearea , $ args , $ forcedownload ) ; }
docstring: Check wheter access should be allowed to a particular file.
  
  @param int $id the id of a question in this quiz attempt.
  @param bool $reviewing is the being printed on an attempt or a review page.
  @param string $thispageurl the URL of the page this question is being printed on.
  @return string HTML for the question in its current state.
docstring_tokens: Check wheter access should be allowed to a particular file .