<?php
-// This file is part of Moodle - http://moodle.org/
-//
+// This file is part of Moodle - http://moodle.org/
+//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
* used like this:
* $id = required_param('id', PARAM_INT);
*
- * @param string $parname the name of the page parameter we want,
+ * @param string $parname the name of the page parameter we want,
* default PARAM_CLEAN
* @param int $type expected type of parameter
* @return mixed
return preg_replace('/[^a-zA-Z0-9_-]/i', '', $param);
case PARAM_SAFEPATH: // Remove everything not a-zA-Z0-9/_-
- return preg_replace('/[^a-zA-Z0-9\/_-]/i', '', $param);
+ return preg_replace('/[^a-zA-Z0-9\/_-]/i', '', $param);
case PARAM_FILE: // Strip all suspicious characters from filename
$param = preg_replace('~[[:cntrl:]]|[&<>"`\|\':\\/]~u', '', $param);
}
/**
- * Used to increment or reset email sent count
+ * Used to increment or reset email sent count
*
* @global object
* @param user $user object containing an id
}
/**
- * Increment or reset user's email bounce count
+ * Increment or reset user's email bounce count
*
* @global object
* @param user $user object containing an id
}
$cm->modplural = $modlurals[$cm->modname];
$modcontext = get_context_instance(CONTEXT_MODULE,$cm->id);
-
+
if(!empty($CFG->enableavailability)) {
- // Unfortunately the next call really wants to call
- // get_fast_modinfo, but that would be recursive, so we fake up a
+ // Unfortunately the next call really wants to call
+ // get_fast_modinfo, but that would be recursive, so we fake up a
// modinfo for it already
if(empty($minimalmodinfo)) {
$minimalmodinfo=new stdClass();
/**
* Goes through all enrolment records for the courses inside the metacourse and sync with them.
*
- * @todo finish timeend and timestart maybe we could rely on cron
+ * @todo finish timeend and timestart maybe we could rely on cron
* job to do the cleaning from time to time
*
* @global object
// regenerate session id and delete old session,
// this helps prevent session fixation attacks from the same domain
session_regenerate_id(true);
-
+
// check enrolments, load caps and setup $USER object
session_set_user($user);
/**
* Generate an email processing address
- *
+ *
* @param int $modid
* @param string $modargs
* @return string Returns email processing address
*
* @global object
* @global object
- * @param object $course
+ * @param object $course
* @param user $user A {@link $USER} object
* @return bool
*/
// Some of our arrays need $CFG.
/**
* string_manager construct method to instatiate this instance
- *
+ *
* @param string $dirroot root directory path.
* @param string $dataroot Path to the data root.
* @param string $admin path to the admin directory.
/**
* This returns an array of all the types of plugin that may have language
- * strings.
+ * strings.
*
* The array keys are the lang file prefix, like qtype_, and the value is
* an array of paths relative to $CFG->dirroot.
* @param string $module The module the help file is associated with
* @param string $forcelang override the default language
* @param bool $skiplocal Skip local help files
- * @return array An array containing the filepath, and then the language
+ * @return array An array containing the filepath, and then the language
*/
public function find_help_file($file, $module, $forcelang, $skiplocal) {
if ($forcelang) {
if (!is_null($this->installstrings) && in_array($identifier, $this->installstrings)) {
$module = 'installer';
- $locations = array_merge(array($this->dirroot . '/install/lang/' => ''), $locations);
+ $locations = array_merge(array($this->dirroot . '/install/lang/' => ''), $locations);
}
if ($extralocations) {
/**
* Returns a list of language codes and their full names
* hides the _local files from everyone.
- *
+ *
* @global object
* @param bool $refreshcache force refreshing of lang cache
* @param bool $returnall ignore langlist, return all languages available
*
* @global object
* @global object
- * @param array $event An associative array representing an event from the calendar table.
+ * @param array $event An associative array representing an event from the calendar table.
* The event will be identified by the id field. The object event should include the following:
* <ul>
* <li><b>$event->name</b> - Name for the event
} else {
list($type, $plugin) = explode('_', $component, 2);
$path = get_plugin_directory($type, $plugin, $fullpaths);
- }
+ }
return $path;
}
* This function was originally used for standar Moodle plugins, please use
* new get_plugin_list() now.
*
- * This function is used for general directory listing and backwards compability.
+ * This function is used for general directory listing and backwards compability.
*
* @param string $directory relatice directory from root
* @param string $exclude dir name to exclude from the list (defaults to none)
// we need this special case because we support subplugins in modules,
// otherwise it would end up in infinite loop
if ($name === 'NEWMODULE') {
- //somebody forgot to rename the module template
+ //somebody forgot to rename the module template
return false;
}
include_once("$CFG->dirroot/mod/$name/lib.php");
return true;
}
-?>