/.project
/.buildpath
/.cache
-phpunit.xml
\ No newline at end of file
+phpunit.xml
+# Composer support - only composer.json is to be in git, the rest is installed in each checkout.
+composer.phar
+composer.lock
+/vendor/
$visible = '';
} else if ($blocks[$blockid]->visible) {
$visible = '<a href="blocks.php?hide='.$blockid.'&sesskey='.sesskey().'" title="'.$strhide.'">'.
- '<img src="'.$OUTPUT->pix_url('i/hide') . '" class="icon" alt="'.$strhide.'" /></a>';
+ '<img src="'.$OUTPUT->pix_url('t/hide') . '" class="iconsmall" alt="'.$strhide.'" /></a>';
} else {
$visible = '<a href="blocks.php?show='.$blockid.'&sesskey='.sesskey().'" title="'.$strshow.'">'.
- '<img src="'.$OUTPUT->pix_url('i/show') . '" class="icon" alt="'.$strshow.'" /></a>';
+ '<img src="'.$OUTPUT->pix_url('t/show') . '" class="iconsmall" alt="'.$strshow.'" /></a>';
$class = ' class="dimmed_text"'; // Leading space required!
}
$undeletable = '';
} else if (in_array($blockname, $undeletableblocktypes)) {
$undeletable = '<a href="blocks.php?unprotect='.$blockid.'&sesskey='.sesskey().'" title="'.$strunprotect.'">'.
- '<img src="'.$OUTPUT->pix_url('t/unlock') . '" class="icon" alt="'.$strunprotect.'" /></a>';
+ '<img src="'.$OUTPUT->pix_url('t/unlock') . '" class="iconsmall" alt="'.$strunprotect.'" /></a>';
} else {
$undeletable = '<a href="blocks.php?protect='.$blockid.'&sesskey='.sesskey().'" title="'.$strprotect.'">'.
- '<img src="'.$OUTPUT->pix_url('t/unlock_gray') . '" class="icon" alt="'.$strprotect.'" /></a>';
+ '<img src="'.$OUTPUT->pix_url('t/lock') . '" class="iconsmall" alt="'.$strprotect.'" /></a>';
}
$row = array(
/** Used by library scripts to check they are being called by Moodle */
define('MOODLE_INTERNAL', true);
+// Disables caching.. just in case.
+define('CACHE_DISABLE_ALL', true);
+
// Check that PHP is of a sufficient version
if (version_compare(phpversion(), "5.3.2") < 0) {
$phpversion = phpversion();
// Re-order
$updown = '';
- $spacer = '<img src="' . $OUTPUT->pix_url('spacer') . '" class="iconsmall" alt="" /> ';
+ $spacer = '<img src="' . $OUTPUT->pix_url('spacer') . '" class="iconsmall" alt="" />';
if ($filterinfo->active != TEXTFILTER_DISABLED) {
if (!$isfirstrow) {
- $updown .= $OUTPUT->action_icon(filters_action_url($filter, 'up'), new pix_icon('t/up', get_string('up')));
+ $updown .= $OUTPUT->action_icon(filters_action_url($filter, 'up'), new pix_icon('t/up', get_string('up'), '', array('class' => 'iconsmall')));
} else {
$updown .= $spacer;
}
if (!$islastactive) {
- $updown .= $OUTPUT->action_icon(filters_action_url($filter, 'down'), new pix_icon('t/down', get_string('down')));
+ $updown .= $OUTPUT->action_icon(filters_action_url($filter, 'down'), new pix_icon('t/down', get_string('down'), '', array('class' => 'iconsmall')));
} else {
$updown .= $spacer;
}
if ($version > $CFG->version) { // upgrade
purge_all_caches();
+
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
}
}
+ // Cleanup SESSION to make sure other code does not complain in the future.
+ unset($SESSION->has_timed_out);
+ unset($SESSION->wantsurl);
+
// at this stage there can be only one admin unless more were added by install - users may change username, so do not rely on that
$adminids = explode(',', $CFG->siteadmins);
$adminuser = get_complete_user_data('id', reset($adminids));
$class = '';
} else if ($module->visible) {
$visible = "<a href=\"modules.php?hide=$module->name&sesskey=".sesskey()."\" title=\"$strhide\">".
- "<img src=\"" . $OUTPUT->pix_url('i/hide') . "\" class=\"icon\" alt=\"$strhide\" /></a>";
+ "<img src=\"" . $OUTPUT->pix_url('t/hide') . "\" class=\"iconsmall\" alt=\"$strhide\" /></a>";
$class = '';
} else {
$visible = "<a href=\"modules.php?show=$module->name&sesskey=".sesskey()."\" title=\"$strshow\">".
- "<img src=\"" . $OUTPUT->pix_url('i/show') . "\" class=\"icon\" alt=\"$strshow\" /></a>";
+ "<img src=\"" . $OUTPUT->pix_url('t/show') . "\" class=\"iconsmall\" alt=\"$strshow\" /></a>";
$class = ' class="dimmed_text"';
}
if ($module->name == "forum") {
$rowclass = 'dimmed_text';
}
} else {
- $icons = $OUTPUT->spacer() . ' ';
+ $icons = $OUTPUT->spacer(array('class' => 'iconsmall'));
}
// Move icons.
function question_behaviour_enable_disable_icons($behaviour, $enabled) {
if ($enabled) {
- return question_behaviour_icon_html('disable', $behaviour, 'i/hide',
+ return question_behaviour_icon_html('disable', $behaviour, 't/hide',
get_string('enabled', 'question'), get_string('disable'));
} else {
- return question_behaviour_icon_html('enable', $behaviour, 'i/show',
+ return question_behaviour_icon_html('enable', $behaviour, 't/show',
get_string('disabled', 'question'), get_string('enable'));
}
}
global $OUTPUT;
return $OUTPUT->action_icon(new moodle_url('/admin/qbehaviours.php',
array($action => $behaviour, 'sesskey' => sesskey())),
- new pix_icon($icon, $alt, 'moodle', array('title' => '')),
- null, array('title' => $tip)) . ' ';
+ new pix_icon($icon, $alt, 'moodle', array('title' => '', 'class' => 'iconsmall')),
+ null, array('title' => $tip));
}
$rowclass = 'dimmed_text';
}
} else {
- $icons = $OUTPUT->spacer() . ' ';
+ $icons = $OUTPUT->spacer();
}
// Move icons.
function question_types_enable_disable_icons($qtypename, $createable) {
if ($createable) {
- return question_type_icon_html('disable', $qtypename, 'i/hide',
+ return question_type_icon_html('disable', $qtypename, 't/hide',
get_string('enabled', 'question'), get_string('disable'));
} else {
- return question_type_icon_html('enable', $qtypename, 'i/show',
+ return question_type_icon_html('enable', $qtypename, 't/show',
get_string('disabled', 'question'), get_string('enable'));
}
}
global $OUTPUT;
return $OUTPUT->action_icon(new moodle_url('/admin/qtypes.php',
array($action => $qtypename, 'sesskey' => sesskey())),
- new pix_icon($icon, $alt, 'moodle', array('title' => '')),
- null, array('title' => $tip)) . ' ';
+ new pix_icon($icon, $alt, 'moodle', array('title' => '', 'class' => 'iconsmall')),
+ null, array('title' => $tip));
}
function upgrade_reload($url) {
return html_writer::empty_tag('br') .
html_writer::tag('div',
- html_writer::link($url, $this->pix_icon('i/reload', '') .
+ html_writer::link($url, $this->pix_icon('i/reload', '', '', array('class' => 'icon icon-pre')) .
get_string('reload'), array('title' => get_string('reload'))),
array('class' => 'continuebutton')) . html_writer::empty_tag('br');
}
$row->attributes['class'] = 'type-' . $plugin->type . ' name-' . $plugin->type . '_' . $plugin->name;
if ($this->page->theme->resolve_image_location('icon', $plugin->type . '_' . $plugin->name)) {
- $icon = $this->output->pix_icon('icon', '', $plugin->type . '_' . $plugin->name, array('class' => 'smallicon pluginicon'));
+ $icon = $this->output->pix_icon('icon', '', $plugin->type . '_' . $plugin->name, array('class' => 'icon pluginicon'));
} else {
- $icon = $this->output->pix_icon('spacer', '', 'moodle', array('class' => 'smallicon pluginicon noicon'));
+ $icon = $this->output->pix_icon('spacer', '', 'moodle', array('class' => 'icon pluginicon noicon'));
}
if ($plugin->get_status() === plugin_manager::PLUGIN_STATUS_MISSING) {
$msg = html_writer::tag('span', get_string('status_missing', 'core_plugin'), array('class' => 'notifyproblem'));
} else {
$msg = '';
}
- $pluginname = html_writer::tag('div', $icon . ' ' . $plugin->displayname . ' ' . $msg, array('class' => 'displayname')).
+ $pluginname = html_writer::tag('div', $icon . '' . $plugin->displayname . ' ' . $msg, array('class' => 'displayname')).
html_writer::tag('div', $plugin->component, array('class' => 'componentname'));
$pluginname = new html_table_cell($pluginname);
if (empty($impediments)) {
$widget = $deployer->make_confirm_widget($updateinfo);
$box .= $this->output->render($widget);
- } else if (isset($impediments['notwritable'])) {
- $box .= $this->output->help_icon('notwritable', 'core_plugin', get_string('notwritable', 'core_plugin'));
+ } else {
+ if (isset($impediments['notwritable'])) {
+ $box .= $this->output->help_icon('notwritable', 'core_plugin', get_string('notwritable', 'core_plugin'));
+ }
+ if (isset($impediments['notdownloadable'])) {
+ $box .= $this->output->help_icon('notdownloadable', 'core_plugin', get_string('notdownloadable', 'core_plugin'));
+ }
}
}
$ADMIN->add('appearance', $temp);
// blog
- if (!empty($CFG->enableblogs)) {
- $temp = new admin_settingpage('blog', new lang_string('blog','blog'));
- $temp->add(new admin_setting_configcheckbox('useblogassociations', new lang_string('useblogassociations', 'blog'), new lang_string('configuseblogassociations','blog'), 1));
- $temp->add(new admin_setting_bloglevel('bloglevel', new lang_string('bloglevel', 'admin'), new lang_string('configbloglevel', 'admin'), 4, array(BLOG_GLOBAL_LEVEL => new lang_string('worldblogs','blog'),
- BLOG_SITE_LEVEL => new lang_string('siteblogs','blog'),
- BLOG_USER_LEVEL => new lang_string('personalblogs','blog'))));
- $temp->add(new admin_setting_configcheckbox('useexternalblogs', new lang_string('useexternalblogs', 'blog'), new lang_string('configuseexternalblogs','blog'), 1));
- $temp->add(new admin_setting_configselect('externalblogcrontime', new lang_string('externalblogcrontime', 'blog'), new lang_string('configexternalblogcrontime', 'blog'), 86400,
- array(43200 => new lang_string('numhours', '', 12),
- 86400 => new lang_string('numhours', '', 24),
- 172800 => new lang_string('numdays', '', 2),
- 604800 => new lang_string('numdays', '', 7))));
- $temp->add(new admin_setting_configtext('maxexternalblogsperuser', new lang_string('maxexternalblogsperuser','blog'), new lang_string('configmaxexternalblogsperuser', 'blog'), 1));
- $temp->add(new admin_setting_configcheckbox('blogusecomments', new lang_string('enablecomments', 'admin'), new lang_string('configenablecomments', 'admin'), 1));
- $temp->add(new admin_setting_configcheckbox('blogshowcommentscount', new lang_string('showcommentscount', 'admin'), new lang_string('configshowcommentscount', 'admin'), 1));
- $ADMIN->add('appearance', $temp);
- }
+ $temp = new admin_settingpage('blog', new lang_string('blog','blog'), 'moodle/site:config', empty($CFG->enableblogs));
+ $temp->add(new admin_setting_configcheckbox('useblogassociations', new lang_string('useblogassociations', 'blog'), new lang_string('configuseblogassociations','blog'), 1));
+ $temp->add(new admin_setting_bloglevel('bloglevel', new lang_string('bloglevel', 'admin'), new lang_string('configbloglevel', 'admin'), 4, array(BLOG_GLOBAL_LEVEL => new lang_string('worldblogs','blog'),
+ BLOG_SITE_LEVEL => new lang_string('siteblogs','blog'),
+ BLOG_USER_LEVEL => new lang_string('personalblogs','blog'))));
+ $temp->add(new admin_setting_configcheckbox('useexternalblogs', new lang_string('useexternalblogs', 'blog'), new lang_string('configuseexternalblogs','blog'), 1));
+ $temp->add(new admin_setting_configselect('externalblogcrontime', new lang_string('externalblogcrontime', 'blog'), new lang_string('configexternalblogcrontime', 'blog'), 86400,
+ array(43200 => new lang_string('numhours', '', 12),
+ 86400 => new lang_string('numhours', '', 24),
+ 172800 => new lang_string('numdays', '', 2),
+ 604800 => new lang_string('numdays', '', 7))));
+ $temp->add(new admin_setting_configtext('maxexternalblogsperuser', new lang_string('maxexternalblogsperuser','blog'), new lang_string('configmaxexternalblogsperuser', 'blog'), 1));
+ $temp->add(new admin_setting_configcheckbox('blogusecomments', new lang_string('enablecomments', 'admin'), new lang_string('configenablecomments', 'admin'), 1));
+ $temp->add(new admin_setting_configcheckbox('blogshowcommentscount', new lang_string('showcommentscount', 'admin'), new lang_string('configshowcommentscount', 'admin'), 1));
+ $ADMIN->add('appearance', $temp);
// Navigation settings
$temp = new admin_settingpage('navigation', new lang_string('navigation'));
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700;
-$plugin->requires = 2012061700;
+$plugin->version = 2012112900;
+$plugin->requires = 2012112900;
$plugin->component = 'tool_assignmentupgrade';
-$plugin->dependencies = array('mod_assign' => 2012061700);
+$plugin->dependencies = array('mod_assign' => 2012112900);
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_capability'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700;
-$plugin->requires = 2012061700;
+$plugin->version = 2012112900;
+$plugin->requires = 2012112900;
$plugin->component = 'tool_customlang'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012062200; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2012061700; // Requires this Moodle version.
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2012112900; // Requires this Moodle version.
$plugin->component = 'tool_dbtransfer'; // Full name of the plugin (used for diagnostics).
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_generator'; // Full name of the plugin (used for diagnostics)
$plugin->maturity = MATURITY_ALPHA; // this version's maturity level
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_health'; // Full name of the plugin (used for diagnostics)
$plugin->maturity = MATURITY_ALPHA; // this version's maturity level
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_innodb'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_langimport'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_multilangupgrade'; // Full name of the plugin (used for diagnostics)
'buildconfig' => false,
'buildcomponentconfigs' => false,
'diag' => false,
- 'phpunitdir' => false,
'run' => false,
'help' => false,
),
)
);
-if ($options['phpunitdir']) {
- // nasty skodak's hack for testing of future PHPUnit versions - intentionally not documented
- if (!file_exists($options['phpunitdir'])) {
- cli_error('Invalid custom PHPUnit lib location');
- }
- $files = scandir($options['phpunitdir']);
- foreach ($files as $file) {
- $path = $options['phpunitdir'].'/'.$file;
- if (!is_dir($path) or strpos($file, '.') === 0) {
- continue;
- }
- ini_set('include_path', $path . PATH_SEPARATOR . ini_get('include_path'));
- }
- unset($files);
- unset($file);
+if (file_exists(__DIR__.'/../../../../vendor/autoload.php')) {
+ // Composer packages present.
+ require_once(__DIR__.'/../../../../vendor/autoload.php');
}
-// verify PHPUnit libs are loaded
+// Verify PHPUnit libs can be loaded.
if (!include_once('PHPUnit/Autoload.php')) {
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
}
unset($unrecognized);
foreach ($_SERVER['argv'] as $k=>$v) {
- if (strpos($v, '--run') === 0 or strpos($v, '--phpunitdir') === 0) {
+ if (strpos($v, '--run') === 0) {
unset($_SERVER['argv'][$k]);
$_SERVER['argc'] = $_SERVER['argc'] - 1;
}
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_phpunit'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_profiling'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700;
-$plugin->requires = 2012061700;
+$plugin->version = 2012112900;
+$plugin->requires = 2012112900;
$plugin->component = 'tool_qeupgradehelper'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_replace'; // Full name of the plugin (used for diagnostics)
$plugin->maturity = MATURITY_ALPHA; // this version's maturity level
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700;
-$plugin->requires = 2012061700;
+$plugin->version = 2012112900;
+$plugin->requires = 2012112900;
$plugin->component = 'tool_spamcleaner'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700;
-$plugin->requires = 2012061700;
+$plugin->version = 2012112900;
+$plugin->requires = 2012112900;
$plugin->component = 'tool_timezoneimport'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_unsuproles'; // Full name of the plugin (used for diagnostics)
$newgroupdata = new stdClass();
$newgroupdata->name = $addgroup;
$newgroupdata->courseid = $ccache[$shortname]->id;
- if ($ccache[$shortname]->groups[$addgroup]->id = groups_create_group($newgroupdata)){
+ $newgroupdata->description = '';
+ $gid = groups_create_group($newgroupdata);
+ if ($gid){
+ $ccache[$shortname]->groups[$addgroup] = new stdClass();
+ $ccache[$shortname]->groups[$addgroup]->id = $gid;
$ccache[$shortname]->groups[$addgroup]->name = $newgroupdata->name;
} else {
$upt->track('enrolments', get_string('unknowngroup', 'error', s($addgroup)), 'error');
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_uploaduser'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'tool_xmldb'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_cas'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_db'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die;
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_email'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_fc'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_imap'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_ldap'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_manual'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_mnet'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_nntp'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_nologin'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_none'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_pam'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_pop3'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_radius'; // Full name of the plugin (used for diagnostics)
$PAGE->set_url('/auth/shibboleth/index.php');
// Support for WAYFless URLs.
- $SESSION->wantsurl = optional_param('target', $SESSION->wantsurl, PARAM_LOCALURL);
+ $target = optional_param('target', '', PARAM_LOCALURL);
+ if (!empty($target)) {
+ $SESSION->wantsurl = $target;
+ }
if (isloggedin() && !isguestuser()) { // Nothing to do
if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) {
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_shibboleth'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'auth_webservice'; // Full name of the plugin (used for diagnostics)
const OPERATION_RESTORE ='restore';// We are performing one restore
// Version (to keep CFG->backup_version (and release) updated automatically)
- const VERSION = 2012061800;
- const RELEASE = '2.3';
+ const VERSION = 2012112900;
+ const RELEASE = '2.5';
}
/*
}
foreach ($matches[2] as $match) {
$file = str_replace(array('$@FILEPHP@$', '$@SLASH@$', '$@FORCEDOWNLOAD@$'), array('', '/', ''), $match);
- $files[] = urldecode($file);
+ $files[] = rawurldecode($file);
}
return array_unique($files);
public static function rewrite_filephp_usage($text, array $files) {
foreach ($files as $file) {
+ // Expect URLs properly encoded by default.
+ $parts = explode('/', $file);
+ $encoded = implode('/', array_map('rawurlencode', $parts));
+ $fileref = '$@FILEPHP@$'.str_replace('/', '$@SLASH@$', $encoded);
+ $text = str_replace($fileref.'$@FORCEDOWNLOAD@$', '@@PLUGINFILE@@'.$encoded.'?forcedownload=1', $text);
+ $text = str_replace($fileref, '@@PLUGINFILE@@'.$encoded, $text);
+ // Add support for URLs without any encoding.
$fileref = '$@FILEPHP@$'.str_replace('/', '$@SLASH@$', $file);
- $text = str_replace($fileref.'$@FORCEDOWNLOAD@$', '@@PLUGINFILE@@'.$file.'?forcedownload=1', $text);
- $text = str_replace($fileref, '@@PLUGINFILE@@'.$file, $text);
+ $text = str_replace($fileref.'$@FORCEDOWNLOAD@$', '@@PLUGINFILE@@'.$encoded.'?forcedownload=1', $text);
+ $text = str_replace($fileref, '@@PLUGINFILE@@'.$encoded, $text);
}
return $text;
$this->assertTrue(in_array('/pics/news.gif', $files));
$this->assertTrue(in_array('/MANUAL.DOC', $files));
- $text = moodle1_converter::rewrite_filephp_usage($text, array('/pics/news.gif', '/another/file/notused.txt'), $files);
+ $text = moodle1_converter::rewrite_filephp_usage($text, array('/pics/news.gif', '/another/file/notused.txt'));
$this->assertEquals($text, 'This is a text containing links to file.php
as it is parsed from the backup file. <br /><br /><img border="0" width="110" vspace="0" hspace="0" height="92" title="News" alt="News" src="@@PLUGINFILE@@/pics/news.gif" /><a href="@@PLUGINFILE@@/pics/news.gif?forcedownload=1">download image</a><br />
<br /><a href=\'$@FILEPHP@$$@SLASH@$MANUAL.DOC$@FORCEDOWNLOAD@$\'>download manual</a><br />');
}
public function test_referenced_files_urlencoded() {
- // This test covers MDL-36204
+
$text = 'This is a text containing links to file.php
as it is parsed from the backup file. <br /><br /><img border="0" width="110" vspace="0" hspace="0" height="92" title="News" alt="News" src="$@FILEPHP@$$@SLASH@$pics$@SLASH@$news.gif" /><a href="$@FILEPHP@$$@SLASH@$pics$@SLASH@$news.gif$@FORCEDOWNLOAD@$">no space</a><br />
- <br /><a href=\'$@FILEPHP@$$@SLASH@$pics$@SLASH@$news%20with%20spaces.gif$@FORCEDOWNLOAD@$\'>with urlencoded spaces</a><br />';
+ <br /><a href=\'$@FILEPHP@$$@SLASH@$pics$@SLASH@$news%20with%20spaces.gif$@FORCEDOWNLOAD@$\'>with urlencoded spaces</a><br />
+<a href="$@FILEPHP@$$@SLASH@$illegal%20pics%2Bmovies$@SLASH@$romeo%2Bjuliet.avi">Download the full AVI for free! (space and plus encoded)</a>
+<a href="$@FILEPHP@$$@SLASH@$illegal pics+movies$@SLASH@$romeo+juliet.avi">Download the full AVI for free! (none encoded)</a>
+<a href="$@FILEPHP@$$@SLASH@$illegal%20pics+movies$@SLASH@$romeo+juliet.avi">Download the full AVI for free! (only space encoded)</a>
+<a href="$@FILEPHP@$$@SLASH@$illegal pics%2Bmovies$@SLASH@$romeo%2Bjuliet.avi">Download the full AVI for free! (only plus)</a>';
$files = moodle1_converter::find_referenced_files($text);
$this->assertEquals(gettype($files), 'array');
- $this->assertEquals(2, count($files));
+ $this->assertEquals(3, count($files));
$this->assertTrue(in_array('/pics/news.gif', $files));
$this->assertTrue(in_array('/pics/news with spaces.gif', $files));
+ $this->assertTrue(in_array('/illegal pics+movies/romeo+juliet.avi', $files));
+
+ $text = moodle1_converter::rewrite_filephp_usage($text, $files);
+ $this->assertEquals('This is a text containing links to file.php
+as it is parsed from the backup file. <br /><br /><img border="0" width="110" vspace="0" hspace="0" height="92" title="News" alt="News" src="@@PLUGINFILE@@/pics/news.gif" /><a href="@@PLUGINFILE@@/pics/news.gif?forcedownload=1">no space</a><br />
+ <br /><a href=\'@@PLUGINFILE@@/pics/news%20with%20spaces.gif?forcedownload=1\'>with urlencoded spaces</a><br />
+<a href="@@PLUGINFILE@@/illegal%20pics%2Bmovies/romeo%2Bjuliet.avi">Download the full AVI for free! (space and plus encoded)</a>
+<a href="@@PLUGINFILE@@/illegal%20pics%2Bmovies/romeo%2Bjuliet.avi">Download the full AVI for free! (none encoded)</a>
+<a href="$@FILEPHP@$$@SLASH@$illegal%20pics+movies$@SLASH@$romeo+juliet.avi">Download the full AVI for free! (only space encoded)</a>
+<a href="$@FILEPHP@$$@SLASH@$illegal pics%2Bmovies$@SLASH@$romeo%2Bjuliet.avi">Download the full AVI for free! (only plus)</a>', $text);
}
public function test_question_bank_conversion() {
// - section_included setting (if exists)
$settingname = $settingprefix . 'included';
$activity_included = new backup_activity_generic_setting($settingname, base_setting::IS_BOOLEAN, true);
- $activity_included->get_ui()->set_icon(new pix_icon('icon', get_string('pluginname', $this->modulename), $this->modulename));
+ $activity_included->get_ui()->set_icon(new pix_icon('icon', get_string('pluginname', $this->modulename),
+ $this->modulename, array('class' => 'iconlarge icon-post')));
$this->add_setting($activity_included);
// Look for "activities" root setting
$activities = $this->plan->get_setting('activities');
// - section_included setting (if exists)
$settingname = $settingprefix . 'included';
$activity_included = new restore_activity_generic_setting($settingname, base_setting::IS_BOOLEAN, true);
- $activity_included->get_ui()->set_icon(new pix_icon('icon', get_string('pluginname', $this->modulename), $this->modulename));
+ $activity_included->get_ui()->set_icon(new pix_icon('icon', get_string('pluginname', $this->modulename),
+ $this->modulename, array('class' => 'iconlarge icon-post')));
$this->add_setting($activity_included);
// Look for "activities" root setting
$activities = $this->plan->get_setting('activities');
$data->id = $newitemid = $existinggradeitem->id;
$DB->update_record('grade_items', $data);
}
+ } else if ($data->itemtype == 'manual') {
+ // Manual items aren't assigned to a cm, so don't go duplicating them in the target if one exists.
+ $gi = array(
+ 'itemtype' => $data->itemtype,
+ 'courseid' => $data->courseid,
+ 'itemname' => $data->itemname,
+ 'categoryid' => $data->categoryid,
+ );
+ $newitemid = $DB->get_field('grade_items', 'id', $gi);
}
if (empty($newitemid)) {
$data->penalty = 1;
}
- $data->timecreated = $this->apply_date_offset($data->timecreated);
- $data->timemodified = $this->apply_date_offset($data->timemodified);
-
$userid = $this->get_mappingid('user', $data->createdby);
$data->createdby = $userid ? $userid : $this->task->get_userid();
$coursemodule = $DB->get_record('course_modules', array('id'=>$page->cmid));
$this->moduleid = $coursemodule->id;
- $this->sectionid = $DB->get_field("course_sections", 'id', array("section"=>$coursemodule->section, "course"=>$course->id));
+ $this->sectionid = $coursemodule->section;
$this->courseid = $coursemodule->course;
$this->userid = 2; // admin
if (substr($this->fullpath, -5) !== '.html') {
$content = $prefix . str_repeat(' ', $depth) . $message . PHP_EOL;
} else {
- $content = $prefix . str_repeat(' ', $depth) . htmlentities($message, ENT_QUOTES) . '<br/>' . PHP_EOL;
+ $content = $prefix . str_repeat(' ', $depth) . htmlentities($message, ENT_QUOTES, 'UTF-8') . '<br/>' . PHP_EOL;
}
if (false === fwrite($this->fhandle, $content)) {
throw new base_logger_exception('error_writing_file', $this->fullpath);
if (defined('STDOUT')) {
echo $prefix . str_repeat(' ', $depth) . $message . PHP_EOL;
} else {
- echo $prefix . str_repeat(' ', $depth) . htmlentities($message, ENT_QUOTES) . '<br/>' . PHP_EOL;
+ echo $prefix . str_repeat(' ', $depth) . htmlentities($message, ENT_QUOTES, 'UTF-8') . '<br/>' . PHP_EOL;
}
flush();
return true;
if (defined('STDOUT')) {
echo $prefix . $message . PHP_EOL;
} else {
- echo $prefix . htmlentities($message, ENT_QUOTES) . '<br/>' . PHP_EOL;
+ echo $prefix . htmlentities($message, ENT_QUOTES, 'UTF-8') . '<br/>' . PHP_EOL;
}
flush();
return true;
$icon = $this->get_icon();
$label = $this->get_label($task);
if (!empty($icon)) {
- $label .= ' '.$output->render($icon);
+ $label .= $output->render($icon);
}
// name, label, attributes
return $this->apply_options(array('element'=>'text','name'=>self::NAME_PREFIX.$this->name, 'label'=>$label, 'attributes'=>$this->attributes));
$icon = $this->get_icon();
$label = $this->get_label($task);
if (!empty($icon)) {
- $label .= ' '.$output->render($icon);
+ $label .= $output->render($icon);
}
return $this->apply_options(array('element'=>'checkbox','name'=>self::NAME_PREFIX.$this->name, 'label'=>$label, 'text'=>$this->text, 'attributes'=>$this->attributes));
}
global $OUTPUT;
// Checkboxes are always yes or no
if ($this->get_value()) {
- return $OUTPUT->pix_icon('i/tick_green_big', get_string('yes'));
+ return $OUTPUT->pix_icon('i/valid', get_string('yes'));
} else {
- return $OUTPUT->pix_icon('i/cross_red_big', get_string('no'));
+ return $OUTPUT->pix_icon('i/invalid', get_string('no'));
}
}
$icon = $this->get_icon();
$label = $this->get_label($task);
if (!empty($icon)) {
- $label .= ' '.$output->render($icon);
+ $label .= $output->render($icon);
}
// name, label, text, value, attributes
return $this->apply_options(array('element'=>'radio','name'=>self::NAME_PREFIX.$this->name, 'label'=>$label, 'text'=>$this->text, 'value'=>$this->value, 'attributes'=>$this->attributes));
$icon = $this->get_icon();
$label = $this->get_label($task);
if (!empty($icon)) {
- $label .= ' '.$output->render($icon);
+ $label .= $output->render($icon);
}
// name, label, options, attributes
return $this->apply_options(array('element'=>'select','name'=>self::NAME_PREFIX.$this->name, 'label'=>$label, 'options'=>$this->values, 'attributes'=>$this->attributes));
* @return string
*/
public function backup_details($details, $nextstageurl) {
- $yestick = $this->output->pix_icon('i/tick_green_big', get_string('yes'));
- $notick = $this->output->pix_icon('i/cross_red_big', get_string('no'));
+ $yestick = $this->output->pix_icon('i/valid', get_string('yes'));
+ $notick = $this->output->pix_icon('i/valid', get_string('no'));
$html = html_writer::start_tag('div', array('class'=>'backup-restore'));
$table->data = array();
}
$name = get_string('pluginname', $activity->modulename);
- $icon = new pix_icon('icon', $name, $activity->modulename);
+ $icon = new pix_icon('icon', $name, $activity->modulename, array('class' => 'iconlarge icon-pre'));
$table->data[] = array(
- $this->output->render($icon).' '.$name,
+ $this->output->render($icon).$name,
$activity->title,
($activity->settings[$activitykey.'_userinfo'])?$yestick:$notick,
);
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_activity_modules'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_admin_bookmarks'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_blog_menu'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_blog_recent'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_blog_tags'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_calendar_month'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_calendar_upcoming'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_comments'; // Full name of the plugin (used for diagnostics)
}
$icon = html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/group'),
- 'class' => 'icon', 'alt' => get_string('addcourse', 'block_community')));
+ 'class' => 'icon', 'alt' => ""));
$addcourseurl = new moodle_url('/blocks/community/communitycourse.php',
array('add' => true, 'courseid' => $this->page->course->id));
$searchlink = html_writer::tag('a', $icon . get_string('addcourse', 'block_community'),
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_community'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_completionstatus';
-$plugin->dependencies = array('report_completion' => 2012061700);
\ No newline at end of file
+$plugin->dependencies = array('report_completion' => 2012112900);
\ No newline at end of file
-.block_course_list .footer {margin-top: 5px;}
\ No newline at end of file
+.block_course_list .footer {margin-top: 5px;}
+.block_course_list .content li { margin-bottom: .3em;}
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_course_list'; // Full name of the plugin (used for diagnostics)
),
'clonepermissionsfrom' => 'moodle/my:manageblocks'
- ),
-
- 'block/course_overview:addinstance' => array(
- 'riskbitmask' => RISK_SPAM | RISK_XSS,
-
- 'captype' => 'write',
- 'contextlevel' => CONTEXT_BLOCK,
- 'archetypes' => array(
- 'editingteacher' => CAP_ALLOW,
- 'manager' => CAP_ALLOW
- ),
-
- 'clonepermissionsfrom' => 'moodle/site:manageblocks'
- ),
+ )
);
$string['collapseall'] = 'Collapse All Course Lists';
$string['configotherexpanded'] = 'If enabled, Other Courses will be expanded by default unless overriden by user preferences.';
$string['configpreservestates'] = 'If enabled, the collapsed/expanded states set by the user are stored and used on each load.';
-$string['course_overview:addinstance'] = 'Add a new course overview block';
$string['course_overview:myaddinstance'] = 'Add a new course overview block to the My Moodle page';
$string['defaultmaxcourses'] = 'Default maximum courses';
$string['defaultmaxcoursesdesc'] = 'Maximum courses which should be displayed on course overview block, 0 will show all courses';
$attributes = array('title' => s($course->fullname));
if ($course->id > 0) {
- $link = html_writer::link(new moodle_url('/course/view.php', array('id' => $course->id)), format_string($course->shortname, true, $course->id), $attributes);
+ $courseurl = new moodle_url('/course/view.php', array('id' => $course->id));
+ $coursefullname = format_string($course->fullname, true, $course->id);
+ $link = html_writer::link($courseurl, $coursefullname, $attributes);
$html .= $this->output->heading($link, 2, 'title');
} else {
$html .= $this->output->heading(html_writer::link(
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
-$plugin->component = 'block_course_overview'; // Full name of the plugin (used for diagnostics)
\ No newline at end of file
+$plugin->version = 2012121000; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
+$plugin->component = 'block_course_overview'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_course_summary'; // Full name of the plugin (used for diagnostics)
// We need to fix a font-size - sorry theme designers.
var fontsize = '11px';
var transform = (clockwise) ? 'rotate(90deg)' : 'rotate(270deg)';
- var test = Y.Node.create('<h2><span style="font-size:'+fontsize+';position:absolute;">'+text+'</span></h2>');
+ var test = Y.Node.create('<h2><span class="transform-test-node" style="font-size:'+fontsize+';">'+text+'</span></h2>');
this.nodes.body.insert(test, 0);
var width = test.one('span').get('offsetWidth') * 1.2;
var height = test.one('span').get('offsetHeight');
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_feedback'; // Full name of the plugin (used for diagnostics)
$this->config->cache = '';
$this->instance_config_commit();
+ $this->content = new stdClass();
$this->content->text = get_string('notyetconfigured','block_glossary_random');
$this->content->footer = '';
return $this->content;
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_glossary_random'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_html'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_login'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_mentees'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_messages'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_mnet_hosts'; // Full name of the plugin (used for diagnostics)
// The blocks in My Moodle are a special case and use a different capability.
if (!empty($USER->id)
&& $page->context->contextlevel == CONTEXT_USER // Page belongs to a user
- && $page->context->instanceid == $USER->id) { // Page belongs to this user
+ && $page->context->instanceid == $USER->id // Page belongs to this user
+ && $page->pagetype == 'my-index') { // Ensure we are on the My Moodle page
$capability = 'block/' . $this->name() . ':myaddinstance';
return $this->has_add_block_capability($page, $capability)
&& has_capability('moodle/my:manageblocks', $page->context);
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_myprofile'; // Full name of the plugin (used for diagnostics)
.block_navigation .block_tree li > p.hasicon img {vertical-align:middle;position:absolute;left:0;top:-1px;width:16px;height:16px;}
.block_navigation .block_tree li.item_with_icon.contains_branch > p img {left:16px;}
.block_navigation .block_tree .type_activity > p.branch.hasicon,
+.block_navigation .block_tree .type_activity > p.emptybranch.hasicon,
.block_navigation .block_tree li.item_with_icon.contains_branch > .tree_item {padding-left:37px;}
.block_navigation .block_tree li ul {padding-left:0;margin:0;}
.block_navigation .block_tree .tree_item.branch {background-image: url([[pix:t/expanded]]);background-position: 0 0;background-repeat: no-repeat;}
.block_navigation .block_tree .tree_item.branch.navigation_node {background-image:none;padding-left:0;}
+.block_navigation .block_tree .type_activity > .tree_item.emptybranch,
.block_navigation .block_tree .type_activity > .tree_item.branch {background-image:none;position:relative;}
+.block_navigation .block_tree .type_activity > .tree_item.hasicon.emptybranch img,
.block_navigation .block_tree .type_activity > .tree_item.branch img {left: 16px;}
.block_navigation .block_tree .root_node.leaf {padding-left:0px;}
.block_navigation .block_tree .active_tree_node {font-weight:bold;}
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_navigation'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_news_items'; // Full name of the plugin (used for diagnostics)
.block_online_users .content .list li.listentry {clear:both;}
.block_online_users .content .list li.listentry .user {float:left;position:relative;}
-.block_online_users .content .list li.listentry .message {float:right;}
+.block_online_users .content .list li.listentry .user .userpicture { vertical-align: text-bottom;}
+.block_online_users .content .list li.listentry .message {float:right; margin-top: 3px;}
.block_online_users .content .info {text-align:center;}
.dir-rtl .block_online_users .content .list li.listentry .user {float:right;}
-.dir-rtl .block_online_users .content .list li.listentry .message {float:left;}
\ No newline at end of file
+.dir-rtl .block_online_users .content .list li.listentry .message {float:left;}
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_online_users'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_participants'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_private_files'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_quiz_results'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_recent_activity'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_rss_client'; // Full name of the plugin (used for diagnostics)
$plugin->cron = 300; // Set min time between cron executions to 300 secs (5 mins)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_search_forums'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_section_links'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_selfcompletion'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_settings'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_site_main_menu'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_social_activities'; // Full name of the plugin (used for diagnostics)
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2012110800; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires = 2012061700; // Requires this Moodle version
+$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_tag_flickr'; // Full name of the plugin (used for diagnostics)