if (count($userlist)) {
list($notin_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u', false);
$params['authtype'] = $this->authtype;
- $sql = "SELECT u.id, u.username, u.email, u.auth
+ $sql = "SELECT u.*
FROM {user} u
WHERE u.auth=:authtype AND u.deleted=0 AND u.username $notin_sql";
} else {
- $sql = "SELECT u.id, u.username, u.email, u.auth
+ $sql = "SELECT u.*
FROM {user} u
WHERE u.auth=:authtype AND u.deleted=0";
$params = array();
// Find users in DB that aren't in ldap -- to be removed!
// this is still not as scalable (but how often do we mass delete?)
if ($this->config->removeuser !== AUTH_REMOVEUSER_KEEP) {
- $sql = 'SELECT u.id, u.username, u.email, u.auth
+ $sql = 'SELECT u.*
FROM {user} u
LEFT JOIN {tmp_extuser} e ON (u.username = e.username AND u.mnethostid = e.mnethostid)
WHERE u.auth = ?
// attach format plugin structure to $module element, only one allowed
$this->add_plugin_structure('format', $module, false);
- // attach plagiarism plugin structure to $module element, only one allowed
- $this->add_plugin_structure('plagiarism', $module, false);
+ // attach plagiarism plugin structure to $module element, there can be potentially
+ // many plagiarism plugins storing information about this course
+ $this->add_plugin_structure('plagiarism', $module, true);
// Define the tree
$module->add_child($availinfo);
// course reports can save course data if required
$this->add_plugin_structure('coursereport', $course, true);
- // attach plagiarism plugin structure to $course element, only one allowed
- $this->add_plugin_structure('plagiarism', $course, false);
+ // attach plagiarism plugin structure to $course element, there can be potentially
+ // many plagiarism plugins storing information about this course
+ $this->add_plugin_structure('plagiarism', $course, true);
// Build the tree
$category = new restore_path_element('question_category', '/question_categories/question_category');
$question = new restore_path_element('question', '/question_categories/question_category/questions/question');
+ $hint = new restore_path_element('question_hint',
+ '/question_categories/question_category/questions/question/question_hints/question_hint');
// Apply for 'qtype' plugins optional paths at question level
$this->add_plugin_structure('qtype', $question);
- return array($category, $question);
+ return array($category, $question, $hint);
}
protected function process_question_category($data) {
// Adjust some columns
$data->questionid = $newquestionid;
// Insert record
- $newitemid = $DB->insert_record('question_answers', $data);
+ $newitemid = $DB->insert_record('question_hints', $data);
- // The question existed, we need to map the existing question_answers
+ // The question existed, we need to map the existing question_hints
} else {
- // Look in question_answers by answertext matching
+ // Look in question_hints by hint text matching
$sql = 'SELECT id
FROM {question_hints}
WHERE questionid = ?
$params = array($newquestionid, $data->hint);
$newitemid = $DB->get_field_sql($sql, $params);
// If we haven't found the newitemid, something has gone really wrong, question in DB
- // is missing answers, exception
+ // is missing hints, exception
if (!$newitemid) {
$info = new stdClass();
$info->filequestionid = $oldquestionid;
throw new restore_step_exception('error_question_hint_missing_in_db', $info);
}
}
- // Create mapping (we'll use this intensively when restoring question_states. And also answerfeedback files)
+ // Create mapping (I'm not sure if this is really needed?)
$this->set_mapping('question_hint', $oldid, $newitemid);
}
$course->sortorder = 0;
$course->timecreated = time();
$course->timemodified = $course->timecreated;
- $course->visible = $category->visible;
+ // forcing skeleton courses to be hidden instead of going by $category->visible , until MDL-27790 is resolved.
+ $course->visible = 0;
$courseid = $DB->insert_record('course', $course);
* @var int
*/
protected $totalcommentcount = null;
- /**
- * When set to true any user to the system is able to view comments.
- *
- * This can be set to true by a plugin by implementing a allow_anonymous_access callback.
- * By default it is false except on the front page.
- *
- * @var bool
- */
- protected $allowanonymousaccess = false;
/**#@+
* static variable will be used by non-js comments UI
$this->comment_param->commentarea = $this->commentarea;
$this->comment_param->itemid = $this->itemid;
- $this->allowanonymousaccess = false;
- // By default everyone can view comments on the front page
- if ($this->context->contextlevel == CONTEXT_COURSE && $this->context->instanceid == SITEID) {
- $this->allowanonymousaccess = true;
- } else if ($this->context->contextlevel == CONTEXT_MODULE && $this->courseid == SITEID) {
- $this->allowanonymousaccess = true;
- }
- if (!empty($this->plugintype) && !empty($this->pluginname)) {
- // Plugins can override this if they wish.
- $this->allowanonymousaccess = plugin_callback($this->plugintype, $this->pluginname, 'comment', 'allow_anonymous_access', array($this), $this->allowanonymousaccess);
- }
-
// setup notoggle
if (!empty($options->notoggle)) {
$this->set_notoggle($options->notoggle);
$this->viewcap = has_capability('moodle/comment:view', $this->context);
if (!empty($this->plugintype)) {
$permissions = plugin_callback($this->plugintype, $this->pluginname, 'comment', 'permissions', array($this->comment_param), array('post'=>false, 'view'=>false));
- if ($this->allowanonymousaccess) {
- $this->postcap = $permissions['post'];
- $this->viewcap = $permissions['view'];
- } else {
- $this->postcap = $this->postcap && $permissions['post'];
- $this->viewcap = $this->viewcap && $permissions['view'];
- }
+ $this->postcap = $this->postcap && $permissions['post'];
+ $this->viewcap = $this->viewcap && $permissions['view'];
}
}
header("Pragma: public");
echo get_string('savedat').userdate(time(), $strftimedatetime)."\n";
- echo $text;
+ echo $text."\n";
if (empty($logs['logs'])) {
return true;
$course->summaryformat = FORMAT_MOODLE;
}
echo highlight($highlightterms, format_text($course->summary, $course->summaryformat, $options, $course->id));
- if ((!isloggedin() || is_siteadmin()) && $icons = enrol_get_course_info_icons($course)) {
+ if ($icons = enrol_get_course_info_icons($course)) {
echo html_writer::start_tag('div', array('class'=>'enrolmenticons'));
foreach ($icons as $icon) {
echo $OUTPUT->render($icon);
require_login($course);
require_capability('moodle/course:enrolconfig', $context);
+require_capability('enrol/cohort:config', $context);
$PAGE->set_url('/enrol/cohort/addinstance.php', array('id'=>$course->id));
$PAGE->set_pagelayout('admin');
break;
case 'enrolcohort':
require_capability('moodle/course:enrolconfig', $context);
+ require_capability('enrol/cohort:config', $context);
$roleid = required_param('roleid', PARAM_INT);
$cohortid = required_param('cohortid', PARAM_INT);
enrol_cohort_sync($manager->get_course()->id);
break;
case 'enrolcohortusers':
- require_capability('moodle/course:enrolconfig', $context);
+ require_capability('enrol/manual:enrol', $context);
$roleid = required_param('roleid', PARAM_INT);
$cohortid = required_param('cohortid', PARAM_INT);
$result = enrol_cohort_enrol_all_users($manager, $cohortid, $roleid);
+
+ $roles = $manager->get_assignable_roles();
+ $cohorts = enrol_cohort_get_cohorts($manager);
+ if (!array_key_exists($cohortid, $cohorts) || !array_key_exists($roleid, $roles)) {
+ throw new enrol_ajax_exception('errorenrolcohort');
+ }
if ($result === false) {
throw new enrol_ajax_exception('errorenrolcohortusers');
}
$button->strings_for_js('users', 'moodle');
// No point showing this at all if the user cant manually enrol users
- $hasmanualinstance = has_capability('enrol/manual:manage', $manager->get_context()) && $manager->has_instance('manual');
+ $hasmanualinstance = has_capability('enrol/manual:enrol', $manager->get_context()) && $manager->has_instance('manual');
$modules = array('moodle-enrol_cohort-quickenrolment', 'moodle-enrol_cohort-quickenrolment-skin');
$function = 'M.enrol_cohort.quickenrolment.init';
$string['flashanimation'] = 'Flash animation';
$string['flashanimation_help'] = 'Files with extension *.swf. For security reasons this filter is used only in trusted texts.';
$string['flashvideo'] = 'Flash video';
-$string['flashvideo_help'] = 'Files with extension *.flv and *.f4v. Plays video clips using Flowplayer, requires Flash plugin and javascript. Uses HTML 5 video fallback if multiple sources psecified.';
+$string['flashvideo_help'] = 'Files with extension *.flv and *.f4v. Plays video clips using Flowplayer, requires Flash plugin and javascript. Uses HTML 5 video fallback if multiple sources specified.';
$string['html5audio'] = 'HTML 5 audio';
$string['html5audio_help'] = 'Audio files with extension *.ogg, *.aac and others. It is compatible with latest web browsers only, unfortunately there is no format that is supported by all browsers.
Workaround is to specify fallbacks separated with # (ex: http://example.org/audio.aac#http://example.org/audio.aac#http://example.org/audio.mp3#), QuickTime player is used as a fallback for old browsers, fallback can be any audio type.';
install_print_help_page($_GET['help']);
}
-// send css?
-if (isset($_GET['css'])) {
- install_css_styles();
-}
-
//first time here? find out suitable dataroot
if (is_null($CFG->dataroot)) {
$CFG->dataroot = dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'moodledata';
--- /dev/null
+<?php
+// 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
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// 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/>.
+
+/**
+ * This script prints basic CSS for the installer
+ *
+ * @package core
+ * @subpackage install
+ * @copyright 2011 Petr Skoda (http://skodak.org)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+if (file_exists(dirname(dirname(__FILE__)).'/config.php')) {
+ // already installed
+ die;
+}
+
+// include only the necessary stuff from themes, keep this small otherwise IE will complain...
+$files = array(
+ 'base/style/pagelayout.css',
+ 'base/style/core.css',
+ 'standard/style/core.css',
+ 'standard/style/css3.css');
+
+
+$content = '';
+
+foreach($files as $file) {
+ $content .= file_get_contents(dirname(dirname(__FILE__)).'/theme/'.$file) . "\n";
+}
+
+$content .= "
+
+h2 {
+ text-align:center;
+}
+
+#installdiv {
+ width: 800px;
+ margin-left:auto;
+ margin-right:auto;
+}
+
+#installdiv dt {
+ font-weight: bold;
+}
+
+#installdiv dd {
+ padding-bottom: 0.5em;
+}
+
+.stage {
+ margin-top: 2em;
+ margin-bottom: 2em;
+ width: 100%;
+ padding:25px;
+}
+
+#installform {
+ width: 100%;
+}
+
+#nav_buttons input {
+ margin: 5px;
+}
+
+#envresult {
+ text-align:left;
+ width: auto;
+ margin-left:10em;
+}
+
+#envresult dd {
+ color: red;
+}
+
+.formrow {
+ clear:both;
+ text-align:left;
+ padding: 8px;
+}
+
+.formrow label.formlabel {
+ display:block;
+ float:left;
+ width: 260px;
+ margin-right:5px;
+ text-align:right;
+}
+
+.formrow .forminput {
+ display:block;
+ float:left;
+}
+
+fieldset {
+ text-align:center;
+ border:none;
+}
+
+.hint {
+ display:block;
+ clear:both;
+ padding-left: 265px;
+ color: red;
+}
+
+.configphp {
+ text-align:left;
+ background-color:white;
+ padding:1em;
+ width:95%;
+}
+
+.stage6 .stage {
+ font-weight: bold;
+ color: red;
+}
+
+";
+
+// fix used urls
+$content = str_replace('[[pix:theme|hgradient]]', '../theme/standard/pix/hgradient.jpg', $content);
+$content = str_replace('[[pix:theme|vgradient]]', '../theme/standard/pix/vgradient.jpg', $content);
+
+@header('Content-Disposition: inline; filename="css.php"');
+@header('Cache-Control: no-store, no-cache, must-revalidate');
+@header('Cache-Control: post-check=0, pre-check=0', false);
+@header('Pragma: no-cache');
+@header('Expires: Mon, 20 Aug 1969 09:23:00 GMT');
+@header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
+@header('Accept-Ranges: none');
+@header('Content-Type: text/css; charset=utf-8');
+
+echo $content;
$string['availablelangs'] = 'Списък на наличните езици';
$string['chooselanguagehead'] = 'Изберете език';
$string['chooselanguagesub'] = 'Моля, изберете език за инсталацията. Този език ще бъде, също така, език по подразбиране на сайта, но може да бъде променен и по-късно след инсталирането.';
+$string['databasehost'] = 'Хост на базата данни';
+$string['databasename'] = 'Потребителско име за базата данни';
+$string['databasetypehead'] = 'Избиране на драйвер за база данни';
$string['dataroot'] = 'Директория за данни';
+$string['dbprefix'] = 'Представка на таблиците';
$string['dirroot'] = 'Директория на Moodle';
$string['installation'] = 'Инсталиране';
$string['paths'] = 'Пътища';
$string['pathshead'] = 'Потвърждаване на пътищата';
$string['pathssubdataroot'] = 'Тази директория е място, където Moodle, записва качваните файлове. Тази директория трябва да е достъпна за четене И ЗА ЗАПИС от потребителя на интернет сървъра (обикновено \'nobody\' или \'apache\'), но не трябва да е достъпна пряко през Интернет. Инталаторът ще се опита да създаде директорията, ако тя не съществува.';
$string['pathssubdirroot'] = 'Пълен път до директорията на Moodle.';
-$string['pathssubwwwroot'] = 'Пълен интернет адрес, на който ще се отваря Moodle. Не е възможно Moodle да се отваря чрез различни адреси. Ако Вашият сайт има няколко адреса трябва на всеки от другите адреси да направите HTML пренасочване към този. Ако Вашият сайт се отваря както глобално от Интернет, така и от локална мрежа, настройте DNS така че потребителите от локалната мрежа също да могат да ползват глобалния адрес. Ако адресът не е коректен, моля, променете адреса в браузъра си и започнете инсталирането с правилния адрес.';
+$string['pathssubwwwroot'] = 'Пълен интернет адрес, на който ще се отваря Moodle. Не е възможно Moodle да се отваря чрез различни адреси. Ако Вашият сайт има няколко адреса трябва на всеки от другите адреси да направите пренасочване към този. Ако Вашият сайт се отваря както глобално от Интернет, така и от локална мрежа, настройте DNS, така че потребителите от локалната мрежа също да могат да ползват глобалния адрес. Ако адресът не е коректен, моля, променете адреса в браузъра си и започнете инсталирането с правилния адрес.';
$string['wwwroot'] = 'Уеб адрес';
$string['errorsinenvironment'] = 'Échec de la vérification de l\'environnement !';
$string['installation'] = 'Installation';
$string['langdownloaderror'] = 'La langue {$a} n\'a pas pu être téléchargée. La suite de l\'installation se déroulera en anglais. Vous pourrez télécharger et installer d\'autres langues à la fin de l\'installation';
-$string['memorylimithelp'] = '<p>La limite de mémoire de PHP sur votre serveur est actuellement de {$a}.</p><p>Cette valeur trop basse risque de générer des problèmes de manque de mémoire pour Moodle, notamment si vous utilisez beaucoup de modules et/ou si vous avez un grand nombre d\'utilisateurs.</p><p>Il est recommandé de configurer PHP avec une limite de mémoire aussi élevée que possible, par exemple 40 Mo. Vous pouvez obtenir cela de différentes façons :</p>
+$string['memorylimithelp'] = '<p>La limite de mémoire de PHP sur votre serveur est actuellement de {$a}.</p>
+<p>Cette valeur trop basse risque de générer des problèmes de manque de mémoire pour Moodle, notamment si vous utilisez beaucoup de modules et/ou si vous avez un grand nombre d\'utilisateurs.</p>
+<p>Il est recommandé de configurer PHP avec une limite de mémoire aussi élevée que possible, par exemple 40 Mo. Vous pouvez obtenir cela de différentes façons :</p>
<ol>
<li>si vous en avez la possibilité, recompilez PHP avec l\'option <em>--enable-memory-limit</em>. Cela permettra à Moodle de fixer lui-même sa limite de mémoire ;</li>
<li>si vous avez accès à votre fichier « php.ini », vous pouvez attribuer au paramètre <b>memory_limit</b> une valeur comme 40M. Si vous n\'y avez pas accès, demandez à l\'administrateur de le faire pour vous ;</li>
-<li>sur certains serveurs, vous pouvez créer dans le dossier principal de Moodle un fichier « .htaccess » contenant cette ligne : <blockquote><div>php_value memory_limit 40M</div></blockquote><p>Cependant, sur certains serveurs, cela empêchera le fonctionnement correct de <b>tous</b> les fichiers PHP (vous verrez s\'afficher des erreurs lors de la consultation de pages). Dans ce cas, vous devrez supprimer le fichier « .htaccess ».</li>
+<li>sur certains serveurs, vous pouvez créer dans le dossier principal de Moodle un fichier « .htaccess » contenant cette ligne :
+<blockquote><div>php_value memory_limit 40M</div></blockquote>
+<p>Cependant, sur certains serveurs, cela empêchera le fonctionnement correct de <b>tous</b> les fichiers PHP (vous verrez s\'afficher des erreurs lors de la consultation de pages). Dans ce cas, vous devrez supprimer le fichier « .htaccess ».</p></li>
</ol>';
$string['paths'] = 'Chemins';
$string['pathserrcreatedataroot'] = 'Le dossier de données ({$a->dataroot}) ne peut pas être créé par l\'installeur.';
$string['phpversionhelp'] = '<p>Moodle nécessite au minimum la version 4.3.0 ou 5.1.0 (5.0.x a bon nombre de problèmes).</p><p>Vous utilisez actuellement la version {$a}.</p><p>Pour que Moodle fonctionne, vous devez mettre à jour PHP ou aller chez un hébergeur ayant une version récente de PHP.<br />(Si vous avez une version 5.0.x, vous pouvez aussi re-passer à la version 4.4.x)</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Vous voyez cette page, car vous avez installé Moodle correctement et lancé le logiciel <b>{$a->packname} {$a->packversion}</b> sur votre ordinateur. Félicitations !';
-$string['welcomep30'] = 'Cette version du paquet <b>{$a->installername}</b> comprend des logiciels qui créent un environnement dans lequel <b>Moodle</b> va fonctionner, à savoir :';
+$string['welcomep30'] = 'Cette version de <b>{$a->installername}</b> comprend des logiciels qui créent un environnement dans lequel <b>Moodle</b> va fonctionner, à savoir :';
$string['welcomep40'] = 'Ce paquet contient également <b>Moodle {$a->moodlerelease} ({$a->moodleversion})</b>.';
$string['welcomep50'] = 'L\'utilisation de tous les logiciels de ce paquet est soumis à l\'acceptation de leurs licences respectives. Le paquet <b>{$a->installername}</b> est un <a href="http://www.opensource.org/docs/definition_plain.html">logiciel libre</a>. Il est distribué sous licence <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
$string['welcomep60'] = 'Les pages suivantes vous aideront pas à pas à configurer et mettre en place <b>Moodle</b> sur votre ordinateur. Il vous sera possible d\'accepter les réglages par défaut ou, facultativement, de les adapter à vos propres besoins.';
// make sure there is a real user specified
if ($user === null) {
- $userid = !empty($USER->id) ? $USER->id : 0;
+ $userid = isset($USER->id) ? $USER->id : 0;
} else {
- $userid = !empty($user->id) ? $user->id : $user;
+ $userid = is_object($user) ? $user->id : $user;
}
// capability must exist
// make sure there is a real user specified
if ($user === null) {
- $userid = !empty($USER->id) ? $USER->id : 0;
+ $userid = isset($USER->id) ? $USER->id : 0;
} else {
- $userid = !empty($user->id) ? $user->id : $user;
+ $userid = is_object($user) ? $user->id : $user;
}
if (isguestuser($userid)) {
// make sure there is a real user specified
if ($user === null) {
- $userid = !empty($USER->id) ? $USER->id : 0;
+ $userid = isset($USER->id) ? $USER->id : 0;
} else {
- $userid = !empty($user->id) ? $user->id : $user;
+ $userid = is_object($user) ? $user->id : $user;
}
if (empty($userid)) {
$storedcaps = array();
$filecaps = load_capability_def($component);
+ foreach($filecaps as $capname=>$unused) {
+ if (!preg_match('|^[a-z]+/[a-z_0-9]+:[a-z_0-9]+$|', $capname)) {
+ debugging("Coding problem: Invalid capability name '$capname', use 'clonepermissionsfrom' field for migration.");
+ }
+ }
+
$cachedcaps = get_cached_capabilities($component);
if ($cachedcaps) {
foreach ($cachedcaps as $cachedcap) {
// make sure there is a real user specified
if ($user === null) {
- $userid = !empty($USER->id) ? $USER->id : 0;
+ $userid = isset($USER->id) ? $USER->id : 0;
} else {
- $userid = !empty($user->id) ? $user->id : $user;
+ $userid = is_object($user) ? $user->id : $user;
}
if (!has_capability('moodle/role:assign', $context, $userid)) {
* @param string $name setting name
* @param string $visiblename localised setting name
* @param string $description setting description
+ * @param array $defaultsetting a plain array of default module ids
*/
- public function __construct($name, $visiblename, $description) {
- parent::__construct($name, $visiblename, $description, array(), null);
+ public function __construct($name, $visiblename, $description, $defaultsetting = array()) {
+ parent::__construct($name, $visiblename, $description, $defaultsetting, null);
}
/**
if (!empty($CFG->deleteincompleteusers)) {
$cuttime = $timenow - ($CFG->deleteincompleteusers * 3600);
- $rs = $DB->get_recordset_sql ("SELECT id, username
+ $rs = $DB->get_recordset_sql ("SELECT *
FROM {user}
WHERE confirmed = 1 AND lastaccess > 0
AND lastaccess < ? AND deleted = 0
$info = $info;
if (!empty($url)) { // could break doing html_entity_decode on an empty var.
$url = html_entity_decode($url);
+ } else {
+ $url = '';
}
// Restrict length of log lines to the space actually available in the
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
- 'coursecreator' => CAP_ALLOW,
'manager' => CAP_ALLOW,
)
),
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
- 'coursecreator' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
- 'coursecreator' => CAP_ALLOW
)
),
'contextlevel' => CONTEXT_BLOCK,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
- 'coursecreator' => CAP_ALLOW
)
),
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
- 'coursecreator' => CAP_ALLOW
)
),
'moodle/comment:view' => array(
-
'captype' => 'read',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
+ 'frontpage' => CAP_ALLOW,
+ 'guest' => CAP_ALLOW,
'user' => CAP_ALLOW,
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
- 'coursecreator' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
- 'coursecreator' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
- 'coursecreator' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
'archetypes' => array(
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
- 'coursecreator' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
'manager' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
- 'coursecreator' => CAP_ALLOW
)
),
'moodle/community:download' => array(
'archetypes' => array(
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
- 'coursecreator' => CAP_ALLOW
)
)
);
if ($item->isFile()) {
if (!$item->isReadable()) {
- echo $OUTPUT->notification(" File not readable, skipping: ".$fullpathname.$item->getFilename());
+ $notification = "File not readable, skipping: ".$fullpathname.$item->getFilename();
+ echo $OUTPUT->notification($notification);
+ upgrade_log(UPGRADE_LOG_NOTICE, null, $notification);
continue;
}
}
if ($textlib->strlen($filepath) > 255) {
- echo $OUTPUT->notification(" File path longer than 255 chars, skipping: ".$fullpathname.$item->getFilename());
- continue;
+ // we need something unique and reproducible, sorry no shortening possible
+ $filepath = '/directory_over_255_chars/'.md5($filepath).'/';
+ $oldfile = $fullpathname.$item->getFilename();
+ $newfile = $filepath.$item->getFilename();
+ $notification = "File path longer than 255 chars '$oldfile', file path truncated to '$newfile'";
+ echo $OUTPUT->notification($notification);
+ upgrade_log(UPGRADE_LOG_NOTICE, null, $notification);
+ }
+
+ if ($textlib->strlen($filename) > 255) {
+ //try to shorten, but look for collisions
+ $oldfile = $fullpathname.$item->getFilename();
+ $parts = explode('.', $filename);
+ $ext = array_pop($parts);
+ $name = implode('.', $parts);
+ $name = $textlib->substr($name, 0, 254-$textlib->strlen($ext));
+ $newfilename = $name . '.' . $ext;
+ if (file_exists($fullpathname.$newfilename) or $fs->file_exists($context->id, $component, $filearea, '0', $filepath, $newfilename)) {
+ $filename = 'file_name_over_255_chars'.md5($filename).$ext; // bad luck, file with shortened name exists
+ } else {
+ $filename = $newfilename; // shortened name should not cause collisions
+ }
+ $notification = "File name longer than 255 chars '$oldfile', file name truncated to '$filename'";
+ echo $OUTPUT->notification($notification);
+ upgrade_log(UPGRADE_LOG_NOTICE, null, $notification);
}
if (!$fs->file_exists($context->id, $component, $filearea, '0', $filepath, $filename)) {
continue;
}
$filepath = ($filepath.$dirname.'/');
- if ($filepath !== '/backupdata/') {
+ if ($filepath !== '/backupdata/' and $textlib->strlen($filepath) <= 255) {
$fs->create_directory($context->id, $component, $filearea, 0, $filepath);
}
error('execute_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->record_exists_select() instead
+ * @see moodle_database::record_exists_select()
* @param mixed $table
* @param mixed $select
* @return void Throws an error and does nothing
error('record_exists_select() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->record_exists_sql() instead
+ * @see moodle_database::record_exists_sql()
* @param mixed $sql
* @return void Throws an error and does nothing
*/
error('record_exists_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->count_records_select() instead
+ * @see moodle_database::count_records_select()
* @param mixed $table
* @param mixed $select
* @param mixed $countitem
error('count_records_select() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->count_records_sql() instead
+ * @see moodle_database::count_records_sql()
* @param mixed $sql
* @return void Throws an error and does nothing
*/
error('count_records_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_record_sql() instead
+ * @see moodle_database::get_record_sql()
* @param mixed $sql
* @param bool $expectmultiple
* @param bool $nolimit
error('get_record_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_record_select() instead
+ * @see moodle_database::get_record_select()
* @param mixed $table
* @param mixed $select
* @param mixed $fields
error('get_record_select() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_recordset() instead
+ * @see moodle_database::get_recordset()
* @param mixed $table
* @param mixed $field
* @param mixed $value
error('get_recordset() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_recordset_sql() instead
+ * @see moodle_database::get_recordset_sql()
* @param mixed $sql
* @param mixed $limitfrom
* @param mixed $limitnum
error('rs_close() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records_select() instead
+ * @see moodle_database::get_records_select()
* @param mixed $table
* @param mixed $select
* @param mixed $sort
error('get_records_select() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_field_select() instead
+ * @see moodle_database::get_field_select()
* @param mixed $table
* @param mixed $return
* @param mixed $select
error('get_field_select() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_field_sql() instead
+ * @see moodle_database::get_field_sql()
* @param mixed $sql
* @return void Throws an error and does nothing
*/
error('get_field_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->delete_records_select() instead
+ * @see moodle_database::delete_records_select()
* @param mixed $sql
* @param mixed $select
* @return void Throws an error and does nothing
error('execute_sql_arr() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records_list() instead
+ * @see moodle_database::get_records_list()
* @param mixed $table
* @param mixed $field
* @param mixed $values
error('get_records_list() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_recordset_list() instead
+ * @see moodle_database::get_recordset_list()
* @param mixed $table
* @param mixed $field
* @param mixed $values
error('get_recordset_list() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records_menu() instead
+ * @see moodle_database::get_records_menu()
* @param mixed $table
* @param mixed $field
* @param mixed $value
error('get_records_menu() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records_select_menu() instead
+ * @see moodle_database::get_records_select_menu()
* @param mixed $table
* @param mixed $select
* @param mixed $sort
error('get_records_select_menu() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records_sql_menu() instead
+ * @see moodle_database::get_records_sql_menu()
* @param mixed $sql
* @param mixed $limitfrom
* @param mixed $limitnum
error('records_to_menu() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->set_field_select() instead
+ * @see moodle_database::set_field_select()
* @param mixed $table
* @param mixed $newfield
* @param mixed $newvalue
error('set_field_select() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_fieldset_select() instead
+ * @see moodle_database::get_fieldset_select()
* @param mixed $table
* @param mixed $return
* @param mixed $select
error('get_fieldset_select() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_fieldset_sql() instead
+ * @see moodle_database::get_fieldset_sql()
* @param mixed $sql
* @return void Throws an error and does nothing
*/
error('get_fieldset_sql() removed');
}
/**
- * @deprecated
+ * @deprecated use $DB->sql_like() instead
+ * @see moodle_database::sql_like()
* @return void Throws an error and does nothing
*/
function sql_ilike() {
error('rollback_sql() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->insert_record() instead
+ * @see moodle_database::insert_record()
* @param mixed $table
* @param mixed $dataobject
* @param mixed $returnid
error('insert_record() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->update_record() instead
+ * @see moodle_database::update_record()
* @param mixed $table
* @param mixed $dataobject
* @return void Throws an error and does nothing
error('update_record() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_records() instead
+ * @see moodle_database::get_records()
* @param mixed $table
* @param mixed $field
* @param mixed $value
error('get_records() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_record() instead
+ * @see moodle_database::get_record()
* @param mixed $table
* @param mixed $field1
* @param mixed $value1
error('get_record() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->set_field() instead
+ * @see moodle_database::set_field()
* @param mixed $table
* @param mixed $newfield
* @param mixed $newvalue
error('set_field() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->count_records() instead
+ * @see moodle_database::count_records()
* @param mixed $table
* @param mixed $field1
* @param mixed $value1
error('count_records() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->record_exists() instead
+ * @see moodle_database::record_exists()
* @param mixed $table
* @param mixed $field1
* @param mixed $value1
error('record_exists() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->delete_records() instead
+ * @see moodle_database::delete_records()
* @param mixed $table
* @param mixed $field1
* @param mixed $value1
error('delete_records() not available anymore');
}
/**
- * @deprecated
+ * @deprecated use $DB->get_field() instead
+ * @see moodle_database::get_field()
* @param mixed $table
* @param mixed $return
* @param mixed $field1
if (isset($functions[$function->name]['description'])) {
$function->description = $functions[$function->name]['description'];
}
+ if (isset($functions[$function->name]['testclientpath'])) {
+ $function->testclientpath = $functions[$function->name]['testclientpath'];
+ }
}
return $function;
echo '<html dir="'.(right_to_left() ? 'rtl' : 'ltr').'">
<head>
<link rel="shortcut icon" href="theme/standard/pix/favicon.ico" />
- <link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.'/install.php?css=1" />
+ <link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.'/install/css.php" />
<title>'.get_string('installation','install').'</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<head>
<link rel="shortcut icon" href="theme/standard/pix/favicon.ico" />';
- $sheets = array('pagelayout','core');
- $csss = array();
- foreach ($sheets as $sheet) {
- $csss[] = $CFG->wwwroot.'/theme/base/style/'.$sheet.'.css';
- }
- $sheets = array('core', 'css3');
- foreach ($sheets as $sheet) {
- $csss[] = $CFG->wwwroot.'/theme/standard/style/'.$sheet.'.css';
- }
- foreach ($csss as $css) {
- echo '<link rel="stylesheet" type="text/css" href="'.$css.'" />'."\n";
- }
-
- echo '<link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.'/install.php?css=1" />
+ echo '<link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.'/install/css.php" />
<title>'.get_string('installation','install').' - Moodle '.$CFG->target_release.'</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
echo '</div></body></html>';
}
-
-/**
- * Prints css needed on installation page, tries to look like the rest of installation.
- * Does not return.
- *
- * @global object
- */
-function install_css_styles() {
- global $CFG;
-
- @header('Content-type: text/css'); // Correct MIME type
- @header('Cache-Control: no-store, no-cache, must-revalidate');
- @header('Cache-Control: post-check=0, pre-check=0', false);
- @header('Pragma: no-cache');
- @header('Expires: Mon, 20 Aug 1969 09:23:00 GMT');
- @header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
-
-//TODO: add rtl support here, make it match new default theme MDL-21149
-
- echo '
-
-h2 {
- text-align:center;
-}
-
-#installdiv {
- width: 800px;
- margin-left:auto;
- margin-right:auto;
-}
-
-#installdiv dt {
- font-weight: bold;
-}
-
-#installdiv dd {
- padding-bottom: 0.5em;
-}
-
-.stage {
- margin-top: 2em;
- margin-bottom: 2em;
- width: 100%;
- padding:25px;
-}
-
-#installform {
- width: 100%;
-}
-
-#nav_buttons input {
- margin: 5px;
-}
-
-#envresult {
- text-align:left;
- width: auto;
- margin-left:10em;
-}
-
-#envresult dd {
- color: red;
-}
-
-.formrow {
- clear:both;
- text-align:left;
- padding: 8px;
-}
-
-.formrow label.formlabel {
- display:block;
- float:left;
- width: 260px;
- margin-right:5px;
- text-align:right;
-}
-
-.formrow .forminput {
- display:block;
- float:left;
-}
-
-fieldset {
- text-align:center;
- border:none;
-}
-
-.hint {
- display:block;
- clear:both;
- padding-left: 265px;
- color: red;
-}
-
-.configphp {
- text-align:left;
- background-color:white;
- padding:1em;
- width:95%;
-}
-
-.stage6 .stage {
- font-weight: bold;
- color: red;
-}
-
-';
-
- die;
-}
-
/**
* Install Moodle DB,
* config.php must exist, there must not be any tables in db yet.
*
* Any plugin that needs to purge user data should register the 'user_deleted' event.
*
- * @param object $user User object before delete
+ * @param stdClass $user full user object before delete
* @return boolean always true
*/
function delete_user($user) {
// Set Y's config.gallery to the version
$jscode = 'Y.config.gallery='.json_encode($galleryversion).';';
}
- $jscode .= 'Y.use('.join(',', array_map('json_encode', $modules)).',function() {'.js_writer::function_call($function, $arguments).'})';
+ $jscode .= 'Y.use('.join(',', array_map('json_encode', $modules)).',function() {'.js_writer::function_call($function, $arguments).'});';
if ($ondomready) {
$jscode = "Y.on('domready', function() { $jscode });";
}
* @return bool
*/
protected function magic_get_legacythemeinuse() {
- debugging('$PAGE->legacythemeinuse is a deprecated property - please use $PAGE->devicetypeinuse and check if it is equal to legacy.', DEVELOPER_DEBUG);
+ debugging('$PAGE->legacythemeinuse is a deprecated property - please use $PAGE->devicetypeinuse and check if it is equal to legacy.', DEBUG_DEVELOPER);
return ($this->devicetypeinuse == 'legacy');
}
'wikimedia', 'youtube'
),
+ 'scormreport' => array(
+ 'basic'
+ ),
+
'theme' => array(
'afterburner', 'anomaly', 'arialist', 'base', 'binarius',
'boxxie', 'brick', 'canvas', 'formal_white', 'formfactor',
}
}
+ // when printing an error the continue button should never link offsite
+ if (stripos($link, $CFG->wwwroot) === false &&
+ stripos($link, $CFG->httpswwwroot) === false) {
+ $link = $CFG->wwwroot.'/';
+ }
+
$info = new stdClass();
$info->message = $message;
$info->errorcode = $errorcode;
// Used in load balancing scenarios.
// Do not abuse this to try to solve lan/wan access problems!!!!!
if (empty($CFG->reverseproxy)) {
- if (($rurl['host'] != $wwwroot['host']) or
+ if (empty($rurl['host'])) {
+ // missing host in request header, probably not a real browser, let's ignore them
+ } else if (($rurl['host'] !== $wwwroot['host']) or
(!empty($wwwroot['port']) and $rurl['port'] != $wwwroot['port'])) {
// Explain the problem and redirect them to the right URL
if (!defined('NO_MOODLE_COOKIES')) {
// hopefully this will stop all those "clever" admins trying to set up moodle
// with two different addresses in intranet and Internet
- if (!empty($CFG->reverseproxy) && $rurl['host'] == $wwwroot['host']) {
+ if (!empty($CFG->reverseproxy) && $rurl['host'] === $wwwroot['host']) {
print_error('reverseproxyabused', 'error');
}
*/
function setup_get_remote_url() {
$rurl = array();
- list($rurl['host']) = explode(':', $_SERVER['HTTP_HOST']);
+ if (isset($_SERVER['HTTP_HOST'])) {
+ list($rurl['host']) = explode(':', $_SERVER['HTTP_HOST']);
+ } else {
+ $rurl['host'] = null;
+ }
$rurl['port'] = $_SERVER['SERVER_PORT'];
$rurl['path'] = $_SERVER['SCRIPT_NAME']; // Script path without slash arguments
$rurl['scheme'] = (empty($_SERVER['HTTPS']) or $_SERVER['HTTPS'] === 'off' or $_SERVER['HTTPS'] === 'Off' or $_SERVER['HTTPS'] === 'OFF') ? 'http' : 'https';
$quizhasattempts = quiz_has_attempts($quiz->id);
$PAGE->set_url($thispageurl);
-$PAGE->set_pagelayout('admin');
$pagetitle = get_string('editingquiz', 'quiz');
if ($quiz_reordertool) {
$output .= $this->review_summary_table($summarydata, $page);
$output .= $this->review_form($page, $showall, $displayoptions,
$this->questions($attemptobj, true, $slots, $page, $showall, $displayoptions),
- $attemptobj, $showall);
+ $attemptobj);
$output .= $this->review_next_navigation($attemptobj, $page, $lastpage);
$output .= $this->footer();
* @param quiz_attempt $attemptobj instance of quiz_attempt
* @param bool $showall if true display attempt on one page
*/
- public function review_form($summarydata, $page, $displayoptions, $content, $attemptobj,
- $showall) {
+ public function review_form($page, $showall, $displayoptions, $content, $attemptobj) {
if ($displayoptions->flags != question_display_options::EDITABLE) {
return $content;
}
<?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="mod/scorm/db" VERSION="20090420" COMMENT="XMLDB file for Moodle mod/scorm"
+<XMLDB PATH="mod/scorm/db" VERSION="20110731" COMMENT="XMLDB file for Moodle mod/scorm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="scoid"/>
<FIELD NAME="scoid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="id" NEXT="primaryobj"/>
<FIELD NAME="primaryobj" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="scoid" NEXT="objectiveid"/>
- <FIELD NAME="objectiveid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="primaryobj" NEXT="satisfiedbymeasure"/>
+ <FIELD NAME="objectiveid" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" PREVIOUS="primaryobj" NEXT="satisfiedbymeasure"/>
<FIELD NAME="satisfiedbymeasure" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="false" DEFAULT="1" SEQUENCE="false" PREVIOUS="objectiveid" NEXT="minnormalizedmeasure"/>
<FIELD NAME="minnormalizedmeasure" TYPE="float" LENGTH="11" NOTNULL="true" UNSIGNED="true" DEFAULT="0.0000" SEQUENCE="false" DECIMALS="4" PREVIOUS="satisfiedbymeasure"/>
</FIELDS>
</KEYS>
</TABLE>
</TABLES>
-</XMLDB>
+</XMLDB>
\ No newline at end of file
unset_config('updatetime', 'scorm');
upgrade_mod_savepoint(true, 2011021402, 'scorm');
}
+
+ if ($oldversion < 2011073100) {
+ // change field type of objectiveid
+ $table = new xmldb_table('scorm_seq_objective');
+ $field = new xmldb_field('objectiveid', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'primaryobj');
+ $dbman->change_field_type($table, $field);
+ upgrade_main_savepoint(true, 2011073100, 'scorm');
+ }
return true;
}
$string['status'] = 'Status';
$string['statusbar'] = 'Show the status bar';
$string['student_response'] = 'Response';
+$string['subplugintype_scormreport'] = 'Report';
+$string['subplugintype_scormreport_plural'] = 'Reports';
$string['suspended'] = 'Suspended';
$string['syntax'] = 'Syntax error';
$string['tag_error'] = 'Unknown tag ({$a->tag}) with this content: {$a->value}';
}
scorm_layout_widget.setStyle('height', '100%');
+ var center = scorm_layout_widget.getUnitByPosition('center');
+ center.setStyle('height', '100%');
+
+ // calculate the rough new height
+ newheight = YAHOO.util.Dom.getViewportHeight() *.82;
+ if (newheight < 600) {
+ newheight = 600;
+ }
+ scorm_layout_widget.set('height', newheight);
+
scorm_layout_widget.render();
scorm_resize_frame();
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$module->version = 2011060500; // The (date) version of this module
+$module->version = 2011073100; // The (date) version of this module
$module->requires = 2010080300; // The version of Moodle that is required
$module->cron = 300; // How often should cron check this module (seconds)?
$string['neverseen'] = 'Never seen';
$string['optionsheader'] = 'Options';
$string['page-mod-url-x'] = 'Any URL module page';
-$string['parameterinfo'] = 'parameter=variable';
+$string['parameterinfo'] = '&parameter=variable';
$string['parametersheader'] = 'Parameters';
+$string['parametersheader_help'] = 'Some internal Moodle variables may be automatically appended to the URL. Type your name for the parameter into each text box(es) and then select the required matching variable.';
$string['pluginadministration'] = 'URL module administration';
$string['pluginname'] = 'URL';
$string['popupheight'] = 'Popup height (in pixels)';
//-------------------------------------------------------
$mform->addElement('header', 'parameterssection', get_string('parametersheader', 'url'));
-
+ $mform->addElement('static', 'parametersinfo', '', get_string('parametersheader_help', 'url'));
+ $mform->setAdvanced('parametersinfo');
if (empty($this->current->parameters)) {
$parcount = 5;
}
}
$PAGE->set_url($url);
-$PAGE->set_pagelayout('standard');
$qcobject = new question_category_object($pagevars['cpage'], $thispageurl, $contexts->having_one_edit_tab_cap('categories'), $param->edit, $pagevars['cat'], $param->delete,
$contexts->having_cap('moodle/question:add'));
$url->param('cmid', $cmid);
}
$PAGE->set_url($url);
-$PAGE->set_pagelayout('standard');
list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
question_edit_setup('questions', '/question/edit.php');
$contexts = null;
}
+ $PAGE->set_pagelayout('admin');
+
$pagevars['qpage'] = optional_param('qpage', -1, PARAM_INT);
//pass 'cat' from page to page and when 'category' comes from a drop down menu
require_once($CFG->dirroot . '/question/editlib.php');
require_once($CFG->dirroot . '/question/export_form.php');
-$PAGE->set_pagelayout('standard');
-
list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
question_edit_setup('export', '/question/export.php');
print_error('nocategory', 'question');
}
-$PAGE->set_pagelayout('standard');
-
$categorycontext = get_context_instance_by_id($category->contextid);
$category->context = $categorycontext;
//this page can be called without courseid or cmid in which case
$thiscontext = get_context_instance(CONTEXT_MODULE, $cmid);
} elseif ($courseid) {
require_login($courseid, false);
- $PAGE->set_pagelayout('course');
$thiscontext = get_context_instance(CONTEXT_COURSE, $courseid);
$module = null;
$cm = null;
print_error('missingcourseorcmid', 'question');
}
$contexts = new question_edit_contexts($thiscontext);
+$PAGE->set_pagelayout('admin');
if (optional_param('addcancel', false, PARAM_BOOL)) {
redirect($returnurl);
foreach ($xml->entry as $entry) {
$media = $entry->children('http://search.yahoo.com/mrss/');
$title = $media->group->title;
- $attrs = $media->group->thumbnail->attributes();
+ $attrs = $media->group->thumbnail[2]->attributes();
$thumbnail = $attrs['url'];
$arr = explode('/', $entry->id);
$id = $arr[count($arr)-1];
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
.maincalendar .calendarmonth th,
.minicalendar th {
- background: url([[pix:theme|gradient-sb]]) repeat-x 0 0;
+ background: none;
}
.maincalendar .calendar-controls {
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
echo $output->box_start();
echo format_text(get_string('choosereadme', 'theme_'.$theme->name), FORMAT_MOODLE);
echo $output->box_end();
- echo $output->continue_button($CFG->wwwroot . '/' . $CFG->admin . '/index.php');
+ echo $output->continue_button($CFG->wwwroot . '/theme/index.php');
echo $output->footer();
exit;
}
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
//$THEME->rendererfactory = 'theme_simplespace_renderer_factory';
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// include.
////////////////////////////////////////////////////
-// $THEME->renderfactory
+// $THEME->rendererfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
-$version = 2011071900.00; // YYYYMMDD = weekly release date of this DEV branch
+$version = 2011072900.00; // YYYYMMDD = weekly release date of this DEV branch
// RR = release increments - 00 in DEV branches
// .XX = incremental changes
-$release = '2.2dev (Build: 20110719)'; // Human-friendly version name
+$release = '2.2dev (Build: 20110729)'; // Human-friendly version name
$maturity = MATURITY_ALPHA; // this version's maturity level