original_string: public static function is_online($lastaccess) {
          global $CFG;
  
          // Variable to check if we consider this user online or not.
          $timetoshowusers = 300; // Seconds default.
          if (isset($CFG->block_online_users_timetosee)) {
              $timetoshowusers = $CFG->block_online_users_timetosee * 60;
          }
          $time = time() - $timetoshowusers;
  
          return $lastaccess >= $time;
      }
code: public static function is_online($lastaccess) {
          global $CFG;
  
          // Variable to check if we consider this user online or not.
          $timetoshowusers = 300; // Seconds default.
          if (isset($CFG->block_online_users_timetosee)) {
              $timetoshowusers = $CFG->block_online_users_timetosee * 60;
          }
          $time = time() - $timetoshowusers;
  
          return $lastaccess >= $time;
      }
code_tokens: public static function is_online ( $ lastaccess ) { global $ CFG ; // Variable to check if we consider this user online or not. $ timetoshowusers = 300 ; // Seconds default. if ( isset ( $ CFG -> block_online_users_timetosee ) ) { $ timetoshowusers = $ CFG -> block_online_users_timetosee * 60 ; } $ time = time ( ) - $ timetoshowusers ; return $ lastaccess >= $ time ; }
docstring: Helper function for checking the time meets the 'online' condition.
  
  @param int $lastaccess
  @return boolean
docstring_tokens: Helper function for checking the time meets the online condition .