diff --git a/grade/export/lib.php b/grade/export/lib.php
index 784fd16bc2d..a51c9bed5ca 100644
--- a/grade/export/lib.php
+++ b/grade/export/lib.php
@@ -189,7 +189,7 @@ abstract class grade_export {
$name .= ' ('.get_string('feedback').')';
}
- return strip_tags($name);
+ return html_to_text($name, 0, false);
}
/**
diff --git a/lang/en/admin.php b/lang/en/admin.php
index d99e721afd5..aee90f39880 100644
--- a/lang/en/admin.php
+++ b/lang/en/admin.php
@@ -118,7 +118,7 @@ $string['commonfiltersettings'] = 'Common filter settings';
$string['commonsettings'] = 'Common settings';
$string['componentinstalled'] = 'Component installed';
$string['computedfromlogs'] = 'Computed from logs since {$a}.';
-$string['condifmodeditdefaults'] = 'The values you set here define the default values that are used in the activity settings form when you create a new activity. You can also configure which activity settings are considered advanced.';
+$string['condifmodeditdefaults'] = 'Default values are used in the settings form when creating a new activity or resource.';
$string['confeditorhidebuttons'] = 'Select the buttons that should be hidden in the HTML editor.';
$string['configallcountrycodes'] = 'This is the list of countries that may be selected in various places, for example in a user\'s profile. If blank (the default) the list in countries.php in the standard English language pack is used. That is the list from ISO 3166-1. Otherwise, you can specify a comma-separated list of codes, for example \'GB,FR,ES\'. If you add new, non-standard codes here, you will need to add them to countries.php in \'en\' and your language pack.';
$string['configallowassign'] = 'You can allow people who have the roles on the left side to assign some of the column roles to other people';
@@ -159,15 +159,15 @@ $string['configcronremotepassword'] = 'This means that the cron.php script canno
http://site.example.com/admin/cron.php?password=opensesame
If this is left empty, no password is required.';
$string['configcurlcache'] = 'Time-to-live for cURL cache, in seconds.';
-$string['configcustommenuitems'] = 'You can configure a custom menu here to be shown by themes. Each line consists of some menu text, a link URL (optional) and a tooltip title (optional), separated by pipe characters. You can specify a structure using hyphens. For example:
+$string['configcustommenuitems'] = 'You can configure a custom menu here to be shown by themes. Each line consists of some menu text, a link URL (optional), a tooltip title (optional) and a language code or comma-separated list of codes (optional, for displaying the line to users of the specified language only), separated by pipe characters. You can specify a structure using hyphens. For example:
Moodle community|http://moodle.org
-Moodle free support|http://moodle.org/support
-Moodle development|http://moodle.org/development
--Moodle Tracker|http://tracker.moodle.org
---Moodle Docs|http://docs.moodle.org
--Moodle News|http://moodle.org/news
-Moodle company
+--Moodle Docs|http://docs.moodle.org|Moodle Docs in German
+--German Moodle Docs|http://docs.moodle.org/de|Documentation in German|de
+-Moodle News|http://moodle.org/news Moodle company
-Moodle commercial hosting|http://moodle.com/hosting
-Moodle commercial support|http://moodle.com/support
';
@@ -523,10 +523,10 @@ $string['filters'] = 'Filters';
$string['filtersettings'] = 'Manage filters';
$string['filtersettingsgeneral'] = 'General filter settings';
$string['filteruploadedfiles'] = 'Filter uploaded files';
-$string['forcelogin'] = 'Force users to login';
-$string['forceloginforprofileimage'] = 'Force users to login to view user pictures';
+$string['forcelogin'] = 'Force users to log in';
+$string['forceloginforprofileimage'] = 'Force users to log in to view user pictures';
$string['forceloginforprofileimage_help'] = 'If enabled, users must login in order to view user profile pictures and the default user picture will be used in all notification emails.';
-$string['forceloginforprofiles'] = 'Force users to login for profiles';
+$string['forceloginforprofiles'] = 'Force users to log in for profiles';
$string['forcetimezone'] = 'Force default timezone';
$string['formatuninstallwithcourses'] = 'There are {$a->count} courses using {$a->format}. Their format will be changed to {$a->defaultformat} (default format for this site). Some format-specific data may be lost. Are you sure you want to proceed?';
$string['formatuninstallconfirm'] = '{$a} will be uninstalled. No courses currently use it. Continue?';
diff --git a/lang/en/completion.php b/lang/en/completion.php
index 8e3a45f3512..597612d1630 100644
--- a/lang/en/completion.php
+++ b/lang/en/completion.php
@@ -51,7 +51,7 @@ $string['completiondisabled'] = 'Disabled, not shown in activity settings';
$string['completionexpected'] = 'Expect completed on';
$string['completionexpected_help']='This setting specifies the date when the activity is expected to be completed. The date is not shown to students and is only displayed in the activity completion report.';
$string['completionicons'] = 'Completion tick boxes';
-$string['completionicons_help'] = 'A tick next an activity name may be used to indicate when the activity is complete.
+$string['completionicons_help'] = 'A tick next to an activity name may be used to indicate when the activity is complete.
If a box with a dotted border is shown, a tick will appear automatically when you have completed the activity according to conditions set by the teacher.
diff --git a/lang/en/error.php b/lang/en/error.php
index 5acbece280e..85858d4b53f 100644
--- a/lang/en/error.php
+++ b/lang/en/error.php
@@ -211,7 +211,7 @@ $string['duplicaterolename'] = 'There is already a role with this name!';
$string['duplicateroleshortname'] = 'There is already a role with this short name!';
$string['duplicateusername'] = 'Duplicate username - skipping record';
$string['emailfail'] = 'Emailing failed';
-$string['error'] = 'Error occured';
+$string['error'] = 'Error occurred';
$string['errorcleaningdirectory'] = 'Error cleaning directory "{$a}"';
$string['errorcopyingfiles'] = 'Error copying files';
$string['errorcreatingdirectory'] = 'Error creating directory "{$a}"';
diff --git a/lang/en/install.php b/lang/en/install.php
index aceb61fca90..ea3ac0691cc 100644
--- a/lang/en/install.php
+++ b/lang/en/install.php
@@ -38,7 +38,7 @@ $string['admindirsettingsub'] = 'A very few webhosts use /admin as a special URL
renaming the admin directory in your installation, and putting that
new name here. For example:
moodleadmin
This will fix admin links in Moodle.';
-$string['availablelangs'] = 'List of available languages';
+$string['availablelangs'] = 'Available language packs';
$string['caution'] = 'Caution';
$string['cliadminpassword'] = 'New admin user password';
$string['cliadminusername'] = 'Admin account username';
diff --git a/lang/en/mathslib.php b/lang/en/mathslib.php
index ab55cf0fa4e..488cbf8a51d 100644
--- a/lang/en/mathslib.php
+++ b/lang/en/mathslib.php
@@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['anunexpectederroroccured'] = 'an unexpected error occured';
+$string['anunexpectederroroccured'] = 'an unexpected error occurred';
$string['cannotassigntoconstant'] = 'cannot assign to constant \'{$a}\'';
$string['cannotredefinebuiltinfunction'] = 'cannot redefine built-in function \'{$a}()\'';
$string['divisionbyzero'] = 'division by zero';
diff --git a/lang/en/moodle.php b/lang/en/moodle.php
index 96c01a052dc..a7bcc3066af 100644
--- a/lang/en/moodle.php
+++ b/lang/en/moodle.php
@@ -328,6 +328,7 @@ $string['courselegacyfiles_help'] = 'The course files area provides some backwar
If you use this area to store course files, you can expose yourself to a number of privacy and security issues, as well as experiencing missing files in backups, course imports and any time content is shared or re-used. It is therefore recommended that you do not use this area unless you really know what you are doing.';
$string['courselegacyfiles_link'] = 'coursefiles2';
+$string['courselegacyfilesofcourse'] = 'Legacy course files: {$a}';
$string['courseoverview'] = 'Course overview';
$string['courseoverviewgraph'] = 'Course overview graph';
$string['courseprofiles'] = 'Course profiles';
diff --git a/lang/en/repository.php b/lang/en/repository.php
index f06d6695360..60da78b37db 100644
--- a/lang/en/repository.php
+++ b/lang/en/repository.php
@@ -102,7 +102,7 @@ $string['errornotyourfile'] = 'You cannot pick file which is not added by your';
$string['erroruniquename'] = 'Repository instance name should be unique';
$string['errorpostmaxsize'] = 'The uploaded file may exceed the post_max_size directive in php.ini.';
$string['errorwhilecommunicatingwith'] = 'Error while communicating with the repository \'{$a}\'.';
-$string['errorwhiledownload'] = 'An error occured while downloading the file: {$a}';
+$string['errorwhiledownload'] = 'An error occurred while downloading the file: {$a}';
$string['existingrepository'] = 'This repository already exists';
$string['federatedsearch'] = 'Federated search';
$string['fileexists'] = 'File name already being used, please use another name';
diff --git a/lib/configonlylib.php b/lib/configonlylib.php
index 031ac6184aa..8192704259d 100644
--- a/lib/configonlylib.php
+++ b/lib/configonlylib.php
@@ -95,6 +95,9 @@ function min_fix_utf8($value) {
error_reporting($olderror ^ E_NOTICE);
}
+ // No null bytes expected in our data, so let's remove it.
+ $value = str_replace("\0", '', $value);
+
static $buggyiconv = null;
if ($buggyiconv === null) {
$buggyiconv = (!function_exists('iconv') or iconv('UTF-8', 'UTF-8//IGNORE', '100'.chr(130).'€') !== '100€');
diff --git a/lib/dml/mssql_native_moodle_database.php b/lib/dml/mssql_native_moodle_database.php
index ecdf3bd92d4..fe640178490 100644
--- a/lib/dml/mssql_native_moodle_database.php
+++ b/lib/dml/mssql_native_moodle_database.php
@@ -639,6 +639,7 @@ class mssql_native_moodle_database extends moodle_database {
} else {
$param = str_replace("'", "''", $param);
+ $param = str_replace("\0", "", $param);
$return .= "N'$param'";
}
diff --git a/lib/dml/sqlsrv_native_moodle_database.php b/lib/dml/sqlsrv_native_moodle_database.php
index 8352d76f2cb..6343249f68e 100644
--- a/lib/dml/sqlsrv_native_moodle_database.php
+++ b/lib/dml/sqlsrv_native_moodle_database.php
@@ -719,6 +719,7 @@ class sqlsrv_native_moodle_database extends moodle_database {
$return .= $param;
} else {
$param = str_replace("'", "''", $param);
+ $param = str_replace("\0", "", $param);
$return .= "N'$param'";
}
diff --git a/lib/editor/tinymce/module.js b/lib/editor/tinymce/module.js
index 3a77d5194c9..ce625ea7823 100644
--- a/lib/editor/tinymce/module.js
+++ b/lib/editor/tinymce/module.js
@@ -68,6 +68,13 @@ M.editor_tinymce.init_editor = function(Y, editorid, options) {
ed.contentDocument.addEventListener('keydown', function() {
ed.contentWindow.focus();
});
+
+ // Whenever a touch event is registered against the content document,
+ // reapply focus. This works around an issue with the location caret not
+ // being focusable without use of the Loupe.
+ ed.contentDocument.addEventListener('touchend', function() {
+ ed.contentWindow.focus();
+ });
});
};
}
diff --git a/lib/ldaplib.php b/lib/ldaplib.php
index f33306888c9..8f9adbaa38b 100644
--- a/lib/ldaplib.php
+++ b/lib/ldaplib.php
@@ -241,9 +241,11 @@ function ldap_find_userdn($ldapconnection, $username, $contexts, $objectclass, $
}
if ($search_sub) {
- $ldap_result = ldap_search($ldapconnection, $context,
- '(&'.$objectclass.'('.$search_attrib.'='.ldap_filter_addslashes($username).'))',
- array($search_attrib));
+ if (!$ldap_result = @ldap_search($ldapconnection, $context,
+ '(&'.$objectclass.'('.$search_attrib.'='.ldap_filter_addslashes($username).'))',
+ array($search_attrib))) {
+ break; // Not found in this context.
+ }
} else {
$ldap_result = ldap_list($ldapconnection, $context,
'(&'.$objectclass.'('.$search_attrib.'='.ldap_filter_addslashes($username).'))',
diff --git a/lib/modinfolib.php b/lib/modinfolib.php
index 7b3ff8f9db8..29d4bb8c09f 100644
--- a/lib/modinfolib.php
+++ b/lib/modinfolib.php
@@ -1228,7 +1228,8 @@ class cm_info extends stdClass {
}
// You are blocked if you don't have the capability.
- return !has_capability($capability, context_module::instance($this->id));
+ $userid = $this->modinfo->get_user_id();
+ return !has_capability($capability, context_module::instance($this->id), $userid);
}
/**
@@ -1237,7 +1238,7 @@ class cm_info extends stdClass {
* @return bool True if the user cannot see the module. False if the activity is either available or should be greyed out.
*/
public function is_user_access_restricted_by_conditional_access() {
- global $CFG, $USER;
+ global $CFG;
if (empty($CFG->enableavailability)) {
return false;
diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index d0c5f18a599..243eeb85da7 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -1164,6 +1164,8 @@ function fix_utf8($value) {
// shortcut
return $value;
}
+ // No null bytes expected in our data, so let's remove it.
+ $value = str_replace("\0", '', $value);
// Lower error reporting because glibc throws bogus notices.
$olderror = error_reporting();
diff --git a/lib/tests/configonlylib_test.php b/lib/tests/configonlylib_test.php
index dc97baa84df..c56e4be4d78 100644
--- a/lib/tests/configonlylib_test.php
+++ b/lib/tests/configonlylib_test.php
@@ -44,7 +44,7 @@ class core_configonlylib_testcase extends advanced_testcase {
*/
public function test_min_fix_utf8() {
$this->assertSame('abc', min_fix_utf8('abc'));
- $this->assertSame("žlutý koníček přeskočil potůček \n\t\r\0", min_fix_utf8("žlutý koníček přeskočil potůček \n\t\r\0"));
+ $this->assertSame("žlutý koníček přeskočil potůček \n\t\r", min_fix_utf8("žlutý koníček přeskočil potůček \n\t\r\0"));
$this->assertSame('aš', min_fix_utf8('a'.chr(130).'š'), 'This fails with buggy iconv() when mbstring extenstion is not available as fallback.');
}
diff --git a/lib/tests/modinfolib_test.php b/lib/tests/modinfolib_test.php
index f5f65119066..298e3b7e4d8 100644
--- a/lib/tests/modinfolib_test.php
+++ b/lib/tests/modinfolib_test.php
@@ -176,6 +176,61 @@ class modinfolib_testcase extends advanced_testcase {
$this->assertFalse($cm_info->is_user_access_restricted_by_conditional_access());
}
+ public function test_is_user_access_restricted_by_capability() {
+ global $DB;
+
+ $this->resetAfterTest();
+
+ // Create a course and a mod_assign instance.
+ $course = $this->getDataGenerator()->create_course();
+ $assign = $this->getDataGenerator()->create_module('assign', array('course'=>$course->id));
+
+ // Create and enrol a student.
+ $coursecontext = context_course::instance($course->id);
+ $studentrole = $DB->get_record('role', array('shortname' => 'student'), '*', MUST_EXIST);
+ $student = $this->getDataGenerator()->create_user();
+ role_assign($studentrole->id, $student->id, $coursecontext);
+ $enrolplugin = enrol_get_plugin('manual');
+ $enrolinstance = $DB->get_record('enrol', array('courseid' => $course->id, 'enrol' => 'manual'));
+ $enrolplugin->enrol_user($enrolinstance, $student->id);
+ $this->setUser($student);
+
+ // Make sure student can see the module.
+ $cm = get_fast_modinfo($course->id)->instances['assign'][$assign->id];
+ $this->assertTrue($cm->uservisible);
+ $this->assertFalse($cm->is_user_access_restricted_by_capability());
+
+ // Prohibit student to view mod_assign for the course.
+ role_change_permission($studentrole->id, $coursecontext, 'mod/assign:view', CAP_PROHIBIT);
+ get_fast_modinfo($course->id, 0, true);
+ $cm = get_fast_modinfo($course->id)->instances['assign'][$assign->id];
+ $this->assertFalse($cm->uservisible);
+ $this->assertTrue($cm->is_user_access_restricted_by_capability());
+
+ // Restore permission to student to view mod_assign for the course.
+ role_change_permission($studentrole->id, $coursecontext, 'mod/assign:view', CAP_INHERIT);
+ get_fast_modinfo($course->id, 0, true);
+ $cm = get_fast_modinfo($course->id)->instances['assign'][$assign->id];
+ $this->assertTrue($cm->uservisible);
+ $this->assertFalse($cm->is_user_access_restricted_by_capability());
+
+ // Prohibit student to view mod_assign for the particular module.
+ role_change_permission($studentrole->id, context_module::instance($cm->id), 'mod/assign:view', CAP_PROHIBIT);
+ get_fast_modinfo($course->id, 0, true);
+ $cm = get_fast_modinfo($course->id)->instances['assign'][$assign->id];
+ $this->assertFalse($cm->uservisible);
+ $this->assertTrue($cm->is_user_access_restricted_by_capability());
+
+ // Check calling get_fast_modinfo() for different user:
+ $this->setAdminUser();
+ $cm = get_fast_modinfo($course->id)->instances['assign'][$assign->id];
+ $this->assertTrue($cm->uservisible);
+ $this->assertFalse($cm->is_user_access_restricted_by_capability());
+ $cm = get_fast_modinfo($course->id, $student->id)->instances['assign'][$assign->id];
+ $this->assertFalse($cm->uservisible);
+ $this->assertTrue($cm->is_user_access_restricted_by_capability());
+ }
+
private function refresh_cm_info($course, $assign) {
get_fast_modinfo(0, 0, true);
return get_fast_modinfo($course)->instances['assign'][$assign->id];
diff --git a/lib/tests/moodlelib_test.php b/lib/tests/moodlelib_test.php
index 529065750ec..76d59fef496 100644
--- a/lib/tests/moodlelib_test.php
+++ b/lib/tests/moodlelib_test.php
@@ -486,7 +486,7 @@ class moodlelib_testcase extends advanced_testcase {
$this->assertEquals($object, fix_utf8($object));
// valid utf8 string
- $this->assertSame("žlutý koníček přeskočil potůček \n\t\r\0", fix_utf8("žlutý koníček přeskočil potůček \n\t\r\0"));
+ $this->assertSame("žlutý koníček přeskočil potůček \n\t\r", fix_utf8("žlutý koníček přeskočil potůček \n\t\r\0"));
// invalid utf8 string
$this->assertSame('aš', fix_utf8('a'.chr(130).'š'), 'This fails with buggy iconv() when mbstring extenstion is not available as fallback.');
diff --git a/login/change_password.php b/login/change_password.php
index e2cc58d5e18..f369c034cfb 100644
--- a/login/change_password.php
+++ b/login/change_password.php
@@ -40,7 +40,7 @@ $PAGE->set_context(context_system::instance());
if ($return) {
// this redirect prevents security warning because https can not POST to http pages
if (empty($SESSION->wantsurl)
- or stripos(str_replace('https://', 'http://', $SESSION->wantsurl), str_replace('https://', 'http://', $CFG->wwwroot.'/login/change_password.php') === 0)) {
+ or stripos(str_replace('https://', 'http://', $SESSION->wantsurl), str_replace('https://', 'http://', $CFG->wwwroot.'/login/change_password.php')) === 0) {
$returnto = "$CFG->wwwroot/user/view.php?id=$USER->id&course=$id";
} else {
$returnto = $SESSION->wantsurl;
diff --git a/mod/assign/backup/moodle2/restore_assign_stepslib.php b/mod/assign/backup/moodle2/restore_assign_stepslib.php
index db94a461f73..c013933e523 100644
--- a/mod/assign/backup/moodle2/restore_assign_stepslib.php
+++ b/mod/assign/backup/moodle2/restore_assign_stepslib.php
@@ -89,6 +89,9 @@ class restore_assign_activity_structure_step extends restore_activity_structure_
$data->cutoffdate = $this->apply_date_offset($data->cutoffdate);
}
+ if ($data->grade < 0) { // Scale found, get mapping.
+ $data->grade = -($this->get_mappingid('scale', abs($data->grade)));
+ }
$newitemid = $DB->insert_record('assign', $data);
diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php
index 7207841ab85..7c87338c733 100644
--- a/mod/assign/locallib.php
+++ b/mod/assign/locallib.php
@@ -3128,9 +3128,10 @@ class assign {
$team = groups_get_members($submission->groupid, 'u.id');
foreach ($team as $member) {
- $submission->groupid = 0;
- $submission->userid = $member->id;
- $this->gradebook_item_update($submission, null);
+ $membersubmission = clone $submission;
+ $membersubmission->groupid = 0;
+ $membersubmission->userid = $member->id;
+ $this->gradebook_item_update($membersubmission, null);
}
return;
}
@@ -4472,7 +4473,7 @@ class assign {
// Give each submission plugin a chance to process the locking.
$plugins = $this->get_submission_plugins();
- $submission = $this->get_user_submission($userid, false);
+ $submission = $this->get_user_submission($userid, true);
foreach ($plugins as $plugin) {
if ($plugin->is_enabled() && $plugin->is_visible()) {
$plugin->lock($submission);
@@ -4508,7 +4509,7 @@ class assign {
// Give each submission plugin a chance to process the locking.
$plugins = $this->get_submission_plugins();
- $submission = $this->get_user_submission($userid, false);
+ $submission = $this->get_user_submission($userid, true);
foreach ($plugins as $plugin) {
if ($plugin->is_enabled() && $plugin->is_visible()) {
$plugin->unlock($submission);
diff --git a/mod/assignment/backup/moodle1/lib.php b/mod/assignment/backup/moodle1/lib.php
index 68c955292f4..9ddc169797d 100644
--- a/mod/assignment/backup/moodle1/lib.php
+++ b/mod/assignment/backup/moodle1/lib.php
@@ -194,7 +194,8 @@ class moodle1_mod_assignment_handler extends moodle1_mod_handler {
}
if (!isset($this->subpluginhandlers[$subplugin])) {
- throw new moodle1_convert_exception('unsupported_subplugin', 'assignment_'.$subplugin);
+ // Generic handling, prevents breaking conversion process...
+ $this->subpluginhandlers[$subplugin] = new moodle1_assignment_unsupported_subplugin_handler($this, $subplugin);
}
return $this->subpluginhandlers[$subplugin];
@@ -236,4 +237,10 @@ abstract class moodle1_assignment_subplugin_handler extends moodle1_submod_handl
//you will probably want to do stuff with $this->xmlwriter here (within your overridden method) to write plugin specific data.
}
+}
+
+/**
+ * This class handles subplugins that do not exist or that are not supported
+ */
+class moodle1_assignment_unsupported_subplugin_handler extends moodle1_assignment_subplugin_handler {
}
\ No newline at end of file
diff --git a/mod/assignment/backup/moodle2/restore_assignment_stepslib.php b/mod/assignment/backup/moodle2/restore_assignment_stepslib.php
index 0d95d76d6e2..b7f8f56243e 100644
--- a/mod/assignment/backup/moodle2/restore_assignment_stepslib.php
+++ b/mod/assignment/backup/moodle2/restore_assignment_stepslib.php
@@ -72,6 +72,11 @@ class restore_assignment_activity_structure_step extends restore_activity_struct
$newitemid = $DB->insert_record('assignment', $data);
// immediately after inserting "activity" record, call this
$this->apply_activity_instance($newitemid);
+
+ // Hide unsupported sub-plugins
+ if (!$this->is_valid_assignment_subplugin($data->assignmenttype)) {
+ $DB->set_field('course_modules', 'visible', 0, array('id' => $this->get_task()->get_moduleid()));
+ }
}
protected function process_assignment_submission($data) {
@@ -100,4 +105,19 @@ class restore_assignment_activity_structure_step extends restore_activity_struct
$this->add_related_files('mod_assignment', 'submission', 'assignment_submission');
$this->add_related_files('mod_assignment', 'response', 'assignment_submission');
}
+
+ /**
+ * Determine if a sub-plugin is supported or not
+ *
+ * @param string $type
+ * @return bool
+ */
+ protected function is_valid_assignment_subplugin($type) {
+ static $subplugins = null;
+
+ if (is_null($subplugins)) {
+ $subplugins = get_plugin_list('assignment');
+ }
+ return array_key_exists($type, $subplugins);
+ }
}
diff --git a/mod/assignment/lang/en/assignment.php b/mod/assignment/lang/en/assignment.php
index eee525b65e0..29c37facb99 100644
--- a/mod/assignment/lang/en/assignment.php
+++ b/mod/assignment/lang/en/assignment.php
@@ -223,3 +223,4 @@ $string['viewfeedback'] = 'View assignment grades and feedback';
$string['viewmysubmission'] = 'View my submission';
$string['viewsubmissions'] = 'View {$a} submitted assignments';
$string['yoursubmission'] = 'Your submission';
+$string['unsupportedsubplugin'] = 'The assignment type of \'{$a}\' is not currently supported. You may wait until the assignment type is made available, or delete the assignment.';
diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php
index 7ed45af42e3..d3c27c704a1 100644
--- a/mod/assignment/lib.php
+++ b/mod/assignment/lib.php
@@ -3948,7 +3948,12 @@ function assignment_extend_settings_navigation(settings_navigation $settings, na
global $PAGE, $DB, $USER, $CFG;
$assignmentrow = $DB->get_record("assignment", array("id" => $PAGE->cm->instance));
- require_once "$CFG->dirroot/mod/assignment/type/$assignmentrow->assignmenttype/assignment.class.php";
+
+ $classfile = "$CFG->dirroot/mod/assignment/type/$assignmentrow->assignmenttype/assignment.class.php";
+ if (!file_exists($classfile)) {
+ return;
+ }
+ require_once($classfile);
$assignmentclass = 'assignment_'.$assignmentrow->assignmenttype;
$assignmentinstance = new $assignmentclass($PAGE->cm->id, $assignmentrow, $PAGE->cm, $PAGE->course);
diff --git a/mod/assignment/mod_form.php b/mod/assignment/mod_form.php
index bc0818fea2e..0a7e8361dbe 100644
--- a/mod/assignment/mod_form.php
+++ b/mod/assignment/mod_form.php
@@ -9,7 +9,7 @@ class mod_assignment_mod_form extends moodleform_mod {
protected $_assignmentinstance = null;
function definition() {
- global $CFG, $DB, $PAGE;
+ global $CFG, $DB, $PAGE, $COURSE;
$mform =& $this->_form;
// this hack is needed for different settings of each subtype
@@ -29,7 +29,11 @@ class mod_assignment_mod_form extends moodleform_mod {
$mform->setType('type', PARAM_ALPHA);
$mform->setDefault('type', $type);
- require_once($CFG->dirroot.'/mod/assignment/type/'.$type.'/assignment.class.php');
+ $classfile = $CFG->dirroot.'/mod/assignment/type/'.$type.'/assignment.class.php';
+ if (!file_exists($classfile)) {
+ throw new moodle_exception('unsupportedsubplugin', 'assignment', new moodle_url('/course/view.php', array('id' => $COURSE->id)), $type);
+ }
+ require_once($classfile);
$assignmentclass = 'assignment_'.$type;
$assignmentinstance = new $assignmentclass();
diff --git a/mod/assignment/view.php b/mod/assignment/view.php
index 2d80577189c..255a7c70c48 100644
--- a/mod/assignment/view.php
+++ b/mod/assignment/view.php
@@ -40,7 +40,11 @@ require_login($course, true, $cm);
$PAGE->requires->js('/mod/assignment/assignment.js');
-require ("$CFG->dirroot/mod/assignment/type/$assignment->assignmenttype/assignment.class.php");
+$classfile = "$CFG->dirroot/mod/assignment/type/$assignment->assignmenttype/assignment.class.php";
+if (!file_exists($classfile)) {
+ throw new moodle_exception('unsupportedsubplugin', 'assignment', new moodle_url('/course/view.php', array('id' => $course->id)), $assignment->assignmenttype);
+}
+require ($classfile);
$assignmentclass = "assignment_$assignment->assignmenttype";
$assignmentinstance = new $assignmentclass($cm->id, $assignment, $cm, $course);
diff --git a/mod/forum/lang/en/forum.php b/mod/forum/lang/en/forum.php
index 9ac7be4ed0c..66ecf9b815a 100644
--- a/mod/forum/lang/en/forum.php
+++ b/mod/forum/lang/en/forum.php
@@ -408,14 +408,14 @@ $string['tracking'] = 'Track';
$string['trackingoff'] = 'Off';
$string['trackingon'] = 'On';
$string['trackingoptional'] = 'Optional';
-$string['trackingtype'] = 'Read tracking for this forum?';
-$string['trackingtype_help'] = 'If enabled, participants can track read and unread messages in the forum and in discussions.
+$string['trackingtype'] = 'Read tracking';
+$string['trackingtype_help'] = 'If enabled, participants can track read and unread posts in the forum and in discussions. There are three options:
-There are three options:
-
-* Optional - Participants can choose whether to turn tracking on or off
+* Optional - Participants can choose whether to turn tracking on or off via a link in the administration block
* On - Tracking is always on
-* Off - Tracking is always off';
+* Off - Read and unread posts are not tracked
+
+Note: Forum tracking must also be enabled in the user\'s profile settings.';
$string['unread'] = 'Unread';
$string['unreadposts'] = 'Unread posts';
$string['unreadpostsnumber'] = '{$a} unread posts';
diff --git a/mod/lesson/lang/en/lesson.php b/mod/lesson/lang/en/lesson.php
index be1200f41b0..ca49554a3ac 100644
--- a/mod/lesson/lang/en/lesson.php
+++ b/mod/lesson/lang/en/lesson.php
@@ -235,7 +235,7 @@ $string['maxgrade'] = 'Maximum grade';
$string['maxgrade_help'] = 'This setting specifies the maximum grade for the lesson. If set to 0, the lesson does not appear in the grades pages.';
$string['maxhighscores'] = 'Number of high scores displayed';
$string['maximumnumberofanswersbranches'] = 'Maximum number of answers';
-$string['maximumnumberofanswersbranches_help'] = 'This setting specifies the maximum number of answers that may be used in the lesson. If only true/false questions are used, it can be set to 2. The setting may be changed at any time, since it only effects what the teacher sees, not the data.';
+$string['maximumnumberofanswersbranches_help'] = 'This setting specifies the maximum number of answers that may be used in the lesson. If only true/false questions are used, it can be set to 2. The setting may be changed at any time, since it only affects what the teacher sees, not the data.';
$string['maximumnumberofattempts'] = 'Maximum number of attempts';
$string['maximumnumberofattempts_help'] = 'This setting specifies the maximum number of attempts allowed for each question. If answered incorrectly repeatedly, when the maximum is reached, the next page of the lesson is displayed.';
$string['maximumnumberofattemptsreached'] = 'Maximum number of attempts reached - Moving to next page';
diff --git a/mod/lti/lang/en/lti.php b/mod/lti/lang/en/lti.php
index 2c43bb6d5cd..606e2d6110a 100644
--- a/mod/lti/lang/en/lti.php
+++ b/mod/lti/lang/en/lti.php
@@ -224,7 +224,7 @@ $string['lti:requesttooladd'] = 'Request a tool is configured site-wide';
$string['lti:view'] = 'Launch external tool activities';
$string['lti_administration'] = 'LTI Administration';
$string['lti_errormsg'] = 'The tool returned the following error message: "{$a}"';
-$string['lti_launch_error'] = 'An error occured when launching the external tool: ';
+$string['lti_launch_error'] = 'An error occurred when launching the external tool:';
$string['lti_launch_error_tool_request'] = '
To submit a request for an administrator to complete the tool configuration, click here.
';
diff --git a/portfolio/googledocs/db/upgrade.php b/portfolio/googledocs/db/upgrade.php
index 8a333e67cdb..086102bf685 100644
--- a/portfolio/googledocs/db/upgrade.php
+++ b/portfolio/googledocs/db/upgrade.php
@@ -20,6 +20,7 @@
*/
function xmldb_portfolio_googledocs_upgrade($oldversion) {
global $CFG, $DB;
+ require_once(__DIR__.'/upgradelib.php');
$dbman = $DB->get_manager();
@@ -49,28 +50,3 @@ function xmldb_portfolio_googledocs_upgrade($oldversion) {
return true;
}
-
-function portfolio_googledocs_admin_upgrade_notification() {
- $admins = get_admins();
-
- if (empty($admins)) {
- return;
- }
- $a = new stdClass;
- $a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
-
- foreach ($admins as $admin) {
- $message = new stdClass();
- $message->component = 'moodle';
- $message->name = 'notices';
- $message->userfrom = get_admin();
- $message->userto = $admin;
- $message->smallmessage = get_string('oauth2upgrade_message_small', 'portfolio_googledocs');
- $message->subject = get_string('oauth2upgrade_message_subject', 'portfolio_googledocs');
- $message->fullmessage = get_string('oauth2upgrade_message_content', 'portfolio_googledocs', $a);
- $message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'portfolio_googledocs', $a);
- $message->fullmessageformat = FORMAT_PLAIN;
- $message->notification = 1;
- message_send($message);
- }
-}
diff --git a/portfolio/googledocs/db/upgradelib.php b/portfolio/googledocs/db/upgradelib.php
new file mode 100644
index 00000000000..4658ed8deb5
--- /dev/null
+++ b/portfolio/googledocs/db/upgradelib.php
@@ -0,0 +1,53 @@
+.
+
+/**
+ * Googledocs portfolio upgrade script.
+ *
+ * @package portfolio_googledocs
+ * @copyright 2013 Dan Poltawski
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+/**
+ * Inform admins about setup required for googledocs change.
+ */
+function portfolio_googledocs_admin_upgrade_notification() {
+ $admins = get_admins();
+
+ if (empty($admins)) {
+ return;
+ }
+ $a = new stdClass;
+ $a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
+
+ foreach ($admins as $admin) {
+ $message = new stdClass();
+ $message->component = 'moodle';
+ $message->name = 'notices';
+ $message->userfrom = get_admin();
+ $message->userto = $admin;
+ $message->smallmessage = get_string('oauth2upgrade_message_small', 'portfolio_googledocs');
+ $message->subject = get_string('oauth2upgrade_message_subject', 'portfolio_googledocs');
+ $message->fullmessage = get_string('oauth2upgrade_message_content', 'portfolio_googledocs', $a);
+ $message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'portfolio_googledocs', $a);
+ $message->fullmessageformat = FORMAT_PLAIN;
+ $message->notification = 1;
+ message_send($message);
+ }
+}
diff --git a/portfolio/picasa/db/upgrade.php b/portfolio/picasa/db/upgrade.php
index 8ced99d45cc..ee092b6b76c 100644
--- a/portfolio/picasa/db/upgrade.php
+++ b/portfolio/picasa/db/upgrade.php
@@ -20,6 +20,7 @@
*/
function xmldb_portfolio_picasa_upgrade($oldversion) {
global $CFG, $DB;
+ require_once(__DIR__.'/upgradelib.php');
$dbman = $DB->get_manager();
@@ -49,28 +50,3 @@ function xmldb_portfolio_picasa_upgrade($oldversion) {
return true;
}
-
-function portfolio_picasa_admin_upgrade_notification() {
- $admins = get_admins();
-
- if (empty($admins)) {
- return;
- }
- $a = new stdClass;
- $a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
-
- foreach ($admins as $admin) {
- $message = new stdClass();
- $message->component = 'moodle';
- $message->name = 'notices';
- $message->userfrom = get_admin();
- $message->userto = $admin;
- $message->smallmessage = get_string('oauth2upgrade_message_small', 'portfolio_picasa');
- $message->subject = get_string('oauth2upgrade_message_subject', 'portfolio_picasa');
- $message->fullmessage = get_string('oauth2upgrade_message_content', 'portfolio_picasa', $a);
- $message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'portfolio_picasa', $a);
- $message->fullmessageformat = FORMAT_PLAIN;
- $message->notification = 1;
- message_send($message);
- }
-}
diff --git a/portfolio/picasa/db/upgradelib.php b/portfolio/picasa/db/upgradelib.php
new file mode 100644
index 00000000000..a711cbfc46f
--- /dev/null
+++ b/portfolio/picasa/db/upgradelib.php
@@ -0,0 +1,53 @@
+.
+
+/**
+ * Picasa portfolio upgrade script.
+ *
+ * @package portfolio_picasa
+ * @copyright 2013 Dan Poltawski
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+/**
+ * Inform admins about setup required for picasa change.
+ */
+function portfolio_picasa_admin_upgrade_notification() {
+ $admins = get_admins();
+
+ if (empty($admins)) {
+ return;
+ }
+ $a = new stdClass;
+ $a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
+
+ foreach ($admins as $admin) {
+ $message = new stdClass();
+ $message->component = 'moodle';
+ $message->name = 'notices';
+ $message->userfrom = get_admin();
+ $message->userto = $admin;
+ $message->smallmessage = get_string('oauth2upgrade_message_small', 'portfolio_picasa');
+ $message->subject = get_string('oauth2upgrade_message_subject', 'portfolio_picasa');
+ $message->fullmessage = get_string('oauth2upgrade_message_content', 'portfolio_picasa', $a);
+ $message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'portfolio_picasa', $a);
+ $message->fullmessageformat = FORMAT_PLAIN;
+ $message->notification = 1;
+ message_send($message);
+ }
+}
diff --git a/question/engine/lib.php b/question/engine/lib.php
index c4f95cf6e55..e857b816b37 100644
--- a/question/engine/lib.php
+++ b/question/engine/lib.php
@@ -26,6 +26,7 @@
defined('MOODLE_INTERNAL') || die();
+require_once($CFG->libdir . '/filelib.php');
require_once(dirname(__FILE__) . '/questionusage.php');
require_once(dirname(__FILE__) . '/questionattempt.php');
require_once(dirname(__FILE__) . '/questionattemptstep.php');
diff --git a/report/security/lang/en/report_security.php b/report/security/lang/en/report_security.php
index 84110928ef0..f855296a64b 100644
--- a/report/security/lang/en/report_security.php
+++ b/report/security/lang/en/report_security.php
@@ -85,7 +85,7 @@ $string['check_noauth_details'] = 'The No authentication plugin is n
$string['check_noauth_error'] = 'The No authentication plugin cannot be used on production sites.';
$string['check_noauth_name'] = 'No authentication';
$string['check_noauth_ok'] = 'No authentication plugin is disabled.';
-$string['check_openprofiles_details'] = '
Open user profiles can be abused by spammers. It is recommended that either Force users to login for profiles or Force users to login are enabled.
';
+$string['check_openprofiles_details'] = 'Open user profiles can be abused by spammers. It is recommended that either Force users to log in for profiles or Force users to log in are enabled.';
$string['check_openprofiles_error'] = 'Anyone can may view user profiles without logging in.';
$string['check_openprofiles_name'] = 'Open user profiles';
$string['check_openprofiles_ok'] = 'Login is required before viewing user profiles.';
diff --git a/repository/coursefiles/lib.php b/repository/coursefiles/lib.php
index ba4891a3edd..b81904827b2 100644
--- a/repository/coursefiles/lib.php
+++ b/repository/coursefiles/lib.php
@@ -180,10 +180,15 @@ class repository_coursefiles extends repository {
return parent::is_visible();
}
+ /**
+ * Return the repository name.
+ *
+ * @return string
+ */
public function get_name() {
- list($context, $course, $cm) = get_context_info_array($this->context->id);
- if (!empty($course)) {
- return get_string('courselegacyfiles') . format_string($course->shortname, true, array('context' => get_course_context($context)));
+ $context = $this->context->get_course_context(false);
+ if ($context) {
+ return get_string('courselegacyfilesofcourse', 'moodle', $context->get_context_name(false, true));
} else {
return get_string('courselegacyfiles');
}
diff --git a/repository/filepicker.js b/repository/filepicker.js
index b13aee502cb..5852303df3a 100644
--- a/repository/filepicker.js
+++ b/repository/filepicker.js
@@ -502,6 +502,7 @@ M.core_filepicker.show = function(Y, options) {
M.core_filepicker.init(Y, options);
}
M.core_filepicker.instances[options.client_id].show();
+ document.getElementById("filepicker-"+ options.client_id).focus();
};
M.core_filepicker.set_templates = function(Y, templates) {
@@ -1293,11 +1294,13 @@ M.core_filepicker.init = function(Y, options) {
},
render: function() {
var client_id = this.options.client_id;
+ var fpid = "filepicker-"+ client_id;
+ var labelid = 'fp-dialog-label_'+ client_id;
this.fpnode = Y.Node.createWithFilesSkin(M.core_filepicker.templates.generallayout).
- set('id', 'filepicker-'+client_id);
+ set('id', fpid).set('aria-labelledby', labelid);
this.mainui = new Y.Panel({
srcNode : this.fpnode,
- headerContent: M.str.repository.filepicker,
+ headerContent: ''+ M.str.repository.filepicker +'',
zIndex : 7500,
centered : true,
modal : true,
diff --git a/repository/googledocs/db/upgrade.php b/repository/googledocs/db/upgrade.php
index 57ae6de7f3b..781617e4e7b 100644
--- a/repository/googledocs/db/upgrade.php
+++ b/repository/googledocs/db/upgrade.php
@@ -20,6 +20,7 @@
*/
function xmldb_repository_googledocs_upgrade($oldversion) {
global $CFG, $DB;
+ require_once(__DIR__.'/upgradelib.php');
$dbman = $DB->get_manager();
@@ -52,28 +53,3 @@ function xmldb_repository_googledocs_upgrade($oldversion) {
return true;
}
-
-function repository_googledocs_admin_upgrade_notification() {
- $admins = get_admins();
-
- if (empty($admins)) {
- return;
- }
-
- $a = new stdClass;
- $a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
- foreach ($admins as $admin) {
- $message = new stdClass();
- $message->component = 'moodle';
- $message->name = 'notices';
- $message->userfrom = get_admin();
- $message->userto = $admin;
- $message->smallmessage = get_string('oauth2upgrade_message_small', 'repository_googledocs');
- $message->subject = get_string('oauth2upgrade_message_subject', 'repository_googledocs');
- $message->fullmessage = get_string('oauth2upgrade_message_content', 'repository_googledocs', $a);
- $message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'repository_googledocs', $a);
- $message->fullmessageformat = FORMAT_PLAIN;
- $message->notification = 1;
- message_send($message);
- }
-}
diff --git a/repository/googledocs/db/upgradelib.php b/repository/googledocs/db/upgradelib.php
new file mode 100644
index 00000000000..c065bd0a87e
--- /dev/null
+++ b/repository/googledocs/db/upgradelib.php
@@ -0,0 +1,53 @@
+.
+
+/**
+ * Googledocs repository upgrade script.
+ *
+ * @package repository_googledocs
+ * @copyright 2013 Dan Poltawski
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+/**
+ * Inform admins about setup required for googledocs change.
+ */
+function repository_googledocs_admin_upgrade_notification() {
+ $admins = get_admins();
+
+ if (empty($admins)) {
+ return;
+ }
+
+ $a = new stdClass;
+ $a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
+ foreach ($admins as $admin) {
+ $message = new stdClass();
+ $message->component = 'moodle';
+ $message->name = 'notices';
+ $message->userfrom = get_admin();
+ $message->userto = $admin;
+ $message->smallmessage = get_string('oauth2upgrade_message_small', 'repository_googledocs');
+ $message->subject = get_string('oauth2upgrade_message_subject', 'repository_googledocs');
+ $message->fullmessage = get_string('oauth2upgrade_message_content', 'repository_googledocs', $a);
+ $message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'repository_googledocs', $a);
+ $message->fullmessageformat = FORMAT_PLAIN;
+ $message->notification = 1;
+ message_send($message);
+ }
+}
diff --git a/repository/lib.php b/repository/lib.php
index 42ed8886535..8ddb378ff4c 100644
--- a/repository/lib.php
+++ b/repository/lib.php
@@ -255,6 +255,7 @@ class repository_type {
}
//run plugin_init function
if (!repository::static_function($this->_typename, 'plugin_init')) {
+ $this->update_visibility(false);
if (!$silent) {
throw new repository_exception('cannotinitplugin', 'repository');
}
@@ -1074,7 +1075,7 @@ abstract class repository {
*
* @static
* @param string $plugin repository plugin name
- * @param string $function funciton name
+ * @param string $function function name
* @return mixed
*/
public static function static_function($plugin, $function) {
@@ -1087,14 +1088,6 @@ abstract class repository {
return false;
}
- $pname = null;
- if (is_object($plugin) || is_array($plugin)) {
- $plugin = (object)$plugin;
- $pname = $plugin->name;
- } else {
- $pname = $plugin;
- }
-
$args = func_get_args();
if (count($args) <= 2) {
$args = array();
@@ -2306,7 +2299,7 @@ abstract class repository {
/**
* For oauth like external authentication, when external repository direct user back to moodle,
- * this funciton will be called to set up token and token_secret
+ * this function will be called to set up token and token_secret
*/
public function callback() {
}
diff --git a/repository/picasa/db/upgrade.php b/repository/picasa/db/upgrade.php
index c9132c1cdcc..214de0b3fb8 100644
--- a/repository/picasa/db/upgrade.php
+++ b/repository/picasa/db/upgrade.php
@@ -20,6 +20,7 @@
*/
function xmldb_repository_picasa_upgrade($oldversion) {
global $CFG, $DB;
+ require_once(__DIR__.'/upgradelib.php');
$dbman = $DB->get_manager();
@@ -52,28 +53,3 @@ function xmldb_repository_picasa_upgrade($oldversion) {
return true;
}
-
-function repository_picasa_admin_upgrade_notification() {
- $admins = get_admins();
-
- if (empty($admins)) {
- return;
- }
- $a = new stdClass;
- $a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
-
- foreach ($admins as $admin) {
- $message = new stdClass();
- $message->component = 'moodle';
- $message->name = 'notices';
- $message->userfrom = get_admin();
- $message->userto = $admin;
- $message->smallmessage = get_string('oauth2upgrade_message_small', 'repository_picasa');
- $message->subject = get_string('oauth2upgrade_message_subject', 'repository_picasa');
- $message->fullmessage = get_string('oauth2upgrade_message_content', 'repository_picasa', $a);
- $message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'repository_picasa', $a);
- $message->fullmessageformat = FORMAT_PLAIN;
- $message->notification = 1;
- message_send($message);
- }
-}
diff --git a/repository/picasa/db/upgradelib.php b/repository/picasa/db/upgradelib.php
new file mode 100644
index 00000000000..4d76af52bef
--- /dev/null
+++ b/repository/picasa/db/upgradelib.php
@@ -0,0 +1,53 @@
+.
+
+/**
+ * Picasa repository upgrade script.
+ *
+ * @package repository_picasa
+ * @copyright 2013 Dan Poltawski
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+/**
+ * Inform admins about setup required for google picasa change.
+ */
+function repository_picasa_admin_upgrade_notification() {
+ $admins = get_admins();
+
+ if (empty($admins)) {
+ return;
+ }
+ $a = new stdClass;
+ $a->docsurl = get_docs_url('Google_OAuth_2.0_setup');
+
+ foreach ($admins as $admin) {
+ $message = new stdClass();
+ $message->component = 'moodle';
+ $message->name = 'notices';
+ $message->userfrom = get_admin();
+ $message->userto = $admin;
+ $message->smallmessage = get_string('oauth2upgrade_message_small', 'repository_picasa');
+ $message->subject = get_string('oauth2upgrade_message_subject', 'repository_picasa');
+ $message->fullmessage = get_string('oauth2upgrade_message_content', 'repository_picasa', $a);
+ $message->fullmessagehtml = get_string('oauth2upgrade_message_content', 'repository_picasa', $a);
+ $message->fullmessageformat = FORMAT_PLAIN;
+ $message->notification = 1;
+ message_send($message);
+ }
+}
diff --git a/theme/base/style/core.css b/theme/base/style/core.css
index 71c05fbe83d..b1b61c2b338 100644
--- a/theme/base/style/core.css
+++ b/theme/base/style/core.css
@@ -301,6 +301,7 @@ input#id_externalurl {direction:ltr;}
.groupmanagementtable #potentialcell {width: 42%;}
.groupmanagementtable #buttonscell {width: 16%;}
.groupmanagementtable #buttonscell input {width: 80%;}
+.groupmanagementtable #buttonscell p.arrow_button input {width: auto;min-width: 80%;margin: 0 auto;}
.groupmanagementtable #removeselect_wrapper,
.groupmanagementtable #addselect_wrapper {width: 100%;}
.groupmanagementtable #removeselect_wrapper label,
diff --git a/user/messageselect.php b/user/messageselect.php
index 51f62919561..2d357424430 100644
--- a/user/messageselect.php
+++ b/user/messageselect.php
@@ -58,13 +58,12 @@ if ($deluser !== 0) {
$url->param('deluser', $deluser);
}
$PAGE->set_url($url);
-$PAGE->set_context(context_system::instance());
if (!$course = $DB->get_record('course', array('id'=>$id))) {
print_error('invalidcourseid');
}
-require_login();
+require_login($course);
$coursecontext = context_course::instance($id); // Course context
$systemcontext = context_system::instance(); // SYSTEM context
diff --git a/user/profile/field/menu/lang/en/profilefield_menu.php b/user/profile/field/menu/lang/en/profilefield_menu.php
index cb9b0eb5e18..545d352c537 100644
--- a/user/profile/field/menu/lang/en/profilefield_menu.php
+++ b/user/profile/field/menu/lang/en/profilefield_menu.php
@@ -23,4 +23,4 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['pluginname'] = 'Menu of choices';
+$string['pluginname'] = 'Dropdown menu';
diff --git a/version.php b/version.php
index a92c37cd649..31ce846d4ee 100644
--- a/version.php
+++ b/version.php
@@ -29,11 +29,11 @@
defined('MOODLE_INTERNAL') || die();
-$version = 2012120305.12; // 20121203 = branching date YYYYMMDD - do not modify!
+$version = 2012120305.13; // 20121203 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches
// .XX = incremental changes
-$release = '2.4.5+ (Build: 20130830)'; // Human-friendly version name
+$release = '2.4.5+ (Build: 20130905)'; // Human-friendly version name
$branch = '24'; // this version's branch
$maturity = MATURITY_STABLE; // this version's maturity level