if (!$course = $DB->get_record('course', array('id'=>$courseid))) {
print_error('invalidcourseid');
}
-
+
} else {
$url->param('courseid', $courseid);
if (!$course = $DB->get_record('course', array('id'=>$courseid))) {
options[i].style.display = 'block';
if (matchingoption == -1) { //we found at least one
matchingoption = i;
- }
+ }
} else {
options[i].disabled = true;
options[i].selected = false;
options[i].style.display = 'none';
}
}
-
+
if (matchingoption == -1) { //the search didn't find any matching, color the search text in red
selector.input.className = "error";
} else {
function MoodleQuickForm_searchableselector($elementName=null, $elementLabel=null, $options=null, $attributes=null) {
//return exception if the selector is set as multiple (TODO: implement multiple support)
if (!empty($attributes) && key_exists('multiple', $attributes)) {
- throw new moodle_exception('searchableselectorcannotbemultiple');
+ throw new moodle_exception('searchableselectorcannotbemultiple');
}
//set size default to 12
if (empty($attributes) || empty($attributes['size'])) {
$PAGE->requires->js('lib/form/searchableselector.js');
$PAGE->requires->js_function_call('selector.filter_init', array(get_string('search'),$this->getAttribute('id')));
- $strHtml = '';
+ $strHtml = '';
$strHtml .= parent::toHtml(); //the select input
return $strHtml;
}
}
-
+
}
$footer = $this->opencontainers->pop('header/footer');
if (debugging() and $DB and $DB->is_transaction_started()) {
- // TODO: MDL-20625 print warning - transaction will be rolled back
+ // TODO: MDL-20625 print warning - transaction will be rolled back
}
// Provide some performance info if required
global $CFG, $DB, $SCRIPT;
// default exception handler MUST not throw any exceptions!!
-
+
if ($DB && $DB->is_transaction_started()) {
error_log('Database transaction aborted automatically in ' . $CFG->dirroot . $SCRIPT);
// note: transaction blocks should never change current $_SESSION
}
if ($result && $oldversion < 2009110800) {
require_once($CFG->libdir . '/commentlib.php');
-
+
/// Define table glossary_comments to be dropped
$table = new xmldb_table('glossary_comments');
or (!empty($data->reset_glossary_types) and in_array('main', $data->reset_glossary_types) and in_array('secondary', $data->reset_glossary_types))) {
$DB->delete_records_select('glossary_ratings', "entryid IN ($allentriessql)", $params);
- // TODO: delete comments
+ // TODO: delete comments
//$DB->delete_records_select('comments', "entryid IN ($allentriessql)", array());
$DB->delete_records_select('glossary_entries', "glossaryid IN ($allglossariessql)", $params);
// Must be logged in, if they are not then they obviously can't be this user
require_login();
-
+
// Don't want guests here, potentially saves a DB call
if (isguestuser()) {
send_file_not_found();
}
$fullpath = $context->id.$filearea.implode('/', $args);
-
+
if (!$file = $fs->get_file_by_hash(sha1($fullpath)) or $file->is_directory()) {
send_file_not_found();
}
var id2itemid = {};
/**
- * repository_client is a javascript class, it contains several static
+ * repository_client is a javascript class, it contains several static
* methods you can call it directly without creating an instance.
* If you are going to create a file picker, you need create an instance
* repo = new repository_client();
var container = new YAHOO.util.Element('repo-list-'+this.client_id);
container.set('innerHTML', '');
container.on('contentReady', function() {
- this.init_search();
+ this.init_search();
for(var i in MOODLE.repository.listing[this.client_id]) {
var repo = MOODLE.repository.listing[this.client_id][i];
var support = false;
if (empty($errorstring)) { // All is OK, let's save it
$tagnew = file_postupdate_standard_editor($tagnew, 'description', $editoroptions, $systemcontext, 'tag_description', $tag->id);
-
+
tag_description_set($tag_id, $tagnew->description, $tagnew->descriptionformat);
$tagnew->timemodified = time();
else { // new profile category
$dupfound = $duplicate;
}
-
+
if ($dupfound ) {
$errors['name'] = get_string('profilecategorynamenotunique', 'admin');
}