Merge branch 'wip-MDL-55494-master' of git://github.com/marinaglancy/moodle
authorDan Poltawski <dan@moodle.com>
Mon, 15 Aug 2016 12:15:15 +0000 (13:15 +0100)
committerDan Poltawski <dan@moodle.com>
Mon, 15 Aug 2016 12:15:15 +0000 (13:15 +0100)
30 files changed:
admin/tool/monitor/classes/eventlist.php
admin/tool/monitor/classes/rule.php
admin/tool/monitor/classes/subscription.php
admin/tool/monitor/edit.php
blocks/site_main_menu/styles.css
composer.json
composer.lock
course/externallib.php
enrol/self/db/access.php
enrol/self/db/upgrade.php
enrol/self/tests/behat/key_holder.feature [new file with mode: 0644]
enrol/self/version.php
lang/en/moodle.php
lib/classes/event/base.php
lib/classes/event/content_viewed.php
lib/classes/event/course_module_instances_list_viewed.php
lib/classes/event/mnet_access_control_updated.php
lib/filestorage/file_storage.php
lib/form/modgrade.php
lib/upgrade.txt
mod/assign/tests/behat/rescale_grades.feature
mod/data/field/latlong/field.class.php
mod/data/field/url/field.class.php
mod/data/import.php
mod/data/upgrade.txt [new file with mode: 0644]
mod/lesson/pagetypes/matching.php
mod/lesson/pagetypes/truefalse.php
question/type/multianswer/renderer.php
report/eventlist/classes/list_generator.php
report/eventlist/eventdetail.php

index 0f5cd1a..ccce626 100644 (file)
@@ -67,7 +67,7 @@ class eventlist {
                 $ref = new \ReflectionClass($classname);
                 // Ignore abstracts.
                 if (!$ref->isAbstract() && $file != 'manager') {
-                    $eventinformation[$classname] = $classname::get_name();
+                    $eventinformation[$classname] = $classname::get_name_with_info();
                 }
             }
         }
@@ -110,9 +110,9 @@ class eventlist {
                         $ref = new \ReflectionClass($plugineventname);
                         if (!$ref->isAbstract() && $fullpluginname !== 'logstore_legacy') {
                             if ($withoutcomponent) {
-                                $noncorepluginlist[$plugineventname] = $plugineventname::get_name();
+                                $noncorepluginlist[$plugineventname] = $plugineventname::get_name_with_info();
                             } else {
-                                $noncorepluginlist[$fullpluginname][$plugineventname] = $plugineventname::get_name();
+                                $noncorepluginlist[$fullpluginname][$plugineventname] = $plugineventname::get_name_with_info();
                             }
                         }
                     }
