original_string: public function get_time_restriction_status() {
          if ($this->can_manage()) {
              return false;
          }
  
          if (!$this->is_accessible()) {
              if ($this->properties->deadline != 0 && time() > $this->properties->deadline) {
                  $status = ['reason' => 'lessonclosed', 'time' => $this->properties->deadline];
              } else {
                  $status = ['reason' => 'lessonopen', 'time' => $this->properties->available];
              }
              return (object) $status;
          }
          return false;
      }
code: public function get_time_restriction_status() {
          if ($this->can_manage()) {
              return false;
          }
  
          if (!$this->is_accessible()) {
              if ($this->properties->deadline != 0 && time() > $this->properties->deadline) {
                  $status = ['reason' => 'lessonclosed', 'time' => $this->properties->deadline];
              } else {
                  $status = ['reason' => 'lessonopen', 'time' => $this->properties->available];
              }
              return (object) $status;
          }
          return false;
      }
code_tokens: public function get_time_restriction_status ( ) { if ( $ this -> can_manage ( ) ) { return false ; } if ( ! $ this -> is_accessible ( ) ) { if ( $ this -> properties -> deadline != 0 && time ( ) > $ this -> properties -> deadline ) { $ status = [ 'reason' => 'lessonclosed' , 'time' => $ this -> properties -> deadline ] ; } else { $ status = [ 'reason' => 'lessonopen' , 'time' => $ this -> properties -> available ] ; } return ( object ) $ status ; } return false ; }
docstring: Check if time restriction is applied.
  
  @return mixed false if  there aren't restrictions or an object with the restriction information
  @since  Moodle 3.3
docstring_tokens: Check if time restriction is applied .