Compare commits

...

93 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 8e619076cb Moodle release 3.9.1 2020-07-12 12:13:02 +02:00
AMOS bot 6a17f29147 Automatically generated installer lang files 2020-07-10 19:52:47 +00:00
Eloy Lafuente (stronk7) cafc042bf6 weekly release 3.9+ 2020-07-10 20:22:25 +02:00
Eloy Lafuente (stronk7) d2e303436b Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-07-10 20:22:18 +02:00
Jake Dallimore fb0d5acf4c Merge branch 'MDL-69232-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-10 15:12:29 +08:00
Andrew Nicols 376d34142f MDL-69232 behat: Simplify hooks
The behat hooks were needlessly complicated which made them much harder
to read, and understand, leading to bugs during development.

These have been significantly simplified to favour clarity over
overloading.
2020-07-10 08:40:30 +08:00
Andrew Nicols 8eb7f7e366 MDL-69232 behat: Make selenium start more fault tolerant
The session was previously only started once, but has now been moved to
restart between each test. Because of this the `$session->start()` is
now called more frequently which exposes a pre-existing issue whereby
Selenium will periodically fail to start.

When the session was only started at the beginning of the test, and at
occasional other times, it made sense to always stop the test runner
because it signified an issue with obtaining the session at all.

Since the session is restarted more frequently, and now between every
test, it no longer makes sense to do this. The test should only be
_stopped_ if the first attempt to obtain the Session fails. Once a
Session has been retrieved at least once it no longer makes sense to
assume that the failure was a configuration failure, but a connection
failure. Therefore subsequent tests should be attempted.
2020-07-10 08:40:29 +08:00
Jake Dallimore c3018e9ee7 Merge branch 'MDL-69135-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-09 10:38:21 +08:00
Michael Hawkins 996c94fd08 MDL-68426 theme: Set a limit on paths length in yui_combo
The maximum paths length is now consistent with the YUI loader.
This fix also removes any duplicate paths, so each file is only ever
fetched once.
2020-07-09 10:23:44 +08:00
Andrew Nicols fd7c3c4834 MDL-69232 behat: Add debugging information to Selenium fails 2020-07-09 09:45:32 +08:00
Andrew Nicols c3b7f2f974 MDL-69232 behat: Move suite tests to BeforeSuite hook 2020-07-09 09:45:32 +08:00
Eloy Lafuente (stronk7) 8589fbda8c Merge branch 'MDL-69134-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-08 20:53:22 +02:00
Jake Dallimore f1a681c983 Merge branch 'MDL-69104-39' of https://github.com/HuongNV13/moodle into MOODLE_39_STABLE 2020-07-08 13:07:01 +08:00
Andrew Nicols 8a66849a57 Merge branch 'MDL-68784-39' of https://github.com/Peterburnett/moodle into MOODLE_39_STABLE 2020-07-08 12:37:27 +08:00
Andrew Nicols 20318b8b7d Merge branch 'm39_MDL-66322_Travis_Run_Using_Docker_ExtTests-v2' of https://github.com/scara/moodle into MOODLE_39_STABLE 2020-07-08 12:20:52 +08:00
Peter Burnett d84d6f57a3 MDL-68784: Updated variable for graph report 2020-07-08 14:06:23 +10:00
Juan Leyva 01ec0ee85b MDL-69031 tool_mobile: Add missing features that can be disabled in 3.9 2020-07-08 09:36:44 +08:00
Andrew Nicols 91b23a2caa Merge branch 'MDL-60494-stray_img_end-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-07-08 09:24:05 +08:00
Andrew Nicols 053a433d74 MDL-69134 competencies: Behat fails randomly opening dialogues 2020-07-08 09:21:51 +08:00
Marina Glancy b1a2e67326 MDL-69109 theme: try to load icons from the current theme 2020-07-08 08:40:52 +08:00
Marina Glancy 40553ed459 MDL-69109 core: use different cache keys for FA icon maps 2020-07-08 08:40:51 +08:00
Matteo Scaramuccia 9127c17778 MDL-66322 travis: Configure a local copy of 'exttests' 2020-07-07 21:34:06 +02:00
Andrew Nicols 8f28fbee11 MDL-69086 theme_boost: Improve pendingJs checks for bootstrap
Where an element, like an `alert`, is closed it is removed from the DOM
before the event fires (this is a correct behaviour).

This means that the final event confirming that the action happened
(i.e. close => closed) fires, but does not bubble up the DOM to the
document.body.

This change moves the end event listener to only be added after a start
event has been fired, and to attach directly to the HTMLElement where it
will be fired. This means that the Event handler will still be called,
even though it has been removed from the DOM, because it does not need
to bubble up to the body.
2020-07-07 20:01:02 +02:00
Eloy Lafuente (stronk7) be7bda671e Merge branch 'm39_MDL-68588_Hide_Backuptempdir_From_Message_And_Debuginfo' of https://github.com/scara/moodle into MOODLE_39_STABLE 2020-07-07 19:10:41 +02:00
Eloy Lafuente (stronk7) c58101cde3 Merge branch 'MDL-68784-39' of https://github.com/Peterburnett/moodle into MOODLE_39_STABLE 2020-07-07 18:52:27 +02:00
Víctor Déniz Falcón 6e5b0b5c20 MDL-69093 enrol_manual: added check for allowed roles a user can assign 2020-07-07 08:33:08 +02:00
Andrew Nicols c201456f20 Merge branch 'MDL-69106-39' of git.in.moodle.com:cameron/moodle into MOODLE_39_STABLE 2020-07-07 14:15:54 +08:00
Eloy Lafuente (stronk7) 02b3d5aacf Merge branch 'MDL-60827-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-07-07 00:17:26 +02:00
Andrew Nicols dde1ead9fe MDL-69110 table: Remove commented code 2020-07-06 13:26:28 +08:00
Andrew Nicols 3915147b9b Merge branch 'MDL-69110-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-07-06 13:26:00 +08:00
Andrew Nicols 55c7fe15a0 Merge branch 'MDL-69158-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-07-06 12:12:12 +08:00
Jake Dallimore 82dba4d510 Merge branch 'MDL-69136-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-06 10:44:34 +08:00
Mihail Geshoski 9ecff3766a MDL-60827 oauth2: Consider requireconfirmation setting on login 2020-07-06 10:05:16 +08:00
Michael Hawkins 4fb85c9c9f MDL-69128 admin: Convert HTML entities when populating tasklogs filter 2020-07-06 10:04:17 +08:00
AMOS bot 6ea5922916 Automatically generated installer lang files 2020-07-06 00:08:30 +00:00
Leon Stringer 287e8f16e6 MDL-60494 mod_lti: Invalid </img>, example context
<img> was followed by an invalid </img>.  Also added example context for
template so it passes CI checks.
2020-07-05 15:57:42 +01:00
Matteo Scaramuccia 846422a90f MDL-68588 Backup: Hide ->backuptempdir in exception info 2020-07-03 21:18:30 +02:00
Jun Pataleta ea6621e00e MDL-69110 core: Unset the correct sort data element 2020-07-04 00:50:21 +08:00
Eloy Lafuente (stronk7) 44ffa8a801 weekly release 3.9+ 2020-07-03 18:41:38 +02:00
Eloy Lafuente (stronk7) a1d5911159 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-07-03 18:41:32 +02:00
Jake Dallimore c38e38d6b4 Merge branch 'MDL-69130-39-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-07-02 12:08:37 +08:00
Jake Dallimore f5b5f97f56 Merge branch 'MDL-69149-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-02 11:57:18 +08:00
Jake Dallimore 5528302282 Merge branch 'MDL-69122-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-07-02 11:49:19 +08:00
AMOS bot 995f0a3a58 Automatically generated installer lang files 2020-07-02 00:08:08 +00:00
Eloy Lafuente (stronk7) 894ebe38a2 Merge branch 'MDL-69072-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-01 23:23:45 +02:00
Andrew Nicols 0609febf16 MDL-69072 behat: Remove restart_browser_after feature
This is no longer required as the Mink session is restarted after every
test regardless.
2020-07-01 23:23:39 +02:00
Luca Bösch 1d6c1cc0ae MDL-68584 core_question: flexbox compatible separator for question types
* the br tag does not work well in a flexbox context, a 100% with div
works in both classic and boost.
2020-07-01 16:42:50 +08:00
Paul Holden d783f12861 MDL-69150 message_airnotifier: correct apps portal link. 2020-07-01 08:39:47 +08:00
Paul Holden f324c2d16c MDL-69151 message_airnotifier: start output before accesskey request.
This allows debugging generated by the request to be shown on the
page.
2020-07-01 08:32:34 +08:00
Huong Nguyen 5486975097 MDL-69104 Questions: Drag and drop question family don't work with iOS
- Drag and Drop marker question type
 - Drag and Drop onto image question type
 - Drag and Drop into text question type