index 2a23eb1..3c5e6d2 100644 (file)
@@ -202,7 +202,7 @@ class rule {
     public function get_event_name() {
         $eventclass = $this->eventname;
         if (class_exists($eventclass)) {
-            return $eventclass::get_name();
+            return $eventclass::get_name_with_info();
         }
         return get_string('eventnotfound', 'tool_monitor');
     }
index 98518e9..5beddbb 100644 (file)
@@ -111,7 +111,7 @@ class subscription {
     public function get_event_name() {
         $eventclass = $this->eventname;
         if (class_exists($eventclass)) {
-            return $eventclass::get_name();
+            return $eventclass::get_name_with_info();
         }
         return get_string('eventnotfound', 'tool_monitor');
     }
index 20bd3c4..1e01a32 100644 (file)
@@ -54,12 +54,6 @@ $PAGE->set_heading($coursename);
 // Get data ready for mform.
 $eventlist = tool_monitor\eventlist::get_all_eventlist(true);
 $pluginlist = tool_monitor\eventlist::get_plugin_list();
-$eventlist = array_merge(array('' => get_string('choosedots')), $eventlist);
-$pluginlist = array_merge(array('' => get_string('choosedots')), $pluginlist);
-
-// Set up the yui module.
-$PAGE->requires->yui_module('moodle-tool_monitor-dropdown', 'Y.M.tool_monitor.DropDown.init',
-        array(array('eventlist' => $eventlist)));
 
 // Site level report.
 if (empty($courseid)) {
@@ -74,11 +68,25 @@ if (!empty($ruleid)) {
     $rule = \tool_monitor\rule_manager::get_rule($ruleid)->get_mform_set_data();
     $rule->minutes = $rule->timewindow / MINSECS;
     $subscriptioncount = \tool_monitor\subscription_manager::count_rule_subscriptions($ruleid);
+
+    // Filter out events which cannot be triggered for some reason.
+    $eventlist = array_filter($eventlist, function($classname) use ($rule) {
+        // Filter out all deprecated events, except for the current one.
+        return $classname === $rule->eventname || !$classname::is_deprecated();
+    }, ARRAY_FILTER_USE_KEY);
 } else {
     $rule = new stdClass();
     $subscriptioncount = 0;
+
+    // Filter out events which cannot be triggered for some reason.
+    $eventlist = array_filter($eventlist, function($classname) {
+        return !$classname::is_deprecated();
+    }, ARRAY_FILTER_USE_KEY);
 }
 
+// Modify the lists to add the choosers.
+$eventlist = array_merge(array('' => get_string('choosedots')), $eventlist);
+$pluginlist = array_merge(array('' => get_string('choosedots')), $pluginlist);
 $mform = new tool_monitor\rule_form(null, array('eventlist' => $eventlist, 'pluginlist' => $pluginlist, 'rule' => $rule,
         'courseid' => $courseid, 'subscriptioncount' => $subscriptioncount));
 
@@ -98,6 +106,10 @@ if ($mformdata = $mform->get_data()) {
 
     redirect($manageurl);
 } else {
+    // Set up the yui module.
+    $PAGE->requires->yui_module('moodle-tool_monitor-dropdown', 'Y.M.tool_monitor.DropDown.init',
+            array(array('eventlist' => $eventlist)));
+
     echo $OUTPUT->header();
     $mform->set_data($rule);
     // If there's any subscription for this rule, display an information message.
index 6d43c31..9174440 100644 (file)
@@ -4,7 +4,13 @@
     width: 100%;
     display: table;
 }
-.block_site_main_menu li .buttons { float: right; margin: 0; }
+.block_site_main_menu li .buttons {
+    float: right;
+    margin: 0;
+    padding: 0;
+    border: 0;
+    background-color: inherit;
+}
 .dir-rtl .block_site_main_menu li .buttons { float: left; }
 .block_site_main_menu li .buttons a img{ vertical-align: text-bottom;}
 .block_site_main_menu .footer { margin-top: 1em; }
index ce55027..713e233 100644 (file)
@@ -7,6 +7,6 @@
     "require-dev": {
         "phpunit/phpunit": "5.4.*",
         "phpunit/dbUnit": "1.4.*",
-        "moodlehq/behat-extension": "3.32.1"
+        "moodlehq/behat-extension": "3.32.2"
     }
 }
index 6fe8310..5810eda 100644 (file)
@@ -4,8 +4,8 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "7f0c2a252624902575a3ed1bdc237644",
-    "content-hash": "bcc157487e77ec6ad4163f1661abac97",
+    "hash": "902ce5735f2446cf9bcc305c0d8a191b",
+    "content-hash": "b60ecd0f5b6430a10ada7e4d4c38e73b",
     "packages": [],
     "packages-dev": [
         {
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "6.2.0",
+            "version": "6.2.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "d094e337976dff9d8e2424e8485872194e768662"
+                "reference": "3f808fba627f2c5b69e2501217bf31af349c1427"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662",
-                "reference": "d094e337976dff9d8e2424e8485872194e768662",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427",
+                "reference": "3f808fba627f2c5b69e2501217bf31af349c1427",
                 "shasum": ""
             },
             "require": {
-                "guzzlehttp/promises": "~1.0",
-                "guzzlehttp/psr7": "~1.1",
-                "php": ">=5.5.0"
+                "guzzlehttp/promises": "^1.0",
+                "guzzlehttp/psr7": "^1.3.1",
+                "php": ">=5.5"
             },
             "require-dev": {
                 "ext-curl": "*",
-                "phpunit/phpunit": "~4.0",
-                "psr/log": "~1.0"
+                "phpunit/phpunit": "^4.0",
+                "psr/log": "^1.0"
             },
             "type": "library",
             "extra": {
                 "rest",
                 "web service"
             ],
-            "time": "2016-03-21 20:02:09"
+            "time": "2016-07-15 17:22:37"
         },
         {
             "name": "guzzlehttp/promises",
         },
         {
             "name": "moodlehq/behat-extension",
-            "version": "v3.32.1",
+            "version": "v3.32.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/moodlehq/moodle-behat-extension.git",
-                "reference": "f8305058ce9140864c23c9b667e3d7d487fdc006"
+                "reference": "cdf11394f55576f849db750cac9836f2efc17d4c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/f8305058ce9140864c23c9b667e3d7d487fdc006",
-                "reference": "f8305058ce9140864c23c9b667e3d7d487fdc006",
+                "url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/cdf11394f55576f849db750cac9836f2efc17d4c",
+                "reference": "cdf11394f55576f849db750cac9836f2efc17d4c",
                 "shasum": ""
             },
             "require": {
                 "Behat",
                 "moodle"
             ],
-            "time": "2016-06-20 07:56:08"
+            "time": "2016-08-12 01:58:24"
         },
         {
             "name": "myclabs/deep-copy",
         },
         {
             "name": "phpunit/php-code-coverage",
-            "version": "4.0.0",
+            "version": "4.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9"
+                "reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/900370c81280cc0d942ffbc5912d80464eaee7e9",
-                "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5f3f7e736d6319d5f1fc402aff8b026da26709a3",
+                "reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3",
                 "shasum": ""
             },
             "require": {
                 "phpunit/php-text-template": "~1.2",
                 "phpunit/php-token-stream": "^1.4.2",
                 "sebastian/code-unit-reverse-lookup": "~1.0",
-                "sebastian/environment": "^1.3.2",
+                "sebastian/environment": "^1.3.2 || ^2.0",
                 "sebastian/version": "~1.0|~2.0"
             },
             "require-dev": {
                 "testing",
                 "xunit"
             ],
-            "time": "2016-06-03 05:03:56"
+            "time": "2016-07-26 14:39:29"
         },
         {
             "name": "phpunit/php-file-iterator",
         },
         {
             "name": "phpunit/phpunit",
-            "version": "5.4.6",
+            "version": "5.4.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59"
+                "reference": "3132365e1430c091f208e120b8845d39c25f20e6"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2f1fc94b77ea6418bd6a06c64a1dac0645fbce59",
-                "reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3132365e1430c091f208e120b8845d39c25f20e6",
+                "reference": "3132365e1430c091f208e120b8845d39c25f20e6",
                 "shasum": ""
             },
             "require": {
                 "myclabs/deep-copy": "~1.3",
                 "php": "^5.6 || ^7.0",
                 "phpspec/prophecy": "^1.3.1",
-                "phpunit/php-code-coverage": "^4.0",
+                "phpunit/php-code-coverage": "^4.0.1",
                 "phpunit/php-file-iterator": "~1.4",
                 "phpunit/php-text-template": "~1.2",
                 "phpunit/php-timer": "^1.0.6",
                 "testing",
                 "xunit"
             ],
