original_string: public function is_cron_required() {
          global $CFG;
  
          $name = $this->get_name();
          $versionfile = "$CFG->dirroot/enrol/$name/version.php";
          $plugin = new stdClass();
          include($versionfile);
          if (empty($plugin->cron)) {
              return false;
          }
          $lastexecuted = $this->get_config('lastcron', 0);
          if ($lastexecuted + $plugin->cron < time()) {
              return true;
          } else {
              return false;
          }
      }
code: public function is_cron_required() {
          global $CFG;
  
          $name = $this->get_name();
          $versionfile = "$CFG->dirroot/enrol/$name/version.php";
          $plugin = new stdClass();
          include($versionfile);
          if (empty($plugin->cron)) {
              return false;
          }
          $lastexecuted = $this->get_config('lastcron', 0);
          if ($lastexecuted + $plugin->cron < time()) {
              return true;
          } else {
              return false;
          }
      }
code_tokens: public function is_cron_required ( ) { global $ CFG ; $ name = $ this -> get_name ( ) ; $ versionfile = "$CFG->dirroot/enrol/$name/version.php" ; $ plugin = new stdClass ( ) ; include ( $ versionfile ) ; if ( empty ( $ plugin -> cron ) ) { return false ; } $ lastexecuted = $ this -> get_config ( 'lastcron' , 0 ) ; if ( $ lastexecuted + $ plugin -> cron < time ( ) ) { return true ; } else { return false ; } }
docstring: Reads version.php and determines if it is necessary
  to execute the cron job now.
  @return bool
docstring_tokens: Reads version . php and determines if it is necessary to execute the cron job now .