Compare commits
261 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d09dc52b0a | |||
| 6e19850f6e | |||
| 5d30474242 | |||
| 1b972c31ac | |||
| 29b6ac23e9 | |||
| 44b6ffb68c | |||
| 79abbd9adc | |||
| 270524858e | |||
| 60f9a401a9 | |||
| ac0b8201a9 | |||
| be27fc0fe3 | |||
| ebd104448f | |||
| c69f425a7a | |||
| e38e718441 | |||
| cb628a9a08 | |||
| 0cbcd08946 | |||
| 5ff115743c | |||
| ea8c34da48 | |||
| 823fc75421 | |||
| b5e4b37aae | |||
| 84dad5bffa | |||
| 9101a01fb8 | |||
| fbb219617b | |||
| dad4bcf90c | |||
| 85354cb79e | |||
| 74afdef07d | |||
| bcd85def5c | |||
| 085353b315 | |||
| 0eac5cf446 | |||
| fdf2abf871 | |||
| 87173da483 | |||
| 98fada12c4 | |||
| 1a368ec351 | |||
| d71865419b | |||
| 9cf58f070d | |||
| b13fe83adb | |||
| 44b92ecdfc | |||
| dda38f91ab | |||
| 9aaf61346f | |||
| 7d82e35e39 | |||
| 030f164ecc | |||
| b154e2bf7b | |||
| 0a83e9f713 | |||
| cb14e3bc08 | |||
| d996eb941f | |||
| f87181fdaf | |||
| df6d0b6d45 | |||
| c8527895b0 | |||
| 676545bc66 | |||
| 5aba38cbc1 | |||
| da868a1e32 | |||
| b1e01063a8 | |||
| 3dd518b7d2 | |||
| c7891de160 | |||
| c337741524 | |||
| 2a9e70a818 | |||
| 494575bc55 | |||
| e412548506 | |||
| d67e734678 | |||
| f3194f39bb | |||
| 4d446b8814 | |||
| 236f56d906 | |||
| d9c72b7df9 | |||
| ff015b5f7a | |||
| 5c9bc966eb | |||
| 79182e7ae5 | |||
| 23e347bb32 | |||
| 5f79d8f314 | |||
| 1add1cd644 | |||
| e8eae37607 | |||
| c45d11de06 | |||
| 3bf11f7335 | |||
| d82cc9f297 | |||
| a75af1d053 | |||
| 12d238100d | |||
| 99cbd6197a | |||
| 4631749c5a | |||
| 347fb901a7 | |||
| dfd6eec2b4 | |||
| 986d1a20f6 | |||
| e2cf9af22d | |||
| 2edfbf880a | |||
| e677e0e53b | |||
| 051c675fd2 | |||
| 71b13a84a4 | |||
| 302586a5bc | |||
| 41cc9fbb57 | |||
| 2809ab7b52 | |||
| c483a8eee7 | |||
| a009ce6014 | |||
| a471607457 | |||
| af3cfc7729 | |||
| 999030766b | |||
| e4088b7582 | |||
| e492a5540d | |||
| a2cb00b655 | |||
| b14ad6e17d | |||
| 87bb5954eb | |||
| 65c6723681 | |||
| 3528c86c12 | |||
| 9f61908ccd | |||
| 5cd2cd385c | |||
| bb63b48bcb | |||
| 4bcdf02c5f | |||
| 3e2b8b21c6 | |||
| f2462522f6 | |||
| 36fabf72c0 | |||
| b402a163e3 | |||
| bde5947d13 | |||
| 8dbaf173b9 | |||
| 7f6f45c460 | |||
| 425f5adcca | |||
| cb38961988 | |||
| ad5de40c49 | |||
| 02383d7119 | |||
| ecefd2d5b5 | |||
| 224567a0f2 | |||
| 599703e83d | |||
| 8b52601b1a | |||
| 12008f51e2 | |||
| 69f2118621 | |||
| 1b8caf1970 | |||
| 414da8c0be | |||
| beb7083381 | |||
| c296c48f66 | |||
| 35889e23b7 | |||
| 7d678923b3 | |||
| 720cc99331 | |||
| 252f0e16ea | |||
| 4fb38666b4 | |||
| 0847aa120c | |||
| b694b9b8e2 | |||
| 28ff6ad1da | |||
| 8e91aaabc9 | |||
| 92bea7db2a | |||
| 79a607eb3c | |||
| 26ce2c0a81 | |||
| 78fd9a2b53 | |||
| c039ba7341 | |||
| 9ecc75d497 | |||
| 1dcb2445c6 | |||
| 7c60fac9dc | |||
| 5dfd0e63a0 | |||
| 90015eff82 | |||
| 2be9a4aecb | |||
| 34b940f682 | |||
| 30e89a5a9d | |||
| c30a2c9903 | |||
| c746921e6e | |||
| a0a365fe43 | |||
| 9946d0a5bf | |||
| a46a951e87 | |||
| 9c8203cf14 | |||
| cbd6122e27 | |||
| 70abb41263 | |||
| 69b6e2e9bc | |||
| ae09cccf5a | |||
| eae1a1eda7 | |||
| 2102625e09 | |||
| 121fa4381e | |||
| ede77961aa | |||
| b564a55153 | |||
| ac81c98648 | |||
| b5f63b1e90 | |||
| 77295b2922 | |||
| 4f95f92edc | |||
| 495e1b5615 | |||
| 070d4819b2 | |||
| 1d163100ec | |||
| 819cb2054b | |||
| f4aa71be50 | |||
| 6adee4a7b5 | |||
| 2f22731a36 | |||
| 00e103a7b4 | |||
| c9b0f33f78 | |||
| 715c45aac9 | |||
| f89055372e | |||
| ef9f22a85c | |||
| 730284fc16 | |||
| f83041790a | |||
| c84ee67864 | |||
| 644ffbd332 | |||
| b263491138 | |||
| 3c1d2a88c2 | |||
| 4ecb387d55 | |||
| a78a876629 | |||
| 3559677cb7 | |||
| d77efead0a | |||
| 0225ad42ea | |||
| dcb35b721c | |||
| bc7195fa02 | |||
| 918776482a | |||
| 43f6899289 | |||
| ffd303146f | |||
| 727d3d70e1 | |||
| 60e265e76f | |||
| b20a6a4af6 | |||
| a7ca299373 | |||
| 1cc37dc523 | |||
| 4f97ea8856 | |||
| 04e83dcf10 | |||
| 2f7076ebf2 | |||
| eb2fe63ef1 | |||
| 4283291889 | |||
| 08cd15658a | |||
| b2cb05a8c7 | |||
| 16d4f75b26 | |||
| 16913e60b3 | |||
| 6b036d04cf | |||
| c752cce7dd | |||
| 201cebeae5 | |||
| 9af8b0aef1 | |||
| 94693027e0 | |||
| cd492e2ea5 | |||
| 674c00edb2 | |||
| 892356acaa | |||
| a6c4e6f0a6 | |||
| dd2d82e55c | |||
| c47fea4e75 | |||
| 94db315b50 | |||
| a356db0db2 | |||
| 31cc108654 | |||
| 90a4438139 | |||
| 9b2d10e522 | |||
| 237786f159 | |||
| 08ae9a7362 | |||
| 2044a53946 | |||
| 365dce5fad | |||
| da714be155 | |||
| a54115355a | |||
| b46c7d5d9f | |||
| 8699a985bc | |||
| 18b947671b | |||
| 8cba8d1a58 | |||
| 810da68e14 | |||
| c660772600 | |||
| 1dee827c39 | |||
| de79a81f5b | |||
| d2708759d8 | |||
| 62b6e6f20d | |||
| ff85fe3e53 | |||
| 73fda8faeb | |||
| 33022ee1d5 | |||
| 11988d74b4 | |||
| 104cc0e3b1 | |||
| 2e477f03cc | |||
| 904c37c6c8 | |||
| a28c222e63 | |||
| f11a7d6a05 | |||
| 329f1f23ff | |||
| 214696b04f | |||
| 4f8c9232f1 | |||
| 61fafe8127 | |||
| 18550c0afb | |||
| 347b771a4b | |||
| c7d33da305 | |||
| e4a97a7a01 | |||
| 667f564b4d | |||
| b08e7312c3 | |||
| 9f12dd7a2f | |||
| 356bfb698f |
+1
-1
@@ -207,7 +207,7 @@ before_script:
|
||||
# We need the official upstream for comparison
|
||||
git remote add upstream https://github.com/moodle/moodle.git;
|
||||
|
||||
git fetch upstream master;
|
||||
git fetch upstream MOODLE_36_STABLE;
|
||||
export GIT_PREVIOUS_COMMIT="`git merge-base FETCH_HEAD $TRAVIS_COMMIT`";
|
||||
export GIT_COMMIT="$TRAVIS_COMMIT";
|
||||
export UPSTREAM_FETCH_HEAD=`git rev-parse FETCH_HEAD`
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_analytics'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'tool_availabilityconditions';
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'tool_behat'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_capability'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_cohortroles'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
$plugin->dependencies = array(
|
||||
|
||||
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'tool_customlang'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1087,12 +1087,16 @@ class api {
|
||||
|
||||
// Create the approved contextlist collection object.
|
||||
$approvedcollection = new contextlist_collection($collection->get_userid());
|
||||
$isconfigured = data_registry::defaults_set();
|
||||
|
||||
foreach ($collection as $contextlist) {
|
||||
$contextids = [];
|
||||
foreach ($contextlist as $context) {
|
||||
if (self::DATAREQUEST_TYPE_DELETE == $type) {
|
||||
if ($isconfigured && self::DATAREQUEST_TYPE_DELETE == $type) {
|
||||
// Data can only be deleted from it if the context is either expired, or unprotected.
|
||||
// Note: We can only check whether a context is expired or unprotected if the site is configured and
|
||||
// defaults are set appropriately. If they are not, we treat all contexts as though they are
|
||||
// unprotected.
|
||||
$purpose = static::get_effective_context_purpose($context);
|
||||
if (!expired_contexts_manager::is_context_expired_or_unprotected_for_user($context, $foruser)) {
|
||||
continue;
|
||||
|
||||
@@ -74,11 +74,9 @@ class process_data_request_task extends adhoc_task {
|
||||
return;
|
||||
}
|
||||
|
||||
// If no site purpose is defined, reject requests since they cannot be processed.
|
||||
if (!\tool_dataprivacy\data_registry::defaults_set()) {
|
||||
api::update_request_status($requestid, api::DATAREQUEST_STATUS_REJECTED);
|
||||
mtrace('No site purpose defined. Request ' . $requestid . ' rejected.');
|
||||
return;
|
||||
// Warn if no site purpose is defined.
|
||||
mtrace('Warning: No purpose is defined at the system level. Deletion will delete all.');
|
||||
}
|
||||
|
||||
// Grab the manager.
|
||||
|
||||
@@ -38,6 +38,10 @@ $title = get_string('datarequests', 'tool_dataprivacy');
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($title);
|
||||
|
||||
if (!\tool_dataprivacy\data_registry::defaults_set()) {
|
||||
\core\notification::error(get_string('systemconfignotsetwarning', 'tool_dataprivacy'));
|
||||
}
|
||||
|
||||
if (\tool_dataprivacy\api::is_site_dpo($USER->id)) {
|
||||
$filtersapplied = optional_param_array('request-filters', [-1], PARAM_NOTAGS);
|
||||
$filterscleared = optional_param('filters-cleared', 0, PARAM_INT);
|
||||
|
||||
@@ -299,5 +299,22 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2018110700, 'tool', 'dataprivacy');
|
||||
}
|
||||
|
||||
if ($oldversion < 2018112500) {
|
||||
// Delete orphaned data privacy requests.
|
||||
$sql = "SELECT r.id
|
||||
FROM {tool_dataprivacy_request} r LEFT JOIN {user} u ON r.userid = u.id
|
||||
WHERE u.id IS NULL";
|
||||
$orphaned = $DB->get_fieldset_sql($sql);
|
||||
|
||||
if ($orphaned) {
|
||||
$DB->delete_records_list('tool_dataprivacy_request', 'id', $orphaned);
|
||||
}
|
||||
|
||||
upgrade_plugin_savepoint(true, 2018112500, 'tool', 'dataprivacy');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ $string['addpurpose'] = 'Add purpose';
|
||||
$string['approve'] = 'Approve';
|
||||
$string['approverequest'] = 'Approve request';
|
||||
$string['automaticdeletionrequests'] = 'Create automatic data deletion requests';
|
||||
$string['automaticdeletionrequests_desc'] = 'If enabled, automatic delete data request will be created upon user deletion or for each existing deleted user which data was not fully deleted.';
|
||||
$string['automaticdeletionrequests_desc'] = 'If enabled, a data deletion request will be created automatically for any user accounts deleted manually.';
|
||||
$string['bulkapproverequests'] = 'Approve requests';
|
||||
$string['bulkdenyrequests'] = 'Deny requests';
|
||||
$string['cachedef_purpose'] = 'Data purposes';
|
||||
@@ -292,7 +292,7 @@ $string['sensitivedatareasons'] = 'Sensitive personal data processing reasons';
|
||||
$string['sensitivedatareasons_help'] = 'Select one or more applicable reasons that exempts the prohibition of processing sensitive personal data tied to this purpose. For more information, please see <a href="https://gdpr-info.eu/art-9-gdpr/" target="_blank">GDPR Art. 9.2</a>';
|
||||
$string['setdefaults'] = 'Set defaults';
|
||||
$string['showdataretentionsummary'] = 'Show data retention summary';
|
||||
$string['showdataretentionsummary_desc'] = 'If enabled, a link to the data retention summary is shown in the page footer and in the user profile page.';
|
||||
$string['showdataretentionsummary_desc'] = 'If enabled, a link to the data retention summary is displayed in the page footer and in users\' profiles.';
|
||||
$string['statusapproved'] = 'Approved';
|
||||
$string['statusawaitingapproval'] = 'Awaiting approval';
|
||||
$string['statuscancelled'] = 'Cancelled';
|
||||
@@ -307,6 +307,7 @@ $string['statusrejected'] = 'Rejected';
|
||||
$string['subjectscope'] = 'Subject scope';
|
||||
$string['subjectscope_help'] = 'The subject scope lists the roles which may be assigned in this context.';
|
||||
$string['summary'] = 'Registry configuration summary';
|
||||
$string['systemconfignotsetwarning'] = 'A site purpose and category have not been defined. When these are not defined, all data will be removed when processing deletion requests.';
|
||||
$string['user'] = 'User';
|
||||
$string['userlistnoncompliant'] = 'Userlist provider missing';
|
||||
$string['userlistexplanation'] = 'This plugin has the base provider but should also implement the userlist provider for full support of privacy functionality.';
|
||||
|
||||
@@ -1635,6 +1635,48 @@ class tool_dataprivacy_api_testcase extends advanced_testcase {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that delete requests do not filter out protected purpose contexts if the the site is properly configured.
|
||||
*/
|
||||
public function test_get_approved_contextlist_collection_for_collection_delete_course_no_site_config() {
|
||||
$this->resetAfterTest();
|
||||
|
||||
$user = $this->getDataGenerator()->create_user();
|
||||
|
||||
$course = $this->getDataGenerator()->create_course(['startdate' => time() - YEARSECS, 'enddate' => time() - YEARSECS]);
|
||||
$coursecontext = \context_course::instance($course->id);
|
||||
|
||||
$forum = $this->getDataGenerator()->create_module('forum', ['course' => $course->id]);
|
||||
list(, $forumcm) = get_course_and_cm_from_instance($forum->id, 'forum');
|
||||
$contextforum = \context_module::instance($forumcm->id);
|
||||
|
||||
$this->getDataGenerator()->enrol_user($user->id, $course->id, 'student');
|
||||
|
||||
// Create the initial contextlist.
|
||||
$initialcollection = new \core_privacy\local\request\contextlist_collection($user->id);
|
||||
|
||||
$contextlist = new \core_privacy\local\request\contextlist();
|
||||
$contextlist->add_from_sql('SELECT id FROM {context} WHERE id = :contextid', ['contextid' => $coursecontext->id]);
|
||||
$contextlist->set_component('tool_dataprivacy');
|
||||
$initialcollection->add_contextlist($contextlist);
|
||||
|
||||
$contextlist = new \core_privacy\local\request\contextlist();
|
||||
$contextlist->add_from_sql('SELECT id FROM {context} WHERE id = :contextid', ['contextid' => $contextforum->id]);
|
||||
$contextlist->set_component('mod_forum');
|
||||
$initialcollection->add_contextlist($contextlist);
|
||||
|
||||
$collection = api::get_approved_contextlist_collection_for_collection(
|
||||
$initialcollection, $user, api::DATAREQUEST_TYPE_DELETE);
|
||||
|
||||
$this->assertCount(2, $collection);
|
||||
|
||||
$list = $collection->get_contextlist_for_component('tool_dataprivacy');
|
||||
$this->assertCount(1, $list);
|
||||
|
||||
$list = $collection->get_contextlist_for_component('mod_forum');
|
||||
$this->assertCount(1, $list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that delete requests do not filter out protected purpose contexts if they are already expired.
|
||||
*/
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2018110900;
|
||||
$plugin->requires = 2018050800; // Moodle 3.5dev (Build 2018031600) and upwards.
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800; // Moodle 3.5dev (Build 2018031600) and upwards.
|
||||
$plugin->component = 'tool_dataprivacy';
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_dbtransfer'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'tool_filetypes';
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'tool_generator';
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // 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
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_httpsreplace'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'tool_innodb'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'tool_installaddon';
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'tool_langimport'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_tool_log_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,5 +39,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'logstore_database'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'logstore_legacy'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -39,5 +39,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'logstore_standard'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051401; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_log'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_lp'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_lpimportcsv'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->dependencies = array('tool_lp' => 2018050800);
|
||||
$plugin->dependencies = array('tool_lp' => 2018112800);
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_lpmigrate'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->dependencies = array(
|
||||
'tool_lp' => ANY_VERSION
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'tool_messageinbound';
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_mobile'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->dependencies = array(
|
||||
'webservice_rest' => 2018050800
|
||||
'webservice_rest' => 2018112800
|
||||
);
|
||||
|
||||
@@ -79,5 +79,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_monitor'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'tool_multilangupgrade'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_oauth2'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'tool_phpunit'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -60,5 +60,8 @@ function xmldb_tool_policy_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2018091800, 'tool', 'policy');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018100100; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_policy'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'tool_profiling'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_recyclebin'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // 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
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'tool_spamcleaner'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
$string['asap'] = 'ASAP';
|
||||
$string['backtoscheduledtasks'] = 'Back to scheduled tasks';
|
||||
$string['blocking'] = 'Blocking';
|
||||
$string['cannotfindthepathtothecli'] = 'Cannot find the path to the PHP CLI executable so task execution aborted. Set the "Path to PHP CLI" setting in "Site administration / Server / System paths"';
|
||||
$string['cannotfindthepathtothecli'] = 'Cannot find the path to the PHP CLI executable so task execution aborted. Set the \'Path to PHP CLI\' setting in Site administration / Server / System paths.';
|
||||
$string['clearfaildelay_confirm'] = 'Are you sure you want to clear the fail delay for task \'{$a}\'? After clearing the delay, the task will run according to its normal schedule.';
|
||||
$string['component'] = 'Component';
|
||||
$string['corecomponent'] = 'Core';
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'tool_task'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_templatelibrary'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'tool_unsuproles'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_uploadcourse'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'tool_uploaduser'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -697,7 +697,7 @@ class manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Move a tour up or down.
|
||||
* Move a tour up or down and redirect once complete.
|
||||
*
|
||||
* @param int $id The tour to move.
|
||||
*/
|
||||
@@ -707,6 +707,19 @@ class manager {
|
||||
$direction = required_param('direction', PARAM_INT);
|
||||
|
||||
$tour = tour::instance($id);
|
||||
self::_move_tour($tour, $direction);
|
||||
|
||||
redirect(helper::get_list_tour_link());
|
||||
}
|
||||
|
||||
/**
|
||||
* Move a tour up or down.
|
||||
*
|
||||
* @param tour $tour The tour to move.
|
||||
*
|
||||
* @param int $direction
|
||||
*/
|
||||
protected static function _move_tour(tour $tour, $direction) {
|
||||
$currentsortorder = $tour->get_sortorder();
|
||||
$targetsortorder = $currentsortorder + $direction;
|
||||
|
||||
@@ -722,8 +735,6 @@ class manager {
|
||||
|
||||
$tour->set_sortorder($targetsortorder);
|
||||
$tour->persist();
|
||||
|
||||
redirect(helper::get_list_tour_link());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -785,6 +796,13 @@ class manager {
|
||||
// the format filename => version. The version value needs to
|
||||
// be increased if the tour has been updated.
|
||||
$shippedtours = [
|
||||
'36_dashboard.json' => 3,
|
||||
'36_messaging.json' => 3,
|
||||
];
|
||||
|
||||
// These are tours that we used to ship but don't ship any longer.
|
||||
// We do not remove them, but we do disable them.
|
||||
$unshippedtours = [
|
||||
'boost_administrator.json' => 1,
|
||||
'boost_course_view.json' => 1,
|
||||
];
|
||||
@@ -813,12 +831,19 @@ class manager {
|
||||
unset($shippedtours[$filename]);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($unshippedtours[$filename])) {
|
||||
if ($version <= $unshippedtours[$filename]) {
|
||||
$tour = tour::instance($tour->get_id());
|
||||
$tour->set_enabled(tour::DISABLED);
|
||||
$tour->persist();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$existingtourrecords->close();
|
||||
|
||||
foreach ($shippedtours as $filename => $version) {
|
||||
foreach (array_reverse($shippedtours) as $filename => $version) {
|
||||
$filepath = $CFG->dirroot . "/{$CFG->admin}/tool/usertours/tours/" . $filename;
|
||||
$tourjson = file_get_contents($filepath);
|
||||
$tour = self::import_tour_from_json($tourjson);
|
||||
@@ -829,6 +854,11 @@ class manager {
|
||||
$tour->set_config(self::CONFIG_SHIPPED_FILENAME, $filename);
|
||||
$tour->set_config(self::CONFIG_SHIPPED_VERSION, $version);
|
||||
|
||||
// Bump new tours to the top of the list.
|
||||
while ($tour->get_sortorder() > 0) {
|
||||
self::_move_tour($tour, helper::MOVE_UP);
|
||||
}
|
||||
|
||||
if (defined('BEHAT_SITE_RUNNING') || (defined('PHPUNIT_TEST') && PHPUNIT_TEST)) {
|
||||
// Disable this tour if this is behat or phpunit.
|
||||
$tour->set_enabled(false);
|
||||
|
||||
@@ -35,13 +35,6 @@ use tool_usertours\manager;
|
||||
function xmldb_tool_usertours_upgrade($oldversion) {
|
||||
global $CFG, $DB;
|
||||
|
||||
if ($oldversion < 2016120501) {
|
||||
// Update the tours shipped with Moodle.
|
||||
manager::update_shipped_tours();
|
||||
|
||||
upgrade_plugin_savepoint(true, 2016120501, 'tool', 'usertours');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -54,5 +47,15 @@ function xmldb_tool_usertours_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2018113002) {
|
||||
// Update the tours shipped with Moodle.
|
||||
manager::update_shipped_tours();
|
||||
|
||||
upgrade_plugin_savepoint(true, 2018113002, 'tool', 'usertours');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -179,3 +179,50 @@ $string['privacy:metadata:preference:requested'] = 'The time that a user last ma
|
||||
$string['privacy:metadata:preference:completed'] = 'The time that a user last completed a user tour.';
|
||||
$string['privacy:request:preference:requested'] = 'You last requested the "{$a->name}" user tour on {$a->time}';
|
||||
$string['privacy:request:preference:completed'] = 'You last marked the "{$a->name}" user tour as completed on {$a->time}';
|
||||
|
||||
// 3.6 Dashboard tour.
|
||||
$string['tour3_title_dashboard'] = 'Your Dashboard';
|
||||
$string['tour3_content_dashboard'] = 'Your new Dashboard has many features to help you easily access the information most important to you.';
|
||||
$string['tour3_title_timeline'] = 'Timeline block';
|
||||
$string['tour3_content_timeline'] = 'The Timeline block shows your important upcoming events.
|
||||
|
||||
You can choose to show activities in the next week, month, or further into the future.
|
||||
|
||||
You can also show items which are overdue.';
|
||||
$string['tour3_title_recentcourses'] = 'Recently accessed courses';
|
||||
$string['tour3_content_recentcourses'] = 'The Recently accessed courses block shows the courses that you last visited, allowing you to jump straight back in.';
|
||||
$string['tour3_title_overview'] = 'Course overview';
|
||||
$string['tour3_content_overview'] = 'The Course overview block shows all of the courses that you are enrolled in.
|
||||
|
||||
You can choose to show courses currently in progress, or in the past or the future, or courses which you have starred.';
|
||||
$string['tour3_title_starring'] = 'Starring and hiding courses';
|
||||
$string['tour3_content_starring'] = 'You can choose to star a course to make it stand out, or hide a course which is no longer important to you.
|
||||
|
||||
These actions only affect your view.
|
||||
|
||||
You can also choose to display the courses in a list, or with summary information, or the default \'card\' view.';
|
||||
$string['tour3_title_displayoptions'] = 'Display options';
|
||||
$string['tour3_content_displayoptions'] = 'Courses may be sorted by course name or by last access date.
|
||||
|
||||
You can also choose to display the courses in a list, with summary information, or the default \'card\' view.';
|
||||
|
||||
// 3.6 Messaging tour.
|
||||
$string['tour4_title_messaging'] = 'New messaging interface';
|
||||
$string['tour4_content_messaging'] = 'Moodle 3.6 provides a new interface to messaging, ability for group messaging within a course, along with better control over who can message you.';
|
||||
$string['tour4_title_icon'] = 'Messaging';
|
||||
$string['tour4_content_icon'] = 'You can access your messages from any page using this icon.
|
||||
|
||||
If you have any unread messages, the number of unread messages will show here too.
|
||||
|
||||
Click on the icon to open the messaging drawer and continue the tour.';
|
||||
$string['tour4_title_groupconvo'] = 'Group messages';
|
||||
$string['tour4_content_groupconvo'] = 'If you are a member of a group with group messaging enabled, you\'ll see group conversations here.
|
||||
|
||||
Course group conversations allow you to interact with the others in your group in a private and convenient location.';
|
||||
$string['tour4_title_starred'] = 'Starred';
|
||||
$string['tour4_content_starred'] = 'You can choose to star particular conversations to make them easier to find.';
|
||||
$string['tour4_title_settings'] = 'Messaging settings';
|
||||
$string['tour4_content_settings'] = 'You can access your messaging settings via the cog icon. A new privacy setting allows you to restrict who can message you.';
|
||||
|
||||
$string['tour_final_step_title'] = 'End of tour';
|
||||
$string['tour_final_step_content'] = 'This is the end of your user tour. It won\'t show again unless you reset it using the link in the footer.';
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"Dashboard","description":"New dashboard features","pathmatch":"\/my\/%","enabled":"1","sortorder":"3","configdata":"{\"placement\":\"top\",\"orphan\":\"0\",\"backdrop\":\"0\",\"reflex\":\"0\",\"filtervalues\":{\"category\":[],\"course\":[\"0\"],\"courseformat\":[],\"role\":[],\"theme\":[]},\"majorupdatetime\":1543396938}","version":"2018051400","steps":[{"title":"tour3_title_dashboard,tool_usertours","content":"tour3_content_dashboard,tool_usertours","targettype":"2","targetvalue":"","sortorder":"0","configdata":"{\"backdrop\":\"1\"}"},{"title":"tour3_title_dashboard,tool_usertours","content":"tour3_content_timeline,tool_usertours","targettype":"1","targetvalue":"timeline","sortorder":"1","configdata":"{\"reflex\":\"0\"}"},{"title":"tour3_title_recentcourses,tool_usertours","content":"tour3_content_recentcourses,tool_usertours","targettype":"1","targetvalue":"recentlyaccessedcourses","sortorder":"2","configdata":"{\"placement\":\"top\",\"backdrop\":\"1\"}"},{"title":"tour3_title_overview,tool_usertours","content":"tour3_content_overview,tool_usertours","targettype":"1","targetvalue":"myoverview","sortorder":"3","configdata":"{}"},{"title":"tour3_title_starring,tool_usertours","content":"tour3_content_starring,tool_usertours","targettype":"0","targetvalue":".block-myoverview [data-display=\"cards\"] [data-region=\"course-content\"] .coursemenubtn","sortorder":"4","configdata":"{\"placement\":\"right\"}"},{"title":"tour3_title_starring,tool_usertours","content":"tour3_content_starring,tool_usertours","targettype":"0","targetvalue":".block-myoverview [data-display]:not([data-display=\"cards\"]) [data-region=\"course-content\"] .coursemenubtn","sortorder":"5","configdata":"{}"},{"title":"tour3_title_displayoptions,tool_usertours","content":"tour3_content_displayoptions,tool_usertours","targettype":"0","targetvalue":"#sortingdropdown","sortorder":"6","configdata":"{\"placement\":\"top\"}"},{"title":"tour_final_step_title,tool_usertours","content":"tour_final_step_content,tool_usertours","targettype":"2","targetvalue":"","sortorder":"7","configdata":"{}"}]}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"New Messaging System","description":"New messaging interface in Moodle 3.6","pathmatch":"\/course\/view.php%","enabled":"1","sortorder":"2","configdata":"{\"placement\":\"bottom\",\"orphan\":\"0\",\"backdrop\":\"0\",\"reflex\":\"0\",\"filtervalues\":{\"category\":[],\"course\":[\"0\"],\"courseformat\":[],\"role\":[],\"theme\":[]},\"majorupdatetime\":1543468823}","version":"2018051400","steps":[{"title":"tour4_title_messaging,tool_usertours","content":"tour4_content_messaging,tool_usertours","targettype":"2","targetvalue":"","sortorder":"0","configdata":"{\"backdrop\":\"1\"}"},{"title":"tour4_title_icon,tool_usertours","content":"tour4_content_icon,tool_usertours","targettype":"0","targetvalue":"[id^=message-drawer-toggle]","sortorder":"1","configdata":"{\"backdrop\":\"0\",\"reflex\":\"1\"}"},{"title":"tour4_title_groupconvo,tool_usertours","content":"tour4_content_groupconvo,tool_usertours","targettype":"0","targetvalue":".message-drawer:not(.hidden) [data-region=\"view-overview-group-messages\"]","sortorder":"2","configdata":"{\"placement\":\"left\"}"},{"title":"tour4_title_starred,tool_usertours","content":"tour4_content_starred,tool_usertours","targettype":"0","targetvalue":".message-drawer:not(.hidden) [data-region=\"view-overview-favourites\"]","sortorder":"3","configdata":"{\"placement\":\"left\"}"},{"title":"tour4_title_settings,tool_usertours","content":"tour4_content_settings,tool_usertours","targettype":"0","targetvalue":".message-drawer:not(.hidden) [data-route=\"view-settings\"]","sortorder":"4","configdata":"{\"reflex\":\"1\"}"},{"title":"tour_final_step_title,tool_usertours","content":"tour_final_step_content,tool_usertours","targettype":"2","targetvalue":"","sortorder":"5","configdata":"{}"}]}
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_usertours'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051401; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'tool_xmldb'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -154,6 +154,7 @@ class auth_plugin_cas extends auth_plugin_ldap {
|
||||
$frm = new stdClass();
|
||||
$frm->username = phpCAS::getUser();
|
||||
$frm->password = 'passwdCas';
|
||||
$frm->logintoken = \core\session\manager::get_login_token();
|
||||
|
||||
// Redirect to a course if multi-auth is activated, authCAS is set to CAS and the courseid is specified.
|
||||
if ($this->config->multiauth && !empty($courseid)) {
|
||||
@@ -167,6 +168,7 @@ class auth_plugin_cas extends auth_plugin_ldap {
|
||||
$frm = new stdClass();
|
||||
$frm->username = 'guest';
|
||||
$frm->password = 'guest';
|
||||
$frm->logintoken = \core\session\manager::get_login_token();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,5 +51,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'auth_cas'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
$plugin->dependencies = array('auth_ldap' => 2018050800);
|
||||
$plugin->dependencies = array('auth_ldap' => 2018112800);
|
||||
|
||||
@@ -51,5 +51,8 @@ function xmldb_auth_db_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'auth_db'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -51,5 +51,8 @@ function xmldb_auth_email_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'auth_email'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -69,5 +69,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'auth_ldap'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'auth_lti'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -51,5 +51,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'auth_manual'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -50,5 +50,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'auth_mnet'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'auth_nologin'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -51,5 +51,8 @@ function xmldb_auth_none_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'auth_none'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -47,5 +47,8 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'auth_oauth2'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -51,5 +51,8 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'auth_shibboleth'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'auth_webservice'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'availability_completion';
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'availability_date';
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'availability_grade';
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'availability_group';
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'availability_grouping';
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400;
|
||||
$plugin->requires = 2018050800;
|
||||
$plugin->version = 2018120300;
|
||||
$plugin->requires = 2018112800;
|
||||
$plugin->component = 'availability_profile';
|
||||
|
||||
@@ -136,7 +136,7 @@ abstract class backup implements checksumable {
|
||||
* point is backup when some behavior/approach channged, in order to allow
|
||||
* conditional coding based on it.
|
||||
*/
|
||||
const VERSION = 2018051400;
|
||||
const VERSION = 2018120300;
|
||||
/**
|
||||
* Usually same than major release zero version, mainly for informative/historic purposes.
|
||||
*/
|
||||
|
||||
@@ -234,13 +234,13 @@ abstract class backup_cron_automated_helper {
|
||||
// Summary.
|
||||
$message .= get_string('summary') . "\n";
|
||||
$message .= "==================================================\n";
|
||||
$message .= ' ' . get_string('courses') . '; ' . array_sum($count) . "\n";
|
||||
$message .= ' ' . get_string('ok') . '; ' . $count[self::BACKUP_STATUS_OK] . "\n";
|
||||
$message .= ' ' . get_string('skipped') . '; ' . $count[self::BACKUP_STATUS_SKIPPED] . "\n";
|
||||
$message .= ' ' . get_string('error') . '; ' . $count[self::BACKUP_STATUS_ERROR] . "\n";
|
||||
$message .= ' ' . get_string('unfinished') . '; ' . $count[self::BACKUP_STATUS_UNFINISHED] . "\n";
|
||||
$message .= ' ' . get_string('warning') . '; ' . $count[self::BACKUP_STATUS_WARNING] . "\n";
|
||||
$message .= ' ' . get_string('backupnotyetrun') . '; ' . $count[self::BACKUP_STATUS_NOTYETRUN]."\n\n";
|
||||
$message .= ' ' . get_string('courses') . ': ' . array_sum($count) . "\n";
|
||||
$message .= ' ' . get_string('ok') . ': ' . $count[self::BACKUP_STATUS_OK] . "\n";
|
||||
$message .= ' ' . get_string('skipped') . ': ' . $count[self::BACKUP_STATUS_SKIPPED] . "\n";
|
||||
$message .= ' ' . get_string('error') . ': ' . $count[self::BACKUP_STATUS_ERROR] . "\n";
|
||||
$message .= ' ' . get_string('unfinished') . ': ' . $count[self::BACKUP_STATUS_UNFINISHED] . "\n";
|
||||
$message .= ' ' . get_string('warning') . ': ' . $count[self::BACKUP_STATUS_WARNING] . "\n";
|
||||
$message .= ' ' . get_string('backupnotyetrun') . ': ' . $count[self::BACKUP_STATUS_NOTYETRUN]."\n\n";
|
||||
|
||||
//Reference
|
||||
if ($haserrors) {
|
||||
|
||||
@@ -76,4 +76,19 @@ class competency_alignment_form extends moodleform {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the data from the form.
|
||||
*
|
||||
* @param array $data form data
|
||||
* @param array $files form files
|
||||
* @return array An array of error messages.
|
||||
*/
|
||||
public function validation($data, $files) {
|
||||
$errors = parent::validation($data, $files);
|
||||
if (!empty($data['targeturl']) && !preg_match('@^https?://.+@', $data['targeturl'])) {
|
||||
$errors['targeturl'] = get_string('invalidurl', 'badges');
|
||||
}
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
@@ -211,6 +211,10 @@ class edit_details_form extends moodleform {
|
||||
$errors['name'] = get_string('error:duplicatename', 'badges');
|
||||
}
|
||||
|
||||
if ($data['imageauthorurl'] && !preg_match('@^https?://.+@', $data['imageauthorurl'])) {
|
||||
$errors['imageauthorurl'] = get_string('invalidurl', 'badges');
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,12 @@ class endorsement_form extends moodleform {
|
||||
if ($data['issueremail'] && !validate_email($data['issueremail'])) {
|
||||
$errors['issueremail'] = get_string('invalidemail');
|
||||
}
|
||||
if ($data['issuerurl'] && !preg_match('@^https?://.+@', $data['issuerurl'])) {
|
||||
$errors['issuerurl'] = get_string('invalidurl', 'badges');
|
||||
}
|
||||
if ($data['claimid'] && !preg_match('@^https?://.+@', $data['claimid'])) {
|
||||
$errors['claimid'] = get_string('invalidurl', 'badges');
|
||||
}
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
@@ -82,9 +82,12 @@ class edit_relatedbadge_form extends moodleform {
|
||||
$sql = "SELECT b.id, b.name, b.version, b.language, b.type
|
||||
FROM {badge} b
|
||||
WHERE b.id <> :badgeid
|
||||
AND b.id NOT IN (SELECT br.relatedbadgeid
|
||||
FROM {badge_related} br WHERE br.badgeid = :badgeid1)";
|
||||
$params = array('badgeid' => $badge->id, 'badgeid1' => $badge->id);
|
||||
AND b.id NOT IN (
|
||||
SELECT DISTINCT b.id
|
||||
FROM {badge_related} br
|
||||
JOIN {badge} b ON (br.relatedbadgeid = b.id OR br.badgeid = b.id)
|
||||
WHERE (br.badgeid = :badgeid2 OR br.relatedbadgeid = :badgeid3) AND b.id != :badgeid4)";
|
||||
$params = ['badgeid' => $badge->id, 'badgeid2' => $badge->id, 'badgeid3' => $badge->id, 'badgeid4' => $badge->id];
|
||||
if ($badge->type == BADGE_TYPE_COURSE) {
|
||||
$sql .= " AND (b.courseid = :courseid OR b.type = :badgetype)";
|
||||
$params['courseid'] = $badge->courseid;
|
||||
|
||||
+24
-12
@@ -113,13 +113,13 @@ class core_badges_renderer extends plugin_renderer_base {
|
||||
'type' => 'submit',
|
||||
'name' => 'award',
|
||||
'value' => $this->output->larrow() . ' ' . get_string('award', 'badges'),
|
||||
'class' => 'actionbutton')
|
||||
'class' => 'actionbutton btn btn-secondary')
|
||||
);
|
||||
$actioncell->text .= html_writer::empty_tag('input', array(
|
||||
'type' => 'submit',
|
||||
'name' => 'revoke',
|
||||
'value' => get_string('revoke', 'badges') . ' ' . $this->output->rarrow(),
|
||||
'class' => 'actionbutton')
|
||||
'class' => 'actionbutton btn btn-secondary')
|
||||
);
|
||||
$actioncell->text .= html_writer::end_tag('div', array());
|
||||
$actioncell->attributes['class'] = 'actions';
|
||||
@@ -348,15 +348,25 @@ class core_badges_renderer extends plugin_renderer_base {
|
||||
$output .= $this->output->heading(get_string('badgedetails', 'badges'), 3);
|
||||
$dl = array();
|
||||
$dl[get_string('name')] = $badge->name;
|
||||
$dl[get_string('version', 'badges')] = $badge->version;
|
||||
if (!empty($badge->version)) {
|
||||
$dl[get_string('version', 'badges')] = $badge->version;
|
||||
}
|
||||
$dl[get_string('language')] = $languages[$badge->language];
|
||||
$dl[get_string('description', 'badges')] = $badge->description;
|
||||
$dl[get_string('imageauthorname', 'badges')] = $badge->imageauthorname;
|
||||
$dl[get_string('imageauthoremail', 'badges')] =
|
||||
html_writer::tag('a', $badge->imageauthoremail, array('href' => 'mailto:' . $badge->imageauthoremail));
|
||||
$dl[get_string('imageauthorurl', 'badges')] =
|
||||
html_writer::link($badge->imageauthorurl, $badge->imageauthorurl, array('target' => '_blank'));
|
||||
$dl[get_string('imagecaption', 'badges')] = $badge->imagecaption;
|
||||
if (!empty($badge->imageauthorname)) {
|
||||
$dl[get_string('imageauthorname', 'badges')] = $badge->imageauthorname;
|
||||
}
|
||||
if (!empty($badge->imageauthoremail)) {
|
||||
$dl[get_string('imageauthoremail', 'badges')] =
|
||||
html_writer::tag('a', $badge->imageauthoremail, array('href' => 'mailto:' . $badge->imageauthoremail));
|
||||
}
|
||||
if (!empty($badge->imageauthorurl)) {
|
||||
$dl[get_string('imageauthorurl', 'badges')] =
|
||||
html_writer::link($badge->imageauthorurl, $badge->imageauthorurl, array('target' => '_blank'));
|
||||
}
|
||||
if (!empty($badge->imagecaption)) {
|
||||
$dl[get_string('imagecaption', 'badges')] = $badge->imagecaption;
|
||||
}
|
||||
|
||||
if ($badge->type == BADGE_TYPE_COURSE && isset($badge->courseid)) {
|
||||
$coursename = $DB->get_field('course', 'fullname', array('id' => $badge->courseid));
|
||||
@@ -722,8 +732,10 @@ class core_badges_renderer extends plugin_renderer_base {
|
||||
}
|
||||
|
||||
if (has_capability('moodle/badges:configuredetails', $context)) {
|
||||
$related = $DB->count_records_sql("SELECT COUNT(br.badgeid)
|
||||
FROM {badge_related} br WHERE br.badgeid = :badgeid", array('badgeid' => $badgeid));
|
||||
$sql = "SELECT COUNT(br.badgeid)
|
||||
FROM {badge_related} br
|
||||
WHERE (br.badgeid = :badgeid OR br.relatedbadgeid = :badgeid2)";
|
||||
$related = $DB->count_records_sql($sql, ['badgeid' => $badgeid, 'badgeid2' => $badgeid]);
|
||||
$row[] = new tabobject('brelated',
|
||||
new moodle_url('/badges/related.php', array('id' => $badgeid)),
|
||||
get_string('brelated', 'badges', $related)
|
||||
@@ -1502,4 +1514,4 @@ class badge_competencies_alignment implements renderable
|
||||
$this->alignments = $alignments;
|
||||
$this->currentbadgeid = $currentbadgeid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ Feature: Add badges to the system
|
||||
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager
|
||||
And I press "Create badge"
|
||||
And I follow "Related badges (0)"
|
||||
And I should see "This badge does not have related badges."
|
||||
And I should see "This badge does not have any related badges."
|
||||
And I press "Add related badge"
|
||||
And I follow "Related badges"
|
||||
And I wait until the page is ready
|
||||
@@ -109,11 +109,11 @@ Feature: Add badges to the system
|
||||
And I should see "Endorsement"
|
||||
And I follow "Endorsement"
|
||||
And I set the following fields to these values:
|
||||
| Name | Endorser |
|
||||
| Endorser name | Endorser |
|
||||
| Email | endorsement@example.com |
|
||||
| Issuer URL | http://example.com |
|
||||
| Claim URL | http://claimurl.example.com |
|
||||
| Endorsement Comment | Test Endorsement Comment |
|
||||
| Endorsement comment | Test Endorsement comment |
|
||||
And I press "Save changes"
|
||||
Then I should see "Changes saved"
|
||||
|
||||
@@ -134,13 +134,13 @@ Feature: Add badges to the system
|
||||
Then I should see "Test Badge"
|
||||
And I should see "Endorsement"
|
||||
And I follow "Competencies (0)"
|
||||
And I should see "This badge does not have a competencies alignment."
|
||||
And I press "Add competency alignment"
|
||||
And I follow "Competencies alignment"
|
||||
And I should see "This badge does not have any competencies specified."
|
||||
And I press "Add competency"
|
||||
And I follow "Competency"
|
||||
And I wait until the page is ready
|
||||
And I follow "Competencies alignment"
|
||||
And I follow "Competency"
|
||||
And I set the following fields to these values:
|
||||
| Name | Test Badge Competencies |
|
||||
| Competency name | Test Badge Competencies |
|
||||
| URL | https://competencies.example.com |
|
||||
| Description | Test Badge Competencies description |
|
||||
When I press "Save changes"
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'block_activity_modules'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'block_activity_results'; // Full name of the plugin (used for diagnostics).
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version
|
||||
$plugin->component = 'block_admin_bookmarks'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -57,5 +57,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
|
||||
// Automatically generated Moodle v3.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.6.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2018051400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018050800; // Requires this Moodle version.
|
||||
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2018112800; // Requires this Moodle version.
|
||||
$plugin->component = 'block_badges';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user