-            "time": "2016-06-16 06:01:15"
+            "time": "2016-07-26 14:48:00"
         },
         {
             "name": "phpunit/phpunit-mock-objects",
         },
         {
             "name": "psr/http-message",
-            "version": "1.0",
+            "version": "1.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/php-fig/http-message.git",
-                "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298"
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298",
-                "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298",
+                "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
                 "shasum": ""
             },
             "require": {
                 }
             ],
             "description": "Common interface for HTTP messages",
+            "homepage": "https://github.com/php-fig/http-message",
             "keywords": [
                 "http",
                 "http-message",
                 "request",
                 "response"
             ],
-            "time": "2015-05-04 20:22:00"
+            "time": "2016-08-06 14:39:51"
         },
         {
             "name": "sebastian/code-unit-reverse-lookup",
         },
         {
             "name": "symfony/browser-kit",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/browser-kit.git",
-                "reference": "dcf41ed026b0499254385b5c88f03247b2ba010b"
+                "reference": "d2a07cc11c5fa94820240b1e67592ffb18e347b9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/browser-kit/zipball/dcf41ed026b0499254385b5c88f03247b2ba010b",
-                "reference": "dcf41ed026b0499254385b5c88f03247b2ba010b",
+                "url": "https://api.github.com/repos/symfony/browser-kit/zipball/d2a07cc11c5fa94820240b1e67592ffb18e347b9",
+                "reference": "d2a07cc11c5fa94820240b1e67592ffb18e347b9",
                 "shasum": ""
             },
             "require": {
             ],
             "description": "Symfony BrowserKit Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:41:56"
+            "time": "2016-07-26 08:04:17"
         },
         {
             "name": "symfony/class-loader",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/class-loader.git",
-                "reference": "0d0ac77c336eb73f35bebdf3e1f3695ac741bbc9"
+                "reference": "817f09b4c37b7688fa4342cb4642d8f2d81c1097"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/class-loader/zipball/0d0ac77c336eb73f35bebdf3e1f3695ac741bbc9",
-                "reference": "0d0ac77c336eb73f35bebdf3e1f3695ac741bbc9",
+                "url": "https://api.github.com/repos/symfony/class-loader/zipball/817f09b4c37b7688fa4342cb4642d8f2d81c1097",
+                "reference": "817f09b4c37b7688fa4342cb4642d8f2d81c1097",
                 "shasum": ""
             },
             "require": {
             ],
             "description": "Symfony ClassLoader Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:41:56"
+            "time": "2016-07-10 08:05:47"
         },
         {
             "name": "symfony/config",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/config.git",
-                "reference": "bcf5aebabc95b56e370e13d78565f74c7d8726dc"
+                "reference": "a7630397b91be09cdd2fe57fd13612e258700598"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/config/zipball/bcf5aebabc95b56e370e13d78565f74c7d8726dc",
-                "reference": "bcf5aebabc95b56e370e13d78565f74c7d8726dc",
+                "url": "https://api.github.com/repos/symfony/config/zipball/a7630397b91be09cdd2fe57fd13612e258700598",
+                "reference": "a7630397b91be09cdd2fe57fd13612e258700598",
                 "shasum": ""
             },
             "require": {
             ],
             "description": "Symfony Config Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:41:56"
+            "time": "2016-07-26 08:04:17"
         },
         {
             "name": "symfony/console",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/console.git",
-                "reference": "747154aa69b0f83cd02fc9aa554836dee417631a"
+                "reference": "f9e638e8149e9e41b570ff092f8007c477ef0ce5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/console/zipball/747154aa69b0f83cd02fc9aa554836dee417631a",
-                "reference": "747154aa69b0f83cd02fc9aa554836dee417631a",
+                "url": "https://api.github.com/repos/symfony/console/zipball/f9e638e8149e9e41b570ff092f8007c477ef0ce5",
+                "reference": "f9e638e8149e9e41b570ff092f8007c477ef0ce5",
                 "shasum": ""
             },
             "require": {
             ],
             "description": "Symfony Console Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 07:02:31"
+            "time": "2016-07-26 08:04:17"
         },
         {
             "name": "symfony/css-selector",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/css-selector.git",
         },
         {
             "name": "symfony/dependency-injection",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/dependency-injection.git",
-                "reference": "b7272b65f2f46cbe77def7d33916f2613669c508"
+                "reference": "6abd4952d07042d11bbb8122f3b57469691acdb5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/b7272b65f2f46cbe77def7d33916f2613669c508",
-                "reference": "b7272b65f2f46cbe77def7d33916f2613669c508",
+                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6abd4952d07042d11bbb8122f3b57469691acdb5",
+                "reference": "6abd4952d07042d11bbb8122f3b57469691acdb5",
                 "shasum": ""
             },
             "require": {
             "require-dev": {
                 "symfony/config": "~2.8|~3.0",
                 "symfony/expression-language": "~2.8|~3.0",
-                "symfony/yaml": "~2.8|~3.0"
+                "symfony/yaml": "~2.8.7|~3.0.7|~3.1.1|~3.2"
             },
             "suggest": {
                 "symfony/config": "",
             ],
             "description": "Symfony DependencyInjection Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:42:25"
+            "time": "2016-07-28 11:13:48"
         },
         {
             "name": "symfony/dom-crawler",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/dom-crawler.git",
-                "reference": "99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0"
+                "reference": "c7b9b8db3a6f2bac76dcd9a9db5446f2591897f9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0",
-                "reference": "99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0",
+                "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/c7b9b8db3a6f2bac76dcd9a9db5446f2591897f9",
+                "reference": "c7b9b8db3a6f2bac76dcd9a9db5446f2591897f9",
                 "shasum": ""
             },
             "require": {
             ],
             "description": "Symfony DomCrawler Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:41:56"