2020-06-30 14:48:47 +07:00
Cameron Ball d4b6b26f4f MDL-69106 assignfeedback_editpdf: Keep files in conversion queue
In some circumstances, a submission waiting to be converted needs to persist
in the conversion queue so that it can be polled on subsequent cron runs.
2020-06-30 13:56:57 +08:00
Peter Burnett 996dd0b0b9 MDL-68784 scorm: Removed limit on allowed scorm users in report 2020-06-30 15:17:51 +10:00
Luca Bösch b44588aaba MDL-69158 block_blog_menu: format search form. 2020-06-29 11:13:55 +02:00
Andrew Nicols 95fbf4d8e5 MDL-69136 behat: Improve reliability of navigation steps 2020-06-29 11:36:36 +08:00
Andrew Nicols 6f78024717 MDL-69136 behat: Support find on a NodeElement 2020-06-29 11:36:30 +08:00
Andrew Nicols 7b2e257157 MDL-69072 mod_scorm: Stop mink reset after tests
This is now done for all scenarios. It is no longer necessary to do so
specifically for mod_scorm.
2020-06-26 21:17:23 +08:00
Andrew Nicols bb344d07e7 MDL-69072 behat: Relaunch browser session between scenarios 2020-06-26 21:17:22 +08:00
Andrew Nicols 959c2cb84e MDL-69149 core_grade: Correct xpath attribute selector 2020-06-26 19:59:56 +08:00
Andrew Nicols ee7b438f61 MDL-69135 core_calendar: PendingJS for event filtering 2020-06-26 07:58:36 +08:00
Helen Foster dc0241306b MDL-69130 lang: Import fixed English strings (en_fix)
Significant string change:

- presentationoraltrequired,atto_image - wording changed to mention
  'decorative only' checkbox
2020-06-25 21:52:35 +02:00
Eloy Lafuente (stronk7) 89ce4db476 weekly release 3.9+ 2020-06-25 18:06:36 +02:00
Eloy Lafuente (stronk7) 55a1405a84 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-06-25 18:06:31 +02:00
Bas Brands 57b920b8b7 MDL-69122 report_competency: fix clearfix
- a misplaced clearfix caused part of the recontrols to be
inaccessible
2020-06-24 09:15:28 +02:00
Nicolas Martignoni bae07c1bfb MDL-68992 Privacy: Update default minimal digital age of consent
Updating default minimal digital age of consent according to current legislation,
that was updated for several countries since 2018.
2020-06-24 10:14:53 +08:00
Peter Dias 4f7016f2da MDL-69065 course: Provide the id for the sr param
* Pass the section return id to the activity chooser
* Additional behat test to cover the case
2020-06-24 10:14:51 +08:00
Andrew Nicols 7af8441403 MDL-66568 behat: Reset theme CSS between scenarios 2020-06-23 18:03:52 +02:00
Andrew Nicols 7ba95339a6 MDL-66568 behat: Support building of themes for behat 2020-06-23 18:03:52 +02:00
Andrew Nicols b6c37f2926 MDL-66568 core_output: Return built theme CSS 2020-06-23 18:03:52 +02:00
AMOS bot b8408c3582 Automatically generated installer lang files 2020-06-23 12:25:17 +00:00
Bas Brands fb625069cf MDL-69021 theme_boost: improve link styles in alerts
- provide default styles for links in alerts if the .alert-link
css class is omitted.
2020-06-23 11:31:23 +08:00
hiendinh d4297993a4 MDL-68841 Modal dialogs: Wrong behavior of popup 2020-06-23 09:45:44 +08:00
Víctor Déniz Falcón 2104324ded Merge branch 'MDL-69099-39-disabledtasks' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-06-22 17:20:10 +01:00
David Mudrák 153b2cb484 MDL-69099 tasks: Do not mark the non-enabled plugin's task as disabled
The `core\plugininfo\base::is_enabled()` uses three-state logic for its
return value. It can return null as a valid value as per its
documentation. We need to test for the explicit false value in this
case.

