original_string: protected function get_timestart() {
          global $USER;
          if ($this->timestart === null) {
              $this->timestart = round(time() - COURSE_MAX_RECENT_PERIOD, -2); // better db caching for guests - 100 seconds
  
              if (!isguestuser()) {
                  if (!empty($USER->lastcourseaccess[$this->page->course->id])) {
                      if ($USER->lastcourseaccess[$this->page->course->id] > $this->timestart) {
                          $this->timestart = $USER->lastcourseaccess[$this->page->course->id];
                      }
                  }
              }
          }
          return $this->timestart;
      }
code: protected function get_timestart() {
          global $USER;
          if ($this->timestart === null) {
              $this->timestart = round(time() - COURSE_MAX_RECENT_PERIOD, -2); // better db caching for guests - 100 seconds
  
              if (!isguestuser()) {
                  if (!empty($USER->lastcourseaccess[$this->page->course->id])) {
                      if ($USER->lastcourseaccess[$this->page->course->id] > $this->timestart) {
                          $this->timestart = $USER->lastcourseaccess[$this->page->course->id];
                      }
                  }
              }
          }
          return $this->timestart;
      }
code_tokens: protected function get_timestart ( ) { global $ USER ; if ( $ this -> timestart === null ) { $ this -> timestart = round ( time ( ) - COURSE_MAX_RECENT_PERIOD , - 2 ) ; // better db caching for guests - 100 seconds if ( ! isguestuser ( ) ) { if ( ! empty ( $ USER -> lastcourseaccess [ $ this -> page -> course -> id ] ) ) { if ( $ USER -> lastcourseaccess [ $ this -> page -> course -> id ] > $ this -> timestart ) { $ this -> timestart = $ USER -> lastcourseaccess [ $ this -> page -> course -> id ] ; } } } } return $ this -> timestart ; }
docstring: Returns the time since when we want to show recent activity
  
  For guest users it is 2 days, for registered users it is the time of last access to the course
  
  @return int
docstring_tokens: Returns the time since when we want to show recent activity