+            "time": "2016-07-26 08:04:17"
         },
         {
             "name": "symfony/event-dispatcher",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher.git",
-                "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5"
+                "reference": "c0c00c80b3a69132c4e55c3e7db32b4a387615e5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7f9839ede2070f53e7e2f0849b9bd14748c434c5",
-                "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c0c00c80b3a69132c4e55c3e7db32b4a387615e5",
+                "reference": "c0c00c80b3a69132c4e55c3e7db32b4a387615e5",
                 "shasum": ""
             },
             "require": {
             ],
             "description": "Symfony EventDispatcher Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:41:56"
+            "time": "2016-07-19 10:45:57"
         },
         {
             "name": "symfony/filesystem",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/filesystem.git",
-                "reference": "322da5f0910d8aa0b25fa65ffccaba68dbddb890"
+                "reference": "bb29adceb552d202b6416ede373529338136e84f"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/filesystem/zipball/322da5f0910d8aa0b25fa65ffccaba68dbddb890",
-                "reference": "322da5f0910d8aa0b25fa65ffccaba68dbddb890",
+                "url": "https://api.github.com/repos/symfony/filesystem/zipball/bb29adceb552d202b6416ede373529338136e84f",
+                "reference": "bb29adceb552d202b6416ede373529338136e84f",
                 "shasum": ""
             },
             "require": {
             ],
             "description": "Symfony Filesystem Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:41:56"
+            "time": "2016-07-20 05:44:26"
         },
         {
             "name": "symfony/polyfill-mbstring",
         },
         {
             "name": "symfony/process",
-            "version": "v2.8.8",
+            "version": "v2.8.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/process.git",
-                "reference": "89f33c16796415ccfd8bb3cf8d520cbb79899bfe"
+                "reference": "d20332e43e8774ff8870b394f3dd6020cc7f8e0c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/process/zipball/89f33c16796415ccfd8bb3cf8d520cbb79899bfe",
-                "reference": "89f33c16796415ccfd8bb3cf8d520cbb79899bfe",
+                "url": "https://api.github.com/repos/symfony/process/zipball/d20332e43e8774ff8870b394f3dd6020cc7f8e0c",
+                "reference": "d20332e43e8774ff8870b394f3dd6020cc7f8e0c",
                 "shasum": ""
             },
             "require": {
             ],
             "description": "Symfony Process Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:29:29"
+            "time": "2016-07-28 11:13:19"
         },
         {
             "name": "symfony/translation",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/translation.git",
-                "reference": "d63a94528530c3ea5ff46924c8001cec4a398609"
+                "reference": "7713ddf81518d0823b027fe74ec390b80f6b6536"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/translation/zipball/d63a94528530c3ea5ff46924c8001cec4a398609",
-                "reference": "d63a94528530c3ea5ff46924c8001cec4a398609",
+                "url": "https://api.github.com/repos/symfony/translation/zipball/7713ddf81518d0823b027fe74ec390b80f6b6536",
+                "reference": "7713ddf81518d0823b027fe74ec390b80f6b6536",
                 "shasum": ""
             },
             "require": {
             ],
             "description": "Symfony Translation Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:41:56"
+            "time": "2016-07-26 08:04:17"
         },
         {
             "name": "symfony/yaml",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/yaml.git",
-                "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de"
+                "reference": "1819adf2066880c7967df7180f4f662b6f0567ac"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de",
-                "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de",
+                "url": "https://api.github.com/repos/symfony/yaml/zipball/1819adf2066880c7967df7180f4f662b6f0567ac",
+                "reference": "1819adf2066880c7967df7180f4f662b6f0567ac",
                 "shasum": ""
             },
             "require": {
             ],
             "description": "Symfony Yaml Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:41:56"
+            "time": "2016-07-17 14:02:08"
         },
         {
             "name": "webmozart/assert",
-            "version": "1.0.2",
+            "version": "1.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/webmozart/assert.git",
-                "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde"
+                "reference": "bb2d123231c095735130cc8f6d31385a44c7b308"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
-                "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
+                "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308",
+                "reference": "bb2d123231c095735130cc8f6d31385a44c7b308",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.3.3"
+                "php": "^5.3.3|^7.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "^4.6"
+                "phpunit/phpunit": "^4.6",
+                "sebastian/version": "^1.0.1"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.0-dev"
+                    "dev-master": "1.2-dev"
                 }
             },
             "autoload": {
                 "check",
                 "validate"
             ],
-            "time": "2015-08-24 13:29:44"
+            "time": "2016-08-09 15:02:57"
         }
     ],
     "aliases": [],