To make the attached Behat test able to identify the table, the caption
is added. It seems to be helpful for all users so I leave it displayed
without using the accesshide mechanism.
2020-06-22 10:10:15 +02:00
Jake Dallimore c72adaa749 Merge branch 'MDL-69047-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-06-22 12:41:28 +08:00
Adrian Greeve 3c2ed1533c Merge branch 'MDL-69077_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-06-22 10:41:47 +08:00
Jun Pataleta b9518bf811 MDL-69008 core: Fix accessibility issues in paged content templates
* Added menuitem role for the "Show x per page" menu.
* Added appropriate aria-labels for the links in the paging bar.
2020-06-19 16:49:03 +02:00
Amaia Anabitarte 4f0f1bd84f MDL-69047 core_contentbank: Hard coding status messages 2020-06-18 18:07:41 +02:00
Sara Arjona e2ef786003 weekly release 3.9+ 2020-06-18 14:14:00 +02:00
Russell Boyatt 5b134b5de5 MDL-66899 quiz: Adding test for regrading quiz event. 2020-06-18 04:52:47 +01:00
Russell Boyatt 62c4da281a MDL-66899 quiz: Log a regrading event when quiz attempt is regraded. 2020-06-18 04:52:47 +01:00
Víctor Déniz Falcón 4c27f858b9 Merge branch 'MDL-69060-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-06-17 23:44:40 +01:00
Tim Hunt 6ced5c26d0 MDL-69077 questions: question tag capabilties are relevant 2020-06-17 13:07:30 +01:00
hiendinh ccd504115d MDL-68890 progressbar: prevent display exist file's progress bar 2020-06-17 19:54:06 +08:00
Jake Dallimore 647e5d8021 Merge branch 'MDL-68215-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-06-17 14:58:35 +08:00
Tim Hunt 6a7042d980 MDL-68971 webservice: errors should give enough info to find the problem 2020-06-17 11:36:46 +08:00
Jun Pataleta 7532b032bb Merge branch 'MDL-67294-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-06-17 10:36:14 +08:00
Jun Pataleta b5c1d17da5 MDL-69049 tool_dataprivacy: Add possibly missing comment format columns
The earlier CONTRIB plugin versions of the tool (<33.2.0, <34.2.0) were
missing the following columns in the data requests table:
* commentsformat
* dpocommentformat
And the upgrade scripts for the merged tool failed in
Moodle 3.3.8+/3.3.0+ failed to add these columns.
So a site which uses the CONTRIB plugin and eventually upgrading to 3.9
will encounter an error during upgrade because of the missing
dpocommentformat column.
2020-06-16 17:59:03 +01:00
Mihail Geshoski 56a7d91066 MDL-67294 assignsubmission_file: Make sure record exists before updating 2020-06-17 00:55:46 +08:00
Tim Hunt 93d636a95b MDL-68436 atto_recordrtc: only works once per page 2020-06-16 14:40:35 +08:00
Víctor Déniz Falcón 7ca771e4ac Merge branch 'MDL-69044_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-06-15 17:36:32 +01:00
Luca Bösch 6e7e7e1241 MDL-68215 block_activity_result: Format elements more nicely. 2020-06-15 15:26:13 +02:00
Luca Bösch 8b43f32f8c MDL-69060 core_contentbank: fix contenbank typos. 2020-06-15 13:37:00 +02:00
Eloy Lafuente (stronk7) a30eb7d16c MDL-69044 upgrade: add 3.9.0 separation line to all upgrade scripts 2020-06-14 13:09:13 +02:00
240 changed files with 1379 additions and 480 deletions
+9 -1
View File
@@ -15,6 +15,7 @@ dist: xenial
services:
- mysql
- docker
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
@@ -61,8 +62,9 @@ cache:
- $HOME/.npm
before_install:
- docker run -d -p 127.0.0.1:8080:80 --name exttests moodlehq/moodle-exttests
# Avoid IPv6 default binding as service (causes redis not to start).
sudo service redis-server start --bind 127.0.0.1
- sudo service redis-server start --bind 127.0.0.1
install:
- >
@@ -169,6 +171,10 @@ before_script:
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
config.php ;
# Enable test external resources
sed -i \
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://127.0.0.1:8080');" \
config.php ;
# Redis cache store tests
sed -i \
-e "/require_once/i \\define('TEST_CACHESTORE_REDIS_TESTSERVERS', '127.0.0.1');" \
@@ -248,6 +254,8 @@ script:
if [ "$TASK" = 'PHPUNIT' ];
then
vendor/bin/phpunit --fail-on-risky --disallow-test-output --verbose;
EXTTESTS_HITS=$(docker logs exttests 2>&1 | grep -Fv -e 'AH00558' -e '[pid 1]' | wc -l)
echo -e "\nTest local resources number of hits: ${EXTTESTS_HITS}.\n"
fi
- >
+3 -3
View File
@@ -645,14 +645,14 @@ if ($hassiteconfig) {
// Content bank content types.
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('contenbanksettings', new lang_string('contentbank')));
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
$temp->add(new admin_setting_managecontentbankcontenttypes());
$ADMIN->add('contenbanksettings', $temp);
$ADMIN->add('contentbanksettings', $temp);
$plugins = core_plugin_manager::instance()->get_plugins_of_type('contenttype');
foreach ($plugins as $plugin) {
/** @var \core\plugininfo\contentbank $plugin */
$plugin->load_settings($ADMIN, 'contenbanksettings', $hassiteconfig);
$plugin->load_settings($ADMIN, 'contentbanksettings', $hassiteconfig);
}
}
+18
View File
@@ -261,10 +261,28 @@ if ($hassiteconfig) {
$temp->add($setting);
// See {@link https://gdpr-info.eu/art-8-gdpr/}.
// See {@link https://www.betterinternetforkids.eu/web/portal/practice/awareness/detail?articleId=3017751}.
$ageofdigitalconsentmap = implode(PHP_EOL, [
'*, 16',
'AT, 14',
'BE, 13',
'BG, 14',
'CY, 14',
'CZ, 15',
'DK, 13',
'EE, 13',
'ES, 14',
'FI, 13',
'FR, 15',
'GB, 13',
'GR, 15',
'IT, 14',
'LT, 14',
'LV, 13',
'MT, 13',
'NO, 13',
'PT, 13',
'SE, 13',
'US, 13'
]);
$setting = new admin_setting_agedigitalconsentmap('agedigitalconsentmap',
+1 -1
View File
@@ -66,7 +66,7 @@ echo $OUTPUT->header();
// Output the search form.
echo $OUTPUT->render_from_template('core_admin/tasklogs', (object) [
'action' => $pageurl->out(),
'filter' => $filter,
'filter' => htmlentities($filter),
'resultfilteroptions' => [
(object) [
'value' => -1,
+6
View File
@@ -164,6 +164,8 @@ if ($options['install']) {
mtrace("Acceptance tests site installed");
}
// Note: Do not build the themes here. This is done during the 'enable' stage.
} else if ($options['drop']) {
// Ensure no tests are running.
test_lock::acquire('behat');
@@ -182,6 +184,10 @@ if ($options['install']) {
// Enable test mode.
behat_util::start_test_mode($options['add-core-features-to-theme'], $options['optimize-runs'], $parallel, $run);
// Themes are only built in the 'enable' command.
behat_util::build_themes();
mtrace("Testing environment themes built");
// This is only displayed once for parallel install.
if (empty($run)) {
// Notify user that 2.5 profile has been converted to 3.5.
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_cohortroles_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2020020600, 'tool', 'cohortroles');
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -36,7 +36,7 @@ $string['customlang:view'] = 'View local translation';
$string['filter'] = 'Filter strings';
$string['filtercomponent'] = 'Show strings of these components';
$string['filtercustomized'] = 'Customised only';
$string['filtermodified'] = 'Modified only';
$string['filtermodified'] = 'Modified in this session only';
$string['filteronlyhelps'] = 'Help only';
$string['filtershowstrings'] = 'Show strings';
$string['filterstringid'] = 'String identifier';
+22 -3
View File
@@ -322,10 +322,29 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2019121700) {
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2020061501) {
// Define field commentsformat to be added to tool_dataprivacy_request.
$table = new xmldb_table('tool_dataprivacy_request');
$field = new xmldb_field('commentsformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'comments');
// Conditionally launch add field commentsformat.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Define field dpocommentformat to be added to tool_dataprivacy_request.
$field = new xmldb_field('dpocommentformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'dpocomment');
// Conditionally launch add field dpocommentformat.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Define field systemapproved to be added to tool_dataprivacy_request.
$table = new xmldb_table('tool_dataprivacy_request');
$field = new xmldb_field('systemapproved', XMLDB_TYPE_INTEGER, '4', null, XMLDB_NOTNULL, null, '0', 'dpocommentformat');
// Conditionally launch add field systemapproved.
@@ -334,7 +353,7 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
}
// Dataprivacy savepoint reached.
upgrade_plugin_savepoint(true, 2019121700, 'tool', 'dataprivacy');
upgrade_plugin_savepoint(true, 2020061501, 'tool', 'dataprivacy');
}
return true;
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2020061500;
$plugin->version = 2020061501;
$plugin->requires = 2020060900;
$plugin->component = 'tool_dataprivacy';
+3
View File
@@ -45,5 +45,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -46,5 +46,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -46,5 +46,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -1,2 +1,2 @@
define ("tool_lp/dialogue",["core/yui"],function(a){var b=function(b,c,d,e,f){this.yuiDialogue=null;var g=this;if("undefined"==typeof f){f=!1}a.use("moodle-core-notification","timers",function(){var h="480px";if(f){h="800px"}g.yuiDialogue=new M.core.dialogue({headerContent:b,bodyContent:c,draggable:!0,visible:!1,center:!0,modal:!0,width:h});g.yuiDialogue.after("visibleChange",function(b){if(b.newVal){if("undefined"!=typeof d){a.soon(function(){d(g);g.yuiDialogue.centerDialogue()})}}else{if("undefined"!=typeof e){a.soon(function(){e(g)})}}});g.yuiDialogue.show()})};b.prototype.close=function(){this.yuiDialogue.hide();this.yuiDialogue.destroy()};b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()};return b});
define ("tool_lp/dialogue",["core/yui"],function(a){var b=function(b,c,d,e,f){M.util.js_pending("tool_lp/dialogue:dialogue");this.yuiDialogue=null;var g=this;if("undefined"==typeof f){f=!1}a.use("moodle-core-notification","timers",function(){var h="480px";if(f){h="800px"}g.yuiDialogue=new M.core.dialogue({headerContent:b,bodyContent:c,draggable:!0,visible:!1,center:!0,modal:!0,width:h});g.yuiDialogue.before("visibleChange",function(){M.util.js_pending("tool_lp/dialogue:before:visibleChange")});g.yuiDialogue.after("visibleChange",function(b){if(b.newVal){if("undefined"!=typeof d){a.soon(function(){d(g);g.yuiDialogue.centerDialogue();M.util.js_complete("tool_lp/dialogue:before:visibleChange")})}else{M.util.js_complete("tool_lp/dialogue:before:visibleChange")}}else{if("undefined"!=typeof e){a.soon(function(){e(g);M.util.js_complete("tool_lp/dialogue:before:visibleChange")})}else{M.util.js_complete("tool_lp/dialogue:before:visibleChange")}}});g.yuiDialogue.show();M.util.js_complete("tool_lp/dialogue:dialogue")})};b.prototype.close=function(){this.yuiDialogue.hide();this.yuiDialogue.destroy()};b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()};return b});
//# sourceMappingURL=dialogue.min.js.map
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
define ("tool_lp/grade_dialogue",["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]);this._ratingOptions=a};g.prototype=Object.create(e.prototype);g.prototype._popup=null;g.prototype._ratingOptions=null;g.prototype._afterRender=function(){var b=this._find("[data-action=\"rate\"]"),c=this._find("[name=\"rating\"]"),d=this._find("[name=\"comment\"]");this._find("[data-action=\"cancel\"]").click(function(a){a.preventDefault();this._trigger("cancelled");this.close()}.bind(this));c.change(function(){var c=a(this);if(!c.val()){b.prop("disabled",!0)}else{b.prop("disabled",!1)}}).change();b.click(function(a){a.preventDefault();var b=c.val();if(!b){return}this._trigger("rated",{rating:b,note:d.val()});this.close()}.bind(this))};g.prototype.close=function(){this._popup.close();this._popup=null};g.prototype.display=function(){return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){this._popup=new d(a,b[0],this._afterRender.bind(this));return this._popup}.bind(this)).catch(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)};return g});
define ("tool_lp/grade_dialogue",["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]);this._ratingOptions=a};g.prototype=Object.create(e.prototype);g.prototype._popup=null;g.prototype._ratingOptions=null;g.prototype._afterRender=function(){var b=this._find("[data-action=\"rate\"]"),c=this._find("[name=\"rating\"]"),d=this._find("[name=\"comment\"]");this._find("[data-action=\"cancel\"]").click(function(a){a.preventDefault();this._trigger("cancelled");this.close()}.bind(this));c.change(function(){var c=a(this);if(!c.val()){b.prop("disabled",!0)}else{b.prop("disabled",!1)}}).change();b.click(function(a){a.preventDefault();var b=c.val();if(!b){return}this._trigger("rated",{rating:b,note:d.val()});this.close()}.bind(this))};g.prototype.close=function(){this._popup.close();this._popup=null};g.prototype.display=function(){M.util.js_pending("tool_lp/grade_dialogue:display");return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){this._popup=new d(a,b[0],function(){this._afterRender();M.util.js_complete("tool_lp/grade_dialogue:display")}.bind(this));return this._popup}.bind(this)).catch(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)};return g});
//# sourceMappingURL=grade_dialogue.min.js.map
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
define ("tool_lp/grade_user_competency_inline",["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length){throw new Error("Could not find the trigger")}this._scaleId=c;this._competencyId=d;this._userId=e;this._planId=g;this._courseId=h;this._chooseStr=i;this._setUp();j.click(function(a){a.preventDefault();this._dialogue.display()}.bind(this));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};h.prototype=Object.create(f.prototype);h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0,e;c<b.length;c++){e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){a.on("rated",function(a,e){var f=d._args;f.grade=e.rating;f.note=e.note;c.call([{methodname:d._methodName,args:f,done:function done(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])});return a}).then(function(a){d._dialogue=a}).fail(b.exception)};h.prototype._scaleId=null;h.prototype._competencyId=null;h.prototype._userId=null;h.prototype._planId=null;h.prototype._courseId=null;h.prototype._chooseStr=null;h.prototype._dialogue=null;return h});
define ("tool_lp/grade_user_competency_inline",["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length){throw new Error("Could not find the trigger")}this._scaleId=c;this._competencyId=d;this._userId=e;this._planId=g;this._courseId=h;this._chooseStr=i;this._setUp();j.click(function(a){a.preventDefault();this._dialogue.display()}.bind(this));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};h.prototype=Object.create(f.prototype);h.prototype._setUp=function(){var a=[],d=this;M.util.js_pending("tool_lp/grade_user_competency_inline:_setUp");var f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0,e;c<b.length;c++){e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){a.on("rated",function(a,e){var f=d._args;f.grade=e.rating;f.note=e.note;c.call([{methodname:d._methodName,args:f,done:function done(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])});return a}).then(function(a){d._dialogue=a;M.util.js_complete("tool_lp/grade_user_competency_inline:_setUp")}).fail(b.exception)};h.prototype._scaleId=null;h.prototype._competencyId=null;h.prototype._userId=null;h.prototype._planId=null;h.prototype._courseId=null;h.prototype._chooseStr=null;h.prototype._dialogue=null;return h});
//# sourceMappingURL=grade_user_competency_inline.min.js.map
File diff suppressed because one or more lines are too long
+13
View File
@@ -35,6 +35,8 @@ define(['core/yui'], function(Y) {
* @param {Boolean} wide Specify we want an extra wide dialogue (the size is standard, but wider than the default).
*/
var dialogue = function(title, content, afterShow, afterHide, wide) {
M.util.js_pending('tool_lp/dialogue:dialogue');
this.yuiDialogue = null;
var parent = this;
@@ -59,6 +61,10 @@ define(['core/yui'], function(Y) {
width: width
});
parent.yuiDialogue.before('visibleChange', function() {
M.util.js_pending('tool_lp/dialogue:before:visibleChange');
});
parent.yuiDialogue.after('visibleChange', function(e) {
if (e.newVal) {
// Delay the callback call to the next tick, otherwise it can happen that it is
@@ -67,18 +73,25 @@ define(['core/yui'], function(Y) {
Y.soon(function() {
afterShow(parent);
parent.yuiDialogue.centerDialogue();
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
});
} else {
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
}
} else {
if ((typeof afterHide !== 'undefined')) {
Y.soon(function() {
afterHide(parent);
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
});
} else {
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
}
}
});
parent.yuiDialogue.show();
M.util.js_complete('tool_lp/dialogue:dialogue');
});
};
+5 -1
View File
@@ -102,6 +102,7 @@ define(['jquery',
* @return {Promise}
*/
Grade.prototype.display = function() {
M.util.js_pending('tool_lp/grade_dialogue:display');
return $.when(
Str.get_string('rate', 'tool_lp'),
this._render()
@@ -110,7 +111,10 @@ define(['jquery',
this._popup = new Dialogue(
title,
templateResult[0],
this._afterRender.bind(this)
function() {
this._afterRender();
M.util.js_complete('tool_lp/grade_dialogue:display');
}.bind(this)
);
return this._popup;
@@ -94,6 +94,7 @@ define(['jquery',
var options = [],
self = this;
M.util.js_pending('tool_lp/grade_user_competency_inline:_setUp');
var promise = ScaleValues.get_values(self._scaleId);
promise.then(function(scalevalues) {
options.push({
@@ -134,6 +135,7 @@ define(['jquery',
.then(function(dialogue) {
self._dialogue = dialogue;
M.util.js_complete('tool_lp/grade_user_competency_inline:_setUp');
return;
})
.fail(notification.exception);
+7
View File
@@ -489,6 +489,7 @@ class api {
'$mmSideMenuDelegate_mmaFiles' => new lang_string('files'),
'$mmSideMenuDelegate_website' => new lang_string('webpage'),
'$mmSideMenuDelegate_help' => new lang_string('help'),
'CoreMainMenuDelegate_QrReader' => new lang_string('scanqrcode', 'tool_mobile'),
),
"$course" => array(
'NoDelegate_CourseBlocks' => new lang_string('blocks'),
@@ -527,6 +528,12 @@ class api {
$features["$remoteaddons"] = $remoteaddonslist;
}
if (!empty($availablemods['lti'])) {
$ltidisplayname = $availablemods['lti']->displayname;
$features["$ltidisplayname"]['CoreCourseModuleDelegate_AddonModLti:openInAppBrowser'] =
new lang_string('openusingembeddedbrowser', 'tool_mobile');
}
// Display OAuth 2 identity providers.
if (is_enabled_auth('oauth2')) {
$identityproviderslist = array();
+3
View File
@@ -48,5 +48,8 @@ function xmldb_tool_mobile_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -105,6 +105,7 @@ $string['notificationssentnotifications'] = 'Notifications sent';
$string['notificationscurrentactivedevices'] = 'Devices receiving notifications this month';
$string['oauth2identityproviders'] = 'OAuth 2 identity providers';
$string['offlineuse'] = 'Offline use';
$string['openusingembeddedbrowser'] = 'Open using embedded browser';
$string['pluginname'] = 'Moodle app tools';
$string['pluginnotenabledorconfigured'] = 'Plugin not enabled or configured.';
$string['qrcodedisabled'] = 'Access via QR code disabled';
@@ -118,6 +119,7 @@ $string['qrcodetypeurl'] = 'QR code with site URL';
$string['qrcodetypelogin'] = 'QR code with automatic login';
$string['readingthisemailgettheapp'] = 'Reading this in an email? <a href="{$a}">Download the mobile app and receive notifications on your mobile device</a>.';
$string['remoteaddons'] = 'Remote add-ons';
$string['scanqrcode'] = 'Scan QR code';
$string['selfsignedoruntrustedcertificatewarning'] = 'It seems that the HTTPS certificate is self-signed or not trusted. The mobile app will only work with trusted sites.';
$string['setuplink'] = 'App download page';
$string['setuplink_desc'] = 'URL of page with options to download the mobile app from the App Store and Google Play. The app download page link is displayed in the page footer and in a user\'s profile. Leave blank to not display a link.';
+3
View File
@@ -45,5 +45,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -102,5 +102,8 @@ function xmldb_tool_moodlenet_upgrade(int $oldversion) {
upgrade_plugin_savepoint(true, 2020061502, 'tool', 'moodlenet');
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -69,5 +69,8 @@ function xmldb_tool_policy_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -1
View File
@@ -48,6 +48,7 @@ class tool_task_renderer extends plugin_renderer_base {
$showloglink = \core\task\logmanager::has_log_report();
$table = new html_table();
$table->caption = get_string('scheduledtasks', 'tool_task');
$table->head = [
get_string('name'),
get_string('component', 'tool_task'),
@@ -180,7 +181,7 @@ class tool_task_renderer extends plugin_renderer_base {
$plugininfo->init_display_name();
$componentname = $plugininfo->displayname;
if (!$plugininfo->is_enabled()) {
if ($plugininfo->is_enabled() === false) {
$componentname .= ' ' . html_writer::span(
get_string('disabled', 'tool_task'), 'badge badge-secondary');
}
@@ -65,3 +65,9 @@ Feature: Manage scheduled tasks
| Name | Component | Minute | Hour | Day | Day of week | Month |
| Log table cleanup | Standard log | */5 | 1 | 2 | 4 | 3 |
And I should see "Log table cleanup" in the "tr.table-primary" "css_element"
Scenario: Disabled plugin's tasks are labelled as disabled too
When "CAS users sync job \auth_cas\task\sync_task" row "Next run" column of "Scheduled tasks" table should contain "Plugin disabled"
Then "CAS users sync job \auth_cas\task\sync_task" row "Component" column of "Scheduled tasks" table should contain "Disabled"
And "Background processing for scheduled allocation \workshopallocation_scheduled\task\cron_task" row "Next run" column of "Scheduled tasks" table should not contain "Plugin disabled"
And "Background processing for scheduled allocation \workshopallocation_scheduled\task\cron_task" row "Component" column of "Scheduled tasks" table should not contain "Disabled"
+3
View File
@@ -54,5 +54,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2020061501, 'tool', 'usertours');
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_db_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_email_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_none_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+4 -3
View File
@@ -455,8 +455,9 @@ class auth extends \auth_plugin_base {
}
}
$issuer = $client->get_issuer();
// First we try and find a defined mapping.
$linkedlogin = api::match_username_to_user($userinfo['username'], $client->get_issuer());
$linkedlogin = api::match_username_to_user($userinfo['username'], $issuer);
if (!empty($linkedlogin) && empty($linkedlogin->get('confirmtoken'))) {
$mappeduser = get_complete_user_data('id', $linkedlogin->get('userid'));
@@ -474,7 +475,7 @@ class auth extends \auth_plugin_base {
$SESSION->loginerrormsg = get_string('invalidlogin');
$client->log_out();
redirect(new moodle_url('/login/index.php'));
} else if ($mappeduser && $mappeduser->confirmed) {
} else if ($mappeduser && ($mappeduser->confirmed || !$issuer->get('requireconfirmation'))) {
// Update user fields.
$userinfo = $this->update_user($userinfo, $mappeduser);
$userwasmapped = true;
@@ -503,7 +504,7 @@ class auth extends \auth_plugin_base {
redirect(new moodle_url('/login/index.php'));
}
$issuer = $client->get_issuer();
if (!$issuer->is_valid_login_domain($oauthemail)) {
// Trigger login failed event.
$failurereason = AUTH_LOGIN_UNAUTHORISED;
+3
View File
@@ -81,5 +81,8 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -342,13 +342,13 @@ class block_activity_results extends block_base {
$rank = 0;
if (!empty($best)) {
$this->content->text .= '<table class="grades"><caption>';
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
if ($numbest == 1) {
$this->content->text .= get_string('bestgroupgrade', 'block_activity_results');
} else {
$this->content->text .= get_string('bestgroupgrades', 'block_activity_results', $numbest);
}
$this->content->text .= '</caption><colgroup class="number" />';
$this->content->text .= '</h6></caption><colgroup class="number" />';
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
foreach ($best as $groupid => $averagegrade) {
switch ($nameformat) {
@@ -398,13 +398,13 @@ class block_activity_results extends block_base {
$rank = 0;
if (!empty($worst)) {
$worst = array_reverse($worst, true);
$this->content->text .= '<table class="grades"><caption>';
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
if ($numworst == 1) {
$this->content->text .= get_string('worstgroupgrade', 'block_activity_results');
} else {
$this->content->text .= get_string('worstgroupgrades', 'block_activity_results', $numworst);
}
$this->content->text .= '</caption><colgroup class="number" />';
$this->content->text .= '</h6></caption><colgroup class="number" />';
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
foreach ($worst as $groupid => $averagegrade) {
switch ($nameformat) {
@@ -529,13 +529,13 @@ class block_activity_results extends block_base {
$rank = 0;
if (!empty($best)) {
$this->content->text .= '<table class="grades"><caption>';
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
if ($numbest == 1) {
$this->content->text .= get_string('bestgrade', 'block_activity_results');
} else {
$this->content->text .= get_string('bestgrades', 'block_activity_results', $numbest);
}
$this->content->text .= '</caption><colgroup class="number" />';
$this->content->text .= '</h6></caption><colgroup class="number" />';
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
foreach ($best as $userid => $gradeid) {
switch ($nameformat) {
@@ -592,13 +592,13 @@ class block_activity_results extends block_base {
$rank = 0;
if (!empty($worst)) {
$worst = array_reverse($worst, true);
$this->content->text .= '<table class="grades"><caption>';
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
if ($numbest == 1) {
$this->content->text .= get_string('worstgrade', 'block_activity_results');
} else {
$this->content->text .= get_string('worstgrades', 'block_activity_results', $numworst);
}
$this->content->text .= '</caption><colgroup class="number" />';
$this->content->text .= '</h6></caption><colgroup class="number" />';
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
foreach ($worst as $userid => $gradeid) {
switch ($nameformat) {
@@ -678,17 +678,17 @@ class block_activity_results extends block_base {
}
/**
* Generates the Link to the activity module when displaed outside of the module
* Generates the Link to the activity module when displayed outside of the module.
* @param stdclass $activity
* @param stdclass $cm
* @return string
*/
private function activity_link($activity, $cm) {
$o = html_writer::start_tag('h3');
$o = html_writer::start_tag('h5');
$o .= html_writer::link(new moodle_url('/mod/'.$activity->itemmodule.'/view.php',
array('id' => $cm->id)), format_string(($activity->itemname), true, ['context' => context_module::instance($cm->id)]));
$o .= html_writer::end_tag('h3');
$o .= html_writer::end_tag('h5');
return $o;
}
-5
View File
@@ -21,8 +21,3 @@
.block_activity_results table.grades .grade {
text-align: right;
}
.block_activity_results table.grades caption {
font-weight: bold;
font-size: 18px;
}
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+8 -4
View File
@@ -99,10 +99,14 @@ class block_blog_menu extends block_base {
// Prepare the footer for this block
if (has_capability('moodle/blog:search', context_system::instance())) {
// Full-text search field
$form = html_writer::tag('label', get_string('search', 'admin'), array('for'=>'blogsearchquery', 'class'=>'accesshide'));
$form .= html_writer::empty_tag('input', array('id'=>'blogsearchquery', 'type'=>'text', 'name'=>'search'));
$form .= html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('search')));
$this->content->footer = html_writer::tag('form', html_writer::tag('div', $form), array('class'=>'blogsearchform', 'method'=>'get', 'action'=>new moodle_url('/blog/index.php')));
$form = html_writer::tag('label', get_string('search', 'admin'), array('for' => 'blogsearchquery',
'class' => 'accesshide'));
$form .= html_writer::empty_tag('input', array('id' => 'blogsearchquery', 'class' => 'form-control mr-1',
'type' => 'text', 'name' => 'search'));
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'class' => 'btn btn-secondary',
'value' => get_string('search')));
$this->content->footer = html_writer::tag('form', html_writer::tag('div', $form), array(
'class' => 'blogsearchform form-inline', 'method' => 'get', 'action' => new moodle_url('/blog/index.php')));
} else {
// No footer to display
$this->content->footer = '';
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_block_html_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -78,5 +78,8 @@ function xmldb_block_myoverview_upgrade($oldversion) {
upgrade_block_savepoint(true, 2019111801, 'myoverview', false);
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -67,5 +67,8 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_quiz_results_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -59,5 +59,8 @@ function xmldb_block_recent_activity_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -72,5 +72,8 @@ function xmldb_block_recentlyaccesseditems_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_block_rss_client_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -61,5 +61,8 @@ function xmldb_block_section_links_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -67,5 +67,8 @@ function xmldb_block_settings_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -1,2 +1,2 @@
define ("core_calendar/calendar_filter",["jquery","core_calendar/selectors","core_calendar/events","core/str","core/templates"],function(a,b,c,d,e){var f=function(d){d.on("click",b.eventFilterItem,function(b){var c=a(b.currentTarget);g(c);b.preventDefault()});a("body").on(c.viewUpdated,function(){var c=d.find(b.eventFilterItem);c.each(function(b,c){c=a(c);if(c.data("eventtype-hidden")){var d=i(c);h(d)}})})},g=function(a){var b=i(a);b.hidden=!b.hidden;return d.get_string("eventtype"+b.eventtype,"calendar").then(function(a){b.name=a;b.icon=!0;b.key="i/"+b.eventtype+"event";b.component="core";return b}).then(function(a){return e.render("core_calendar/event_filter_key",a)}).then(function(b,c){return e.replaceNode(a,b,c)}).then(function(){h(b)})},h=function(b){M.util.js_pending("month-mini-filterChanged");a("body").trigger(c.filterChanged,{type:b.eventtype,hidden:b.hidden});M.util.js_complete("month-mini-filterChanged")},i=function(a){return{eventtype:a.data("eventtype"),hidden:a.data("eventtype-hidden")}};return{init:function init(b){b=a(b);f(b)}}});
define ("core_calendar/calendar_filter",["jquery","core_calendar/selectors","core_calendar/events","core/str","core/templates"],function(a,b,c,d,e){var f=function(d){d.on("click",b.eventFilterItem,function(b){var c=a(b.currentTarget);g(c);b.preventDefault()});a("body").on(c.viewUpdated,function(){var c=d.find(b.eventFilterItem);c.each(function(b,c){c=a(c);if(c.data("eventtype-hidden")){var d=i(c);h(d)}})})},g=function(a){var b=i(a);b.hidden=!b.hidden;M.util.js_pending("core_calendar/calendar_filter:toggleFilter");return d.get_string("eventtype"+b.eventtype,"calendar").then(function(a){b.name=a;b.icon=!0;b.key="i/"+b.eventtype+"event";b.component="core";return b}).then(function(a){return e.render("core_calendar/event_filter_key",a)}).then(function(b,c){return e.replaceNode(a,b,c)}).then(function(){h(b);M.util.js_complete("core_calendar/calendar_filter:toggleFilter")})},h=function(b){M.util.js_pending("month-mini-filterChanged");a("body").trigger(c.filterChanged,{type:b.eventtype,hidden:b.hidden});M.util.js_complete("month-mini-filterChanged")},i=function(a){return{eventtype:a.data("eventtype"),hidden:a.data("eventtype-hidden")}};return{init:function init(b){b=a(b);f(b)}}});
//# sourceMappingURL=calendar_filter.min.js.map
File diff suppressed because one or more lines are too long
+2
View File
@@ -64,6 +64,7 @@ function(
// Toggle the hidden. We need to render the template before we change the value.
data.hidden = !data.hidden;
M.util.js_pending("core_calendar/calendar_filter:toggleFilter");
return Str.get_string('eventtype' + data.eventtype, 'calendar')
.then(function(nameStr) {
data.name = nameStr;
@@ -81,6 +82,7 @@ function(
})
.then(function() {
fireFilterChangedEvent(data);
M.util.js_complete("core_calendar/calendar_filter:toggleFilter");
return;
});
};
-7
View File
@@ -898,13 +898,6 @@ $CFG->admin = 'admin';
// ),
// );
//
// You can force the browser session (not user's sessions) to restart after N seconds. This could
// be useful if you are using a cloud-based service with time restrictions in the browser side.
// Setting this value the browser session that Behat is using will be restarted. Set the time in
// seconds. Is not recommended to use this setting if you don't explicitly need it.
// Example:
// $CFG->behat_restart_browser_after = 7200; // Restarts the browser session after 2 hours
//
// All this page's extra Moodle settings are compared against a white list of allowed settings
// (the basic and behat_* ones) to avoid problems with production environments. This setting can be
// used to expand the default white list with an array of extra settings.
+1 -1
View File
@@ -1,2 +1,2 @@
define ("core_contentbank/actions",["jquery","core/ajax","core/notification","core/str","core/templates","core/url","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f,g,h){var k={DELETE_CONTENT:"[data-action=\"deletecontent\"]",RENAME_CONTENT:"[data-action=\"renamecontent\"]"},l=function(){this.registerEvents()};l.prototype.registerEvents=function(){a(k.DELETE_CONTENT).click(function(b){b.preventDefault();var e=a(this).data("contentname"),f=a(this).data("contentid"),j=a(this).data("contextid"),k="";d.get_strings([{key:"deletecontent",component:"core_contentbank"},{key:"deletecontentconfirm",component:"core_contentbank",param:{name:e}},{key:"delete",component:"core"}]).then(function(a){var b=a[0],c=a[1];k=a[2];return g.create({title:b,body:c,type:g.types.SAVE_CANCEL,large:!0})}).done(function(a){a.setSaveButtonText(k);a.getRoot().on(h.save,function(){return i(f,j)});a.getRoot().on(h.hidden,function(){a.destroy()});a.show()}).catch(c.exception)});a(k.RENAME_CONTENT).click(function(b){b.preventDefault();var f=a(this).data("contentname"),i=a(this).data("contentid"),k="";d.get_strings([{key:"renamecontent",component:"core_contentbank"},{key:"rename",component:"core_contentbank"}]).then(function(a){var b=a[0];k=a[1];return g.create({title:b,body:e.render("core_contentbank/renamecontent",{contentid:i,name:f}),type:g.types.SAVE_CANCEL})}).then(function(b){b.setSaveButtonText(k);b.getRoot().on(h.save,function(){var b=a("#newname").val();return j(i,b)});b.getRoot().on(h.hidden,function(){b.destroy()});b.show()}).catch(c.exception)})};function i(a,e){var g="success";b.call([{methodname:"core_contentbank_delete_content",args:{contentids:{contentid:a}}}])[0].then(function(a){if(a.result){return d.get_string("contentdeleted","core_contentbank")}g="error";return d.get_string("contentnotdeleted","core_contentbank")}).done(function(a){var b={contextid:e};if("success"==g){b.statusmsg=a}else{b.errormsg=a}window.location.href=f.relativeUrl("contentbank/index.php",b,!1)}).fail(c.exception)}function j(a,e){var g="success";b.call([{methodname:"core_contentbank_rename_content",args:{contentid:a,name:e}}])[0].then(function(a){if(a){return d.get_string("contentrenamed","core_contentbank")}g="error";return d.get_string("contentnotrenamed","core_contentbank")}).then(function(b){var d=null;if("success"==g){d={id:a,statusmsg:b};window.location.href=f.relativeUrl("contentbank/view.php",d,!1)}else{c.addNotification({message:b,type:"error"});c.fetchNotifications()}}).catch(c.exception)}return{init:function init(){return new l}}});
define ("core_contentbank/actions",["jquery","core/ajax","core/notification","core/str","core/templates","core/url","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f,g,h){var k={DELETE_CONTENT:"[data-action=\"deletecontent\"]",RENAME_CONTENT:"[data-action=\"renamecontent\"]"},l=function(){this.registerEvents()};l.prototype.registerEvents=function(){a(k.DELETE_CONTENT).click(function(b){b.preventDefault();var e=a(this).data("contentname"),f=a(this).data("contentid"),j=a(this).data("contextid"),k="";d.get_strings([{key:"deletecontent",component:"core_contentbank"},{key:"deletecontentconfirm",component:"core_contentbank",param:{name:e}},{key:"delete",component:"core"}]).then(function(a){var b=a[0],c=a[1];k=a[2];return g.create({title:b,body:c,type:g.types.SAVE_CANCEL,large:!0})}).done(function(a){a.setSaveButtonText(k);a.getRoot().on(h.save,function(){return i(f,j)});a.getRoot().on(h.hidden,function(){a.destroy()});a.show()}).catch(c.exception)});a(k.RENAME_CONTENT).click(function(b){b.preventDefault();var f=a(this).data("contentname"),i=a(this).data("contentid"),k="";d.get_strings([{key:"renamecontent",component:"core_contentbank"},{key:"rename",component:"core_contentbank"}]).then(function(a){var b=a[0];k=a[1];return g.create({title:b,body:e.render("core_contentbank/renamecontent",{contentid:i,name:f}),type:g.types.SAVE_CANCEL})}).then(function(b){b.setSaveButtonText(k);b.getRoot().on(h.save,function(){var b=a("#newname").val();return j(i,b)});b.getRoot().on(h.hidden,function(){b.destroy()});b.show()}).catch(c.exception)})};function i(a,d){var e="success";b.call([{methodname:"core_contentbank_delete_content",args:{contentids:{contentid:a}}}])[0].then(function(a){if(a.result){return"contentdeleted"}e="error";return"contentnotdeleted"}).done(function(a){var b={contextid:d};if("success"==e){b.statusmsg=a}else{b.errormsg=a}window.location.href=f.relativeUrl("contentbank/index.php",b,!1)}).fail(c.exception)}function j(a,d){var e="success";b.call([{methodname:"core_contentbank_rename_content",args:{contentid:a,name:d}}])[0].then(function(a){if(a){return"contentrenamed"}e="error";return"contentnotrenamed"}).then(function(b){var d=null;if("success"==e){d={id:a,statusmsg:b};window.location.href=f.relativeUrl("contentbank/view.php",d,!1)}else{c.addNotification({message:b,type:"error"});c.fetchNotifications()}}).catch(c.exception)}return{init:function init(){return new l}}});
//# sourceMappingURL=actions.min.js.map
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -176,10 +176,10 @@ function($, Ajax, Notification, Str, Templates, Url, ModalFactory, ModalEvents)
var requestType = 'success';
Ajax.call([request])[0].then(function(data) {
if (data.result) {
return Str.get_string('contentdeleted', 'core_contentbank');
return 'contentdeleted';
}
requestType = 'error';
return Str.get_string('contentnotdeleted', 'core_contentbank');
return 'contentnotdeleted';
}).done(function(message) {
var params = {
@@ -212,10 +212,10 @@ function($, Ajax, Notification, Str, Templates, Url, ModalFactory, ModalEvents)
var requestType = 'success';
Ajax.call([request])[0].then(function(data) {
if (data) {
return Str.get_string('contentrenamed', 'core_contentbank');
return 'contentrenamed';
}
requestType = 'error';
return Str.get_string('contentnotrenamed', 'core_contentbank');
return 'contentnotrenamed';
}).then(function(message) {
var params = null;
+2 -2
View File
@@ -59,7 +59,7 @@ abstract class content {
if (!class_exists($typeclass)) {
throw new coding_exception(get_string('contenttypenotfound', 'error', $record->contenttype));
}
// A record with the id must exist in 'contenbank_content' table.
// A record with the id must exist in 'contentbank_content' table.
// To improve performance, we are only checking the id is set, but no querying the database.
if (!isset($record->id)) {
throw new coding_exception(get_string('invalidcontentid', 'error'));
@@ -103,7 +103,7 @@ abstract class content {
public function update_content(): bool {
global $USER, $DB;
// A record with the id must exist in 'contenbank_content' table.
// A record with the id must exist in 'contentbank_content' table.
// To improve performance, we are only checking the id is set, but no querying the database.
if (!isset($this->content->id)) {
throw new coding_exception(get_string('invalidcontentid', 'error'));
+7 -5
View File
@@ -32,8 +32,8 @@ $context = context::instance_by_id($contextid, MUST_EXIST);
require_capability('moodle/contentbank:access', $context);
$statusmsg = optional_param('statusmsg', '', PARAM_RAW);
$errormsg = optional_param('errormsg', '', PARAM_RAW);
$statusmsg = optional_param('statusmsg', '', PARAM_ALPHANUMEXT);
$errormsg = optional_param('errormsg', '', PARAM_ALPHANUMEXT);
$title = get_string('contentbank');
\core_contentbank\helper::get_page_ready($context, $title);
@@ -44,7 +44,7 @@ $PAGE->set_url('/contentbank/index.php');
$PAGE->set_context($context);
$PAGE->set_title($title);
$PAGE->set_heading($title);
$PAGE->set_pagetype('contenbank');
$PAGE->set_pagetype('contentbank');
// Get all contents managed by active plugins where the user has permission to render them.
$cb = new \core_contentbank\contentbank();
@@ -98,9 +98,11 @@ echo $OUTPUT->header();
echo $OUTPUT->box_start('generalbox');
// If needed, display notifications.
if ($errormsg !== '') {
if ($errormsg !== '' && get_string_manager()->string_exists($errormsg, 'core_contentbank')) {
$errormsg = get_string($errormsg, 'core_contentbank');
echo $OUTPUT->notification($errormsg);
} else if ($statusmsg !== '') {
} else if ($statusmsg !== '' && get_string_manager()->string_exists($statusmsg, 'core_contentbank')) {
$statusmsg = get_string($statusmsg, 'core_contentbank');
echo $OUTPUT->notification($statusmsg, 'notifysuccess');
}
+1 -1
View File
@@ -44,7 +44,7 @@ $PAGE->set_context($context);
$PAGE->navbar->add(get_string('upload', 'contentbank'));
$PAGE->set_title($title);
$PAGE->set_heading($title);
$PAGE->set_pagetype('contenbank');
$PAGE->set_pagetype('contentbank');
$maxbytes = $CFG->userquota;
$maxareabytes = $CFG->userquota;
+7 -5
View File
@@ -35,8 +35,8 @@ $record = $DB->get_record('contentbank_content', ['id' => $id], '*', MUST_EXIST)
$context = context::instance_by_id($record->contextid, MUST_EXIST);
require_capability('moodle/contentbank:access', $context);
$statusmsg = optional_param('statusmsg', '', PARAM_RAW);
$errormsg = optional_param('errormsg', '', PARAM_RAW);
$statusmsg = optional_param('statusmsg', '', PARAM_ALPHANUMEXT);
$errormsg = optional_param('errormsg', '', PARAM_ALPHANUMEXT);
$returnurl = new \moodle_url('/contentbank/index.php', ['contextid' => $context->id]);
$plugin = core_plugin_manager::instance()->get_plugin_info($record->contenttype);
@@ -56,7 +56,7 @@ $PAGE->navbar->add($record->name);
$PAGE->set_heading($record->name);
$title .= ": ".$record->name;
$PAGE->set_title($title);
$PAGE->set_pagetype('contenbank');
$PAGE->set_pagetype('contentbank');
$contenttypeclass = "\\$record->contenttype\\contenttype";
$contentclass = "\\$record->contenttype\\content";
@@ -111,9 +111,11 @@ $PAGE->add_header_action(html_writer::div(
echo $OUTPUT->header();
// If needed, display notifications.
if ($errormsg !== '') {
if ($errormsg !== '' && get_string_manager()->string_exists($errormsg, 'core_contentbank')) {
$errormsg = get_string($errormsg, 'core_contentbank');
echo $OUTPUT->notification($errormsg);
} else if ($statusmsg !== '') {
} else if ($statusmsg !== '' && get_string_manager()->string_exists($statusmsg, 'core_contentbank')) {
$statusmsg = get_string($statusmsg, 'core_contentbank');
echo $OUTPUT->notification($statusmsg, 'notifysuccess');
}
if ($contenttype->can_access()) {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -3
View File
@@ -136,7 +136,7 @@ const registerListenerEvents = (courseId, chooserConfig) => {
const data = await fetchModuleData();
// Apply the section id to all the module instance links.
const builtModuleData = sectionIdMapper(data, caller.dataset.sectionid);
const builtModuleData = sectionIdMapper(data, caller.dataset.sectionid, caller.dataset.sectionreturnid);
ChooserDialogue.displayChooser(
sectionModal,
@@ -161,13 +161,14 @@ const registerListenerEvents = (courseId, chooserConfig) => {
* @method sectionIdMapper
* @param {Object} webServiceData Our original data from the Web service call
* @param {Number} id The ID of the section we need to append to the links
* @param {Number|null} sectionreturnid The ID of the section return we need to append to the links
* @return {Array} [modules] with URL's built
*/
const sectionIdMapper = (webServiceData, id) => {
const sectionIdMapper = (webServiceData, id, sectionreturnid) => {
// We need to take a fresh deep copy of the original data as an object is a reference type.
const newData = JSON.parse(JSON.stringify(webServiceData));
newData.content_items.forEach((module) => {
module.link += '&section=' + id;
module.link += '&section=' + id + '&sr=' + (sectionreturnid ?? 0);
});
return newData.content_items;
};
+2 -1
View File
@@ -203,7 +203,8 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
'class' => 'section main clearfix'.$sectionstyle,
'role' => 'region',
'aria-labelledby' => "sectionid-{$section->id}-title",
'data-sectionid' => $section->section
'data-sectionid' => $section->section,
'data-sectionreturnid' => $sectionreturn
]);
$leftcontent = $this->section_left_content($section, $course, $onsectionpage);
+3
View File
@@ -45,5 +45,8 @@ function xmldb_format_topics_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_format_weeks_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1
View File
@@ -376,6 +376,7 @@ class core_course_renderer extends plugin_renderer_base {
'class' => 'section-modchooser-link btn btn-link',
'data-action' => 'open-chooser',
'data-sectionid' => $section,
'data-sectionreturnid' => $sectionreturn,
]
);
$ajaxcontrol .= html_writer::end_tag('div');
@@ -38,6 +38,29 @@ Feature: Course paged mode
| topics | "Topic 1" | "Topic 2" | "Topic 3" | "Topic 0" | "Topic 4" |
| weeks | "1 January - 7 January" | "8 January - 14 January" | "15 January - 21 January" | "25 December - 31 December" | "22 January - 28 January" |
@javascript
Scenario Outline: Paged section redirect after creating an activity
Given the following "courses" exist:
| fullname | shortname | category | format | coursedisplay | numsections | startdate |
| Course 1 | C1 | 0 | <courseformat> | 1 | 3 | 0 |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I click on <section1> "link" in the <section1> "section"
And I should see <section1> in the "div.single-section" "css_element"
And I should see <section2> in the ".single-section span.mdl-right" "css_element"
And I should not see <prevunexistingsection> in the ".single-section" "css_element"
When I add a "Chat" to section "1" and I fill the form with:
| Name of this chat room | Chat room |
| Description | Chat description |
Then I should see <section1> in the "div.single-section" "css_element"
And I should see <section2> in the ".single-section span.mdl-right" "css_element"
And I should not see <prevunexistingsection> in the ".single-section" "css_element"
Examples:
| courseformat | section1 | section2 | prevunexistingsection |
| topics | "Topic 1" | "Topic 2" | "Topic 0" |
| weeks | "1 January - 7 January" | "8 January - 14 January" | "25 December - 31 December" |
Scenario Outline: Weekly and topics course formats with Javascript disabled
Given the following "courses" exist:
| fullname | shortname | category | format | coursedisplay | numsections | startdate |
+3
View File
@@ -39,5 +39,8 @@ function xmldb_enrol_database_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -39,5 +39,8 @@ function xmldb_enrol_flatfile_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -39,5 +39,8 @@ function xmldb_enrol_guest_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_enrol_imsenterprise_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -32,7 +32,7 @@ $string['categoryseparator'] = 'Category separator character';
$string['categoryseparator_desc'] = 'Required when "Category idnumber" is enabled. Character to separate the category name and idnumber.';
$string['coursesettings'] = 'Course data options';
$string['createnewcategories'] = 'Create new (hidden) course categories if not found in Moodle';
$string['createnewcategories_desc'] = 'If the <org><orgunit> element is present in a course\'s incoming data, its content will be used to specify a category if the course is to be created from scratch. The plugin will NOT re-categorise existing courses.
$string['createnewcategories_desc'] = 'If the &lt;org&gt;&lt;orgunit&gt; element is present in a course\'s incoming data, its content will be used to specify a category if the course is to be created from scratch. The plugin will NOT re-categorise existing courses.
If no category exists with the desired name, then a hidden category will be created.';
$string['createnewcourses'] = 'Create new (hidden) courses if not found in Moodle';
+3
View File
@@ -51,5 +51,8 @@ function xmldb_enrol_lti_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+7
View File
@@ -100,6 +100,13 @@ switch ($action) {
if (empty($roleid)) {
$roleid = null;
} else {
if (!has_capability('moodle/role:assign', $context)) {
throw new enrol_ajax_exception('assignnotpermitted');
}
if (!array_key_exists($roleid, get_assignable_roles($context, ROLENAME_ALIAS, false))) {
throw new enrol_ajax_exception('invalidrole');
}
}
if (empty($startdate)) {
+3
View File
@@ -39,5 +39,8 @@ function xmldb_enrol_manual_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -39,5 +39,8 @@ function xmldb_enrol_mnet_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -138,5 +138,8 @@ function xmldb_enrol_paypal_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -39,5 +39,8 @@ function xmldb_enrol_self_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -57,5 +57,8 @@ function xmldb_filter_displayh5p_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2020031700, 'filter', 'displayh5p');
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -55,5 +55,8 @@ function xmldb_filter_mathjaxloader_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2020050401, 'filter', 'mathjaxloader');
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_filter_mediaplugin_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_filter_tex_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -49,5 +49,8 @@ function xmldb_gradingform_guide_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_gradingform_rubric_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -43,5 +43,8 @@ function xmldb_gradereport_history_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2019111801, 'gradereport', 'history');
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_gradereport_overview_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -41,5 +41,8 @@ function xmldb_gradereport_user_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -226,7 +226,7 @@ class behat_grade extends behat_base {
$inputxpath = "//input[@class='idnumber'][" .
"parent::li[@class='item'][text()='" . $gradeitem . "']" .
" | " .
"parent::li[@class='categoryitem' | @class='courseitem']" .
"parent::li[@class='categoryitem' or @class='courseitem']" .
"/parent::ul/parent::li[starts-with(text(),'" . $gradeitem . "')]" .
"]";
$this->execute('behat_forms::i_set_the_field_with_xpath_to', array($inputxpath, $idnumber));
+1 -2
View File
@@ -80,8 +80,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Sie haben das Paket <strong>{$a->packname} {$a->packversion}</strong> erfolgreich auf Ihrem Computer installiert.';
$string['welcomep30'] = 'Diese Version von <strong>{$a->installername}</strong> enthält folgende Anwendungen, mit denen Sie <strong>Moodle</strong> ausführen können:';
$string['welcomep40'] = 'Das Paket enthält: <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'Die Nutzung dieser Anwendungen ist lizenzrechtlich geprüft. Alle Anwendungen von <strong>{$a->installername}</strong> sind
<a href="http://www.opensource.org/docs/definition_plain.html"> Open Source </a> und unterliegen der <a href="http://www.gnu.org/copyleft/gpl.html"> GPL</a> Lizenz.';
$string['welcomep50'] = 'Die Verwendung aller Anwendungen in diesem Paket unterliegt den jeweiligen Lizenzen. Das vollständige Paket <strong>{$a->installername}</strong> ist <a href="https://www.opensource.org/docs/definition_plain.html">Open Source</a> und wird unter mit der Lizenz <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a> angeboten.';
$string['welcomep60'] = 'Die folgenden Webseiten führen Sie in einfachen Schritten durch die Installation von <strong>Moodle</strong> auf Ihrem Computer. Sie können die vorgeschlagenen Einstellungen übernehmen oder an eigene Bedürfnisse anpassen.';
$string['welcomep70'] = 'Klicken Sie auf die Taste \'Weiter\', um mit der Installation von Moodle fortzufahren.';
$string['wwwroot'] = 'Webadresse';

Some files were not shown because too many files have changed in this diff Show More