index 7a2367d..ec6f7c9 100644 (file)
@@ -2253,8 +2253,8 @@ class core_course_external extends external_api {
             $coursecontext = context_course::instance($course->id);
 
             // Category information.
-            if (!isset($categoriescache[$course->category])) {
-                $categoriescache[$course->category] = coursecat::get($course->category);
+            if (!array_key_exists($course->category, $categoriescache)) {
+                $categoriescache[$course->category] = coursecat::get($course->category, IGNORE_MISSING);
             }
             $category = $categoriescache[$course->category];
 
@@ -2302,7 +2302,7 @@ class core_course_external extends external_api {
             $coursereturns['displayname']       = external_format_string($displayname, $coursecontext->id);
             $coursereturns['shortname']         = external_format_string($course->shortname, $coursecontext->id);
             $coursereturns['categoryid']        = $course->category;
-            $coursereturns['categoryname']      = $category->name;
+            $coursereturns['categoryname']      = $category == null ? '' : $category->name;
             $coursereturns['summary']           = $summary;
             $coursereturns['summaryformat']     = $summaryformat;
             $coursereturns['overviewfiles']     = $files;
index d2c5972..4d34810 100644 (file)
@@ -52,9 +52,6 @@ $capabilities = array(
 
         'captype' => 'write',
         'contextlevel' => CONTEXT_COURSE,
-        'archetypes' => array(
-            'manager' => CAP_PROHIBIT,
-        )
     ),
 
     /* Voluntarily unenrol self from course - watch out for data loss. */
index 8be21ea..581de7a 100644 (file)
@@ -39,5 +39,24 @@ function xmldb_enrol_self_upgrade($oldversion) {
     // Moodle v3.1.0 release upgrade line.
     // Put any upgrade step following this.
 
+    // Moodle v3.2.0 release upgrade line.
+    // Put any upgrade step following this.
+
+    if ($oldversion < 2016052301) {
+        global $DB;
+        // Get roles with manager archetype.
+        $managerroles = get_archetype_roles('manager');
+        if (!empty($managerroles)) {
+            // Remove wrong CAP_PROHIBIT from self:holdkey.
+            foreach ($managerroles as $role) {
+                $DB->execute("DELETE
+                                FROM {role_capabilities}
+                               WHERE roleid = ? AND capability = ? AND permission = ?",
+                        array($role->id, 'enrol/self:holdkey', CAP_PROHIBIT));
+            }
+        }
+        upgrade_plugin_savepoint(true, 2016052301, 'enrol', 'self');
+    }
+
     return true;
 }
diff --git a/enrol/self/tests/behat/key_holder.feature b/enrol/self/tests/behat/key_holder.feature
new file mode 100644 (file)
index 0000000..31f4a82
--- /dev/null
@@ -0,0 +1,53 @@
+@enrol @enrol_self
+Feature: Users can be defined as key holders in courses where self enrolment is allowed
+  In order to participate in courses
+  As a user
+  I need to auto enrol me in courses
+
+  Background:
+    Given the following "users" exist:
+      | username | firstname | lastname | email |
+      | manager1 | Manager | 1 | manager1@example.com |
+      | student1 | Student | 1 | student1@example.com |
+    And the following "courses" exist:
+      | fullname | shortname | format |
+      | Course 1 | C1 | topics |
+    And I log in as "admin"
+    And I navigate to "Define roles" node in "Site administration > Users > Permissions"
+    And I click on "Add a new role" "button"
+    And I click on "Continue" "button"
+    And I set the following fields to these values:
+      | Short name | keyholder |
+      | Custom full name | Key holder |
+      | contextlevel50 | 1 |
+      | enrol/self:holdkey | 1 |
+    And I click on "Create this role" "button"
+    And I navigate to "Courses" node in "Site administration > Appearance"
+    And I set the following fields to these values:
+      | Key holder | 1 |
+    And I press "Save changes"
+    And the following "course enrolments" exist:
+      | user | course | role |
+      | manager1 | C1 | keyholder |
+    And I log out
+
+  @javascript
+  Scenario: The key holder name is displayed on site home page
+    Given I log in as "admin"
+    And I am on site homepage
+    And I follow "Course 1"
+    When I add "Self enrolment" enrolment method with:
+      | Custom instance name | Test student enrolment |
+      | Enrolment key | moodle_rules |
+    And I log out
+    And I log in as "student1"
+    And I am on site homepage
+    And I follow "Course 1"
+    And I should see "You should have received this enrolment key from:"
+    And I should see "Manager 1"
+    And I set the following fields to these values:
+      | Enrolment key | moodle_rules |
+    And I press "Enrol me"
+    Then I should see "Topic 1"
+    And I should not see "Enrolment options"
+    And I should not see "Enrol me in this course"
index c2d7ed9..7422312 100644 (file)
@@ -24,7 +24,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2016052300;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->version   = 2016052301;        // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2016051900;        // Requires this Moodle version
 $plugin->component = 'enrol_self';      // Full name of the plugin (used for diagnostics)
 $plugin->cron      = 600;
index b6e7255..7148c61 100644 (file)
@@ -2027,6 +2027,7 @@ $string['yourself'] = 'yourself';
 $string['yourteacher'] = 'your {$a}';
 $string['yourwordforx'] = 'Your word for \'{$a}\'';
 $string['zippingbackup'] = 'Zipping backup';
+$string['deprecatedeventname'] = '{$a} (no longer in use)';
 
 // Deprecated since Moodle 3.1.
 $string['filetoolarge'] = 'is too large to upload';
index 17d399b..8036019 100644 (file)
@@ -305,6 +305,26 @@ abstract class base implements \IteratorAggregate {
         return $parts[0].': '.str_replace('_', ' ', $parts[2]);
     }
 
+    /**
+     * Returns the event name complete with metadata information.
+     *
+     * This includes information about whether the event has been deprecated so should not be used in all situations -
+     * for example within reports themselves.
+     *
+     * If overriding this function, please ensure that you call the parent version too.
+     *
+     * @return string
+     */
+    public static function get_name_with_info() {
+        $return = static::get_name();
+
+        if (static::is_deprecated()) {
+            $return = get_string('deprecatedeventname', 'core', $return);
+        }
+
+        return $return;
+    }
+
     /**
      * Returns non-localised event description with id's for admin use only.
      *
@@ -961,4 +981,17 @@ abstract class base implements \IteratorAggregate {
     public function getIterator() {
         return new \ArrayIterator($this->data);
     }
+
+    /**
+     * Whether this event has been marked as deprecated.
+     *
+     * Events cannot be deprecated in the normal fashion as they must remain to support historical data.
+     * Once they are deprecated, there is no way to trigger the event, so it does not make sense to list it in some
+     * parts of the UI (e.g. Event Monitor).
+     *
+     * @return boolean
+     */
+    public static function is_deprecated() {
+        return false;
+    }
 }
index a1680fa..517ad11 100644 (file)
@@ -130,5 +130,13 @@ abstract class content_viewed extends base {
     public static function get_other_mapping() {
         return false;
     }
-}
 
+    /**
+     * This event has been deprected.
+     *
+     * @return boolean
+     */
+    public static function is_deprecated() {
+        return true;
+    }
+}
index 6534c5c..7594b69 100644 (file)
@@ -27,6 +27,9 @@
 namespace core\event;
 defined('MOODLE_INTERNAL') || die();
 
+debugging('core\\event\\course_module_instances_list_viewed has been deperecated. Please use
+        core\\event\\course_module_instance_list_viewed instead', DEBUG_DEVELOPER);
+
 /**
  * This class has been deprecated, please use \core\event\course_module_instance_list_viewed.
  *
@@ -37,7 +40,12 @@ defined('MOODLE_INTERNAL') || die();
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 abstract class course_module_instances_list_viewed extends course_module_instance_list_viewed {
+    /**
+     * This event has been deprected.
+     *
+     * @return boolean
+     */
+    public static function is_deprecated() {
+        return true;
+    }
 }
-
-debugging('core\\event\\course_module_instances_list_viewed has been deperecated. Please use
-        core\\event\\course_module_instance_list_viewed instead', DEBUG_DEVELOPER);
index b2e9332..9ac0048 100644 (file)
@@ -123,4 +123,8 @@ class mnet_access_control_updated extends base {
         // Nothing to map.
         return false;
     }
+
+    public static function is_deprecated() {
+        return true;
+    }
 }
index a9640e0..0c105e2 100644 (file)
@@ -365,7 +365,7 @@ class file_storage {
                 throw new file_exception('storedfileproblem', 'Could not copy file contents to temp file.');
             }
         } catch (file_exception $fe) {
-            remove_dir($uniqdir);
+            remove_dir($tmp);
             throw $fe;
         }
 
@@ -386,8 +386,9 @@ class file_storage {
         chdir($tmp);
         $result = exec($cmd, $output);
         chdir($currentdir);
-        if (!file_exists($newtmpfile)) {
-            remove_dir($uniqdir);
+        touch($newtmpfile);
+        if (filesize($newtmpfile) === 0) {
+            remove_dir($tmp);
             // Cleanup.
             return false;
         }
@@ -404,7 +405,7 @@ class file_storage {
 
         $convertedfile = $this->create_file_from_pathname($record, $newtmpfile);
         // Cleanup.
-        remove_dir($uniqdir);
+        remove_dir($tmp);
         return $convertedfile;
     }
 
index b33f437..9fe7806 100644 (file)
@@ -266,7 +266,8 @@ class MoodleQuickForm_modgrade extends MoodleQuickForm_group {
         $point = (isset($vals['modgrade_point'])) ? $vals['modgrade_point'] : null;
         $scale = (isset($vals['modgrade_scale'])) ? $vals['modgrade_scale'] : null;
         $rescalegrades = (isset($vals['modgrade_rescalegrades'])) ? $vals['modgrade_rescalegrades'] : null;
-        $return = $this->process_value($type, $scale, $point);
+
+        $return = $this->process_value($type, $scale, $point, $rescalegrades);
         return array($this->getName() => $return, $this->getName() . '_rescalegrades' => $rescalegrades);
     }
 
@@ -276,11 +277,17 @@ class MoodleQuickForm_modgrade extends MoodleQuickForm_group {
      * @param  string $type The value of the grade type select box. Can be 'none', 'scale', or 'point'
      * @param  string|int $scale The value of the scale select box.
      * @param  string|int $point The value of the point grade textbox.
+     * @param  string $rescalegrades The value of the rescalegrades select.
      * @return int The resulting value
      */
-    protected function process_value($type='none', $scale=null, $point=null) {
+    protected function process_value($type='none', $scale=null, $point=null, $rescalegrades=null) {
         global $COURSE;
         $val = 0;
+        if ($this->isupdate && $this->hasgrades && $this->canrescale && $this->currentgradetype == 'point' && empty($rescalegrades)) {
+            // If the maxgrade field is disabled with javascript, no value is sent with the form and mform assumes the default.
+            // If the user was forced to choose a rescale option - and they haven't - prevent any changes to the max grade.
+            return $this->currentgrade;
+        }
         switch ($type) {
             case 'point':
                 if ($this->validate_point($point) === true) {
index 4f72273..10a5207 100644 (file)
@@ -52,6 +52,9 @@ information provided here is intended especially for developers.
 * All file_packer implementations now accept an additional parameter to allow a simple boolean return value instead of
   an array of individual file statuses.
 * "I set the field "field_string" to multiline:" now end with colon (:), as PyStrings is supposed to end with ":"
+* New functions to support deprecation of events have been added to the base event. See MDL-46214 for further details.
+* A new function `get_name_with_info` has been added to the base event. This function adds information about event
+  deprecations and should be used where this information is relevant.
 
 === 3.1 ===
 
index 8b589ac..4d861e5 100644 (file)
@@ -45,6 +45,22 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c
     And I follow "View all submissions"
     Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
 
+  Scenario: Update an assignment without touching the max grades
+    Given I follow "Edit settings"
+    And I expand all fieldsets
+    And I set the field "Rescale existing grades" to "No"
+    And I set the field "Maximum grade" to "80"
+    And I press "Save and display"
+    And I follow "Edit settings"
+    And I press "Save and display"
+    And I follow "Edit settings"
+    And I expand all fieldsets
+    And I set the field "Rescale existing grades" to "Yes"
+    And I set the field "Maximum grade" to "80"
+    When I press "Save and display"
+    And I follow "View all submissions"
+    Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
+
   Scenario: Update the max grade for an assignment rescaling existing grades
     Given I follow "Edit settings"
     And I expand all fieldsets
index a72ebe1..e922359 100644 (file)
@@ -196,6 +196,14 @@ class data_field_latlong extends data_field_base {
         return false;
     }
 
+    function update_content_import($recordid, $value, $name='') {
+        $values = explode(" ", $value, 2);
+
+        foreach ($values as $index => $value) {
+            $this->update_content($recordid, $value, $name . '_' . $index);
+        }
+    }
+
     function update_content($recordid, $value, $name='') {
         global $DB;
 
index da87cb5..5218911 100644 (file)
@@ -159,6 +159,14 @@ class data_field_url extends data_field_base {
         return false;
     }
 
+    function update_content_import($recordid, $value, $name='') {
+        $values = explode(" ", $value, 2);
+
+        foreach ($values as $index => $value) {
+            $this->update_content($recordid, $value, $name . '_' . $index);
+        }
+    }
+
     function update_content($recordid, $value, $name='') {
         global $DB;
 
index 9ab7a26..27b1010 100644 (file)
@@ -109,12 +109,19 @@ if (!$formdata = $form->get_data()) {
         if (!$fieldnames = $cir->get_columns()) {
             print_error('cannotreadtmpfile', 'error');
         }
+        $fieldnames = array_flip($fieldnames);
         // check the fieldnames are valid
-        $fields = $DB->get_records('data_fields', array('dataid'=>$data->id), '', 'name, id, type');
+        $rawfields = $DB->get_records('data_fields', array('dataid' => $data->id), '', 'name, id, type');
+        $fields = array();
         $errorfield = '';
-        foreach ($fieldnames as $name) {
-            if (!isset($fields[$name])) {
+        foreach ($fieldnames as $name => $id) {
+            if (!isset($rawfields[$name])) {
                 $errorfield .= "'$name' ";
+            } else {
+                $field = $rawfields[$name];
+                require_once("$CFG->dirroot/mod/data/field/$field->type/field.class.php");
+                $classname = 'data_field_' . $field->type;
+                $fields[$name] = new $classname($field, $data, $cm);
             }
         }
 
@@ -126,58 +133,23 @@ if (!$formdata = $form->get_data()) {
         $recordsadded = 0;
         while ($record = $cir->next()) {
             if ($recordid = data_add_record($data, 0)) {  // add instance to data_record
-                $fields = $DB->get_records('data_fields', array('dataid'=>$data->id), '', 'name, id, type');
-
-                // Insert new data_content fields with NULL contents:
                 foreach ($fields as $field) {
-                    $content = new stdClass();
-                    $content->recordid = $recordid;
-                    $content->fieldid = $field->id;
-                    $DB->insert_record('data_content', $content);
-                }
-                // Fill data_content with the values imported from the CSV file:
-                foreach ($record as $key => $value) {
-                    $name = $fieldnames[$key];
-                    $field = $fields[$name];
-                    $content = new stdClass();
-                    $content->fieldid = $field->id;
-                    $content->recordid = $recordid;
-                    if ($field->type == 'textarea') {
-                        // the only field type where HTML is possible
-                        $value = clean_param($value, PARAM_CLEANHTML);
+                    $fieldid = $fieldnames[$field->field->name];
+                    if (isset($record[$fieldid])) {
+                        $value = $record[$fieldid];
                     } else {
-                        // remove potential HTML:
-                        $patterns[] = '/</';
-                        $replacements[] = '&lt;';
-                        $patterns[] = '/>/';
-                        $replacements[] = '&gt;';
-                        $value = preg_replace($patterns, $replacements, $value);
+                        $value = '';
                     }
-                    // for now, only for "latlong" and "url" fields, but that should better be looked up from
-                    // $CFG->dirroot . '/mod/data/field/' . $field->type . '/field.class.php'
-                    // once there is stored how many contents the field can have.
-                    if ($field->type == 'latlong') {
-                        $values = explode(" ", $value, 2);
-                        // The lat, long values might be in a different float format.
-                        $content->content  = unformat_float($values[0]);
-                        $content->content1 = unformat_float($values[1]);
-                    } else if ($field->type == 'url') {
-                        $values = explode(" ", $value, 2);
-                        $content->content  = $values[0];
-                        if (!empty($content->content) && (strpos($content->content, '://') === false)
-                                && (strpos($content->content, '/') !== 0)) {
-                            $content->content = 'http://' . $content->content;
-                        }
-                        // The url field doesn't always have two values (unforced autolinking).
-                        if (count($values) > 1) {
-                            $content->content1 = $values[1];
-                        }
+
+                    if (method_exists($field, 'update_content_import')) {
+                        $field->update_content_import($recordid, $value, 'field_' . $field->field->id);
                     } else {
+                        $content = new stdClass();
+                        $content->fieldid = $field->field->id;
                         $content->content = $value;
+                        $content->recordid = $recordid;
+                        $DB->insert_record('data_content', $content);
                     }
-                    $oldcontent = $DB->get_record('data_content', array('fieldid'=>$field->id, 'recordid'=>$recordid));
-                    $content->id = $oldcontent->id;
-                    $DB->update_record('data_content', $content);
                 }
                 $recordsadded++;
                 print get_string('added', 'moodle', $recordsadded) . ". " . get_string('entry', 'data') . " (ID $recordid)<br />\n";
diff --git a/mod/data/upgrade.txt b/mod/data/upgrade.txt
new file mode 100644 (file)
index 0000000..7d8019b
--- /dev/null
@@ -0,0 +1,7 @@
+This files describes API changes in /mod/data - plugins,
+information provided here is intended especially for developers.
+
+=== 3.2 ===
+
+* New hook - update_content_import - Can be implemented by field subplugins data_field_* class
+    This can be used to pre-process data from a csv file before it is inserted into the database.
index 94ba3aa..b784f8e 100644 (file)
@@ -572,9 +572,7 @@ class lesson_display_answer_form_matching extends moodleform {
                     // Temporary fixed until MDL-38885 gets integrated
                     $mform->setType('response', PARAM_TEXT);
                 }
-                $context = context_module::instance($PAGE->cm->id);
-                $answer->answer = file_rewrite_pluginfile_urls($answer->answer, 'pluginfile.php', $context->id,
-                        'mod_lesson', 'page_answers', $answer->id);
+                $answer = lesson_page_type_matching::rewrite_answers_urls($answer);
                 $mform->addElement('select', $responseid, format_text($answer->answer,$answer->answerformat,$options), $responseoptions, $disabled);
                 $mform->setType($responseid, PARAM_TEXT);
                 if ($hasattempt) {
index 8ce8f09..f8dd81f 100644 (file)
@@ -416,6 +416,7 @@ class lesson_display_answer_form_truefalse extends moodleform {
                 $ansid = 'answer_id';
             }
 
+            $answer = lesson_page_type_truefalse::rewrite_answers_urls($answer);
             $radiobuttons[] = $mform->createElement('radio', $ansid, null,
                 format_text($answer->answer, $answer->answerformat, $options), $answer->id, $disabled);
 
index 7d54c58..748bcec 100644 (file)
@@ -593,7 +593,7 @@ class qtype_multianswer_multiresponse_vertical_renderer extends qtype_multianswe
         if ($options->rightanswer) {
             $correct = [];
             foreach ($subq->answers as $ans) {
-                if (question_state::graded_state_for_fraction($ans->fraction) == question_state::$gradedpartial) {
+                if (question_state::graded_state_for_fraction($ans->fraction) != question_state::$gradedwrong) {
                     $correct[] = $subq->format_text($ans->answer, $ans->answerformat, $qa, 'question', 'answer', $ans->id);
                 }
             }
index ab30688..cce411f 100644 (file)
@@ -243,7 +243,7 @@ class report_eventlist_list_generator {
         $eventdata[$eventfullpath] = $eventfullpath::get_static_info();
         // Create a link for further event detail.
         $url = new \moodle_url('eventdetail.php', array('eventname' => $eventfullpath));
-        $link = \html_writer::link($url, $eventfullpath::get_name());
+        $link = \html_writer::link($url, $eventfullpath::get_name_with_info());
         $eventdata[$eventfullpath]['fulleventname'] = \html_writer::span($link);
         $eventdata[$eventfullpath]['fulleventname'] .= \html_writer::empty_tag('br');
         $eventdata[$eventfullpath]['fulleventname'] .= \html_writer::span($eventdata[$eventfullpath]['eventname'],
@@ -275,7 +275,7 @@ class report_eventlist_list_generator {
         }
 
         // Raw event data to be used to sort the "Event name" column.
-        $eventdata[$eventfullpath]['raweventname'] = $eventfullpath::get_name() . ' ' . $eventdata[$eventfullpath]['eventname'];
+        $eventdata[$eventfullpath]['raweventname'] = $eventfullpath::get_name_with_info() . ' ' . $eventdata[$eventfullpath]['eventname'];
 
         // Unset information that is not currently required.
         unset($eventdata[$eventfullpath]['action']);
index 2949aaf..baa46bb 100644 (file)
@@ -49,7 +49,7 @@ if (!is_dir($directory)) {
 }
 $filename = end($component);
 $eventfiles = $directory . '/' . $filename . '.php';
-$title = $eventname::get_name();
+$title = $eventname::get_name_with_info();
 
 // Define event information.
 $eventinformation = array('title' => $title);