Compare commits
306 Commits
v3.2.0-rc4
...
v3.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 07f6358b03 | |||
| 7ffb98d0f5 | |||
| dda99bb3f2 | |||
| 9cff26295b | |||
| 5865a6875b | |||
| ef2eed1b3c | |||
| 6601017d02 | |||
| 7ed6f330c6 | |||
| 418d01aaf4 | |||
| 11f9ff55e1 | |||
| 04d4796089 | |||
| e889aee562 | |||
| 228157ebf5 | |||
| c77ae4e017 | |||
| 1da3022e50 | |||
| f6507b8e35 | |||
| d52b937932 | |||
| ce36e3626f | |||
| 063f7c198b | |||
| 83dedbcd33 | |||
| 0ad466926d | |||
| ced9a33352 | |||
| 3b4fba5588 | |||
| 9cc9dabf17 | |||
| cb8be0b6b8 | |||
| c6bd4c1a45 | |||
| 31e4c05002 | |||
| c5f11c0f3c | |||
| 6158379f75 | |||
| bc076bf1b8 | |||
| 27a3a42efd | |||
| b0c2ea4640 | |||
| 00ef7b1caa | |||
| 7914b0035f | |||
| cb358279b7 | |||
| 339edb47e2 | |||
| bd6bc508df | |||
| c53194f3f9 | |||
| c477dc23c0 | |||
| 8cd421e941 | |||
| f18c2a9d15 | |||
| 403e0d96e5 | |||
| 5984ffded4 | |||
| cd9a925e6a | |||
| 40471ed54c | |||
| 000b0949e6 | |||
| 6c7f60dbc0 | |||
| 3b37e372f2 | |||
| 44b94d9324 | |||
| e5bc84f84f | |||
| a38d0650d4 | |||
| 8d9edc0e7c | |||
| 4e0357c1e3 | |||
| 9efd73abec | |||
| c31b5bbf9d | |||
| 7606ba2133 | |||
| 51b7f8f0a4 | |||
| 40fdf0f84f | |||
| 3e99f4f642 | |||
| 324e613b48 | |||
| 502397dcbc | |||
| f1f83c3ba1 | |||
| 2c3f09ccf7 | |||
| e2f5592b8f | |||
| 522fcf2ffc | |||
| 96e743ff78 | |||
| e514ae345e | |||
| 2659b808ab | |||
| 54037cf3e2 | |||
| b0773d70c6 | |||
| 4348fffe0c | |||
| 216c68b834 | |||
| a3c1bd86ed | |||
| e0006399ff | |||
| 2084c59b82 | |||
| a09a9879e5 | |||
| a3a095b6eb | |||
| 0edf724367 | |||
| a953ac5942 | |||
| 5627b0b1a1 | |||
| 5d3a7be453 | |||
| 8f27fdf1ab | |||
| 1d5c2c6560 | |||
| 18317c7c1c | |||
| b83fd5b1fe | |||
| 11eeb2e347 | |||
| 0aa8b11f5c | |||
| 829cafc050 | |||
| 25474b5e84 | |||
| b7f902b5b3 | |||
| 11488775eb | |||
| 32ec7e3d30 | |||
| 1a1eef4345 | |||
| 4942dfc7cd | |||
| d469fb2181 | |||
| 0213ce081c | |||
| 70b6a6618a | |||
| 089cf944f3 | |||
| 68d9adcba8 | |||
| 32636d1757 | |||
| 48ff43d3bd | |||
| 725863abe4 | |||
| 9de4bbf8a8 | |||
| cd7ca81fdd | |||
| 1ca30f2503 | |||
| c47a9439d3 | |||
| 2ce5b1d637 | |||
| c4ade76ee5 | |||
| 62fc665ff6 | |||
| 263865899e | |||
| f927f3e196 | |||
| 70f5e9ba61 | |||
| 3b7bf2cee0 | |||
| a57a9053d7 | |||
| 0292245755 | |||
| dd7aa695b2 | |||
| 2626dce64c | |||
| 7e2e135943 | |||
| cc15b9d46f | |||
| ce47bacfe9 | |||
| 7c89091995 | |||
| 7766ffc618 | |||
| 75efa0860c | |||
| d31412392c | |||
| da694c75ff | |||
| 76f5d7b9ab | |||
| e7d8926583 | |||
| c87f1ac4c7 | |||
| 75c4f5b0ca | |||
| f7b3774380 | |||
| 78293c74bf | |||
| 406fc019c1 | |||
| 903cd37434 | |||
| 6fd8b0098a | |||
| 34954a6050 | |||
| 949d8ae04e | |||
| 1c7cbed23c | |||
| 9156498826 | |||
| 71adc9a9a3 | |||
| 49612b733f | |||
| bc0721c7d9 | |||
| c5452484ee | |||
| 74eecb6078 | |||
| 725be51c11 | |||
| d0d8a7f984 | |||
| 4a50811ae3 | |||
| b82ddcbcac | |||
| 6e4cc6caf4 | |||
| fe8e9b1b4e | |||
| 72770e9a60 | |||
| a847efc70b | |||
| 9e99327888 | |||
| 9973eebb91 | |||
| a162f636d8 | |||
| 8ff8d598fe | |||
| 8704d2e5fc | |||
| f9dd21a17a | |||
| eb349bdfc4 | |||
| 89d186af72 | |||
| 65de977483 | |||
| e167481759 | |||
| 457c913461 | |||
| 422449dca8 | |||
| 53c8f0ca3c | |||
| b094b88a9a | |||
| 49e5d04a8d | |||
| 38e28dfbcd | |||
| 44047dc78d | |||
| c06b8145b1 | |||
| 79da2c5bfa | |||
| a5800adaf0 | |||
| c1c3f50965 | |||
| cff14cf0d1 | |||
| c95ea731bc | |||
| b98f14632b | |||
| a1e1b45ae7 | |||
| 2d44bb544b | |||
| c60d333578 | |||
| 182690b018 | |||
| b36b54179d | |||
| fc4b768e25 | |||
| 7e0f1972f1 | |||
| 93e64c823c | |||
| 20d598f094 | |||
| e376549179 | |||
| 163a317bcc | |||
| 7ecf13ac1d | |||
| 2fbe4fca87 | |||
| d07a8ebd7e | |||
| d4feb70e17 | |||
| f477809e38 | |||
| 94caed45db | |||
| 8c4fdb1073 | |||
| e5bbe44230 | |||
| d0a58fe035 | |||
| 9c68157292 | |||
| 44f71599df | |||
| 1fac7b914b | |||
| cede73411f | |||
| 47deb83b5c | |||
| 4ea56c1c80 | |||
| 311121b16c | |||
| 5863f1b073 | |||
| 2bb195f64f | |||
| f6b50d9901 | |||
| a0b0234a18 | |||
| f8b8a363ae | |||
| b197272987 | |||
| e4976aefc5 | |||
| dcd408b81f | |||
| 4a564ca40b | |||
| 5da06d632a | |||
| d797e57255 | |||
| 55d2042f0a | |||
| 8cd6972966 | |||
| 9cbc0a0cdb | |||
| 931d12b589 | |||
| 0beeb95a8a | |||
| 617f8bb911 | |||
| 75dd21a002 | |||
| a0c13477ab | |||
| b182239f21 | |||
| 9c46f5c6fb | |||
| 1b00e27281 | |||
| 6a6b1bd782 | |||
| 65cc788bb1 | |||
| 54348ea6d7 | |||
| 72edf2ef13 | |||
| 43b3cf0f25 | |||
| dadbe55c81 | |||
| 1acd568793 | |||
| 7fc7486f49 | |||
| ec3e79134f | |||
| 34949c1a55 | |||
| b9278260c7 | |||
| 1459415f93 | |||
| 76e337ab96 | |||
| 80ee8a3eb0 | |||
| 9d1402abd8 | |||
| 666b9fcb6a | |||
| ddcb68b284 | |||
| 5f654ea2c0 | |||
| d8326d8364 | |||
| f200f74552 | |||
| 6c45e525fc | |||
| 063d5c28cf | |||
| a8bac97613 | |||
| 2b114798b9 | |||
| 53cbfac2b9 | |||
| b52c562a8c | |||
| 36e6789b27 | |||
| 39a9ac4098 | |||
| 7d17256a75 | |||
| 8f5de6f268 | |||
| 1f16e4e68e | |||
| 995c6d2787 | |||
| bb8b3ba6f8 | |||
| 04bfccdce6 | |||
| 3cc12bd747 | |||
| e7d0de87c9 | |||
| ef06bc18b0 | |||
| 52ee200368 | |||
| 10df630ee8 | |||
| 3eb3d916cb | |||
| bb316e0764 | |||
| 5544189dd1 | |||
| 09ade73632 | |||
| ce7149b10c | |||
| 5814817ceb | |||
| a9b85245f2 | |||
| 10461a04c6 | |||
| 9a22c99ea9 | |||
| b95107ca83 | |||
| 432ed35484 | |||
| f4aec377fc | |||
| 99d2667f5c | |||
| a57699ead8 | |||
| f6f0cb49aa | |||
| 061a39ac5d | |||
| 3f342da584 | |||
| 4495ddcf9f | |||
| 45cd101f80 | |||
| c5a5f26ce2 | |||
| 7c0725857a | |||
| 70f0e8353d | |||
| 8c291fb06e | |||
| 449b730e09 | |||
| 8018dc63c7 | |||
| 8ace7b6c34 | |||
| 3f083d9a33 | |||
| 04649747a4 | |||
| eb80018202 | |||
| f3317a0eac | |||
| c22141bd0c | |||
| 6f19da0549 | |||
| 7d94f001e2 | |||
| e37c128686 | |||
| a174f2474f | |||
| 5634310997 | |||
| d91cbe1e62 | |||
| 8599ac9e56 | |||
| 5e45c34221 | |||
| 67823776a0 | |||
| 4a8c6b4259 | |||
| 3d1be67752 | |||
| 3d8fbf39f7 |
+8
-10
@@ -13,7 +13,7 @@ language: php
|
||||
|
||||
php:
|
||||
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 5.6
|
||||
|
||||
services:
|
||||
@@ -23,7 +23,7 @@ env:
|
||||
# Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
|
||||
# start first so that the total run time is not too high.
|
||||
#
|
||||
# We only run MySQL on PHP 7.0, so run that first.
|
||||
# We only run MySQL on PHP 7.1, so run that first.
|
||||
# CI Tests should be second-highest in priority as these only take <= 60 seconds to run under normal circumstances.
|
||||
# Postgres is significantly is pretty reasonable in its run-time.
|
||||
|
||||
@@ -47,22 +47,22 @@ matrix:
|
||||
|
||||
include:
|
||||
# Run grunt/npm install on lowest supported npm version
|
||||
- php: 7
|
||||
- php: 7.1
|
||||
env: DB=none TASK=GRUNT NVM_VERSION='4'
|
||||
# Run grunt/npm install on highest version ('node' is an alias for the latest node.js version.)
|
||||
- php: 7
|
||||
- php: 7.1
|
||||
env: DB=none TASK=GRUNT NVM_VERSION='node'
|
||||
|
||||
exclude:
|
||||
# MySQL - it's just too slow.
|
||||
# Exclude it on all versions except for 7.0
|
||||
# Exclude it on all versions except for 7.1
|
||||
|
||||
- env: DB=mysqli TASK=PHPUNIT
|
||||
php: 5.6
|
||||
|
||||
# Moodle 2.7 is not compatible with PHP 7 for the upgrade test.
|
||||
- env: DB=pgsql TASK=UPGRADE
|
||||
php: 7.0
|
||||
php: 7.1
|
||||
|
||||
cache:
|
||||
directories:
|
||||
@@ -70,9 +70,6 @@ cache:
|
||||
- $HOME/.npm
|
||||
|
||||
install:
|
||||
# Disable xdebug. We aren't generating code coverage, and it has a huge impact upon test performance.
|
||||
- rm /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
|
||||
|
||||
- >
|
||||
if [ "$TASK" = 'PHPUNIT' ];
|
||||
then
|
||||
@@ -99,6 +96,7 @@ install:
|
||||
fi
|
||||
|
||||
before_script:
|
||||
- phpenv config-rm xdebug.ini
|
||||
- >
|
||||
if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' ];
|
||||
then
|
||||
@@ -184,7 +182,7 @@ before_script:
|
||||
# We need the official upstream for comparison
|
||||
git remote add upstream https://github.com/moodle/moodle.git;
|
||||
|
||||
git fetch upstream master;
|
||||
git fetch upstream MOODLE_32_STABLE;
|
||||
export GIT_PREVIOUS_COMMIT="`git merge-base FETCH_HEAD $TRAVIS_COMMIT`";
|
||||
export GIT_COMMIT="$TRAVIS_COMMIT";
|
||||
export UPSTREAM_FETCH_HEAD=`git rev-parse FETCH_HEAD`
|
||||
|
||||
+7
-22
@@ -4,6 +4,7 @@
|
||||
|
||||
require_once('../config.php');
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
require_once($CFG->libdir.'/blocklib.php');
|
||||
require_once($CFG->libdir.'/tablelib.php');
|
||||
|
||||
admin_externalpage_setup('manageblocks');
|
||||
@@ -36,6 +37,7 @@
|
||||
print_error('blockdoesnotexist', 'error');
|
||||
}
|
||||
$DB->set_field('block', 'visible', '0', array('id'=>$block->id)); // Hide block
|
||||
add_to_config_log('block_visibility', $block->visible, '0', $block->name);
|
||||
core_plugin_manager::reset_caches();
|
||||
admin_get_root(true, false); // settings not required - only pages
|
||||
}
|
||||
@@ -45,40 +47,23 @@
|
||||
print_error('blockdoesnotexist', 'error');
|
||||
}
|
||||
$DB->set_field('block', 'visible', '1', array('id'=>$block->id)); // Show block
|
||||
add_to_config_log('block_visibility', $block->visible, '1', $block->name);
|
||||
core_plugin_manager::reset_caches();
|
||||
admin_get_root(true, false); // settings not required - only pages
|
||||
}
|
||||
|
||||
if (!isset($CFG->undeletableblocktypes) || (!is_array($CFG->undeletableblocktypes) && !is_string($CFG->undeletableblocktypes))) {
|
||||
$undeletableblocktypes = array('navigation', 'settings');
|
||||
} else if (is_string($CFG->undeletableblocktypes)) {
|
||||
$undeletableblocktypes = explode(',', $CFG->undeletableblocktypes);
|
||||
} else {
|
||||
$undeletableblocktypes = $CFG->undeletableblocktypes;
|
||||
}
|
||||
|
||||
if (!empty($protect) && confirm_sesskey()) {
|
||||
if (!$block = $DB->get_record('block', array('id'=>$protect))) {
|
||||
print_error('blockdoesnotexist', 'error');
|
||||
}
|
||||
if (!in_array($block->name, $undeletableblocktypes)) {
|
||||
$undeletableblocktypes[] = $block->name;
|
||||
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
|
||||
}
|
||||
block_manager::protect_block((int)$protect);
|
||||
admin_get_root(true, false); // settings not required - only pages
|
||||
}
|
||||
|
||||
if (!empty($unprotect) && confirm_sesskey()) {
|
||||
if (!$block = $DB->get_record('block', array('id'=>$unprotect))) {
|
||||
print_error('blockdoesnotexist', 'error');
|
||||
}
|
||||
if (in_array($block->name, $undeletableblocktypes)) {
|
||||
$undeletableblocktypes = array_diff($undeletableblocktypes, array($block->name));
|
||||
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
|
||||
}
|
||||
block_manager::unprotect_block((int)$unprotect);
|
||||
admin_get_root(true, false); // settings not required - only pages
|
||||
}
|
||||
|
||||
$undeletableblocktypes = block_manager::get_undeletable_block_types();
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($strmanageblocks);
|
||||
|
||||
|
||||
@@ -1868,11 +1868,6 @@
|
||||
<ON_CHECK message="unoconvwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_tls_libraries" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tlswarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="libcurlwarning" />
|
||||
|
||||
+10
-3
@@ -1899,14 +1899,21 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
} else {
|
||||
$report = $this->doc_link(join($linkparts, '/'), get_string($stringtouse, 'admin', $rec));
|
||||
}
|
||||
// Enclose report text in div so feedback text will be displayed underneath it.
|
||||
$report = html_writer::div($report);
|
||||
|
||||
// Format error or warning line
|
||||
if ($errorline || $warningline) {
|
||||
$messagetype = $errorline? 'error':'warn';
|
||||
if ($errorline) {
|
||||
$messagetype = 'error';
|
||||
$statusclass = 'label-important';
|
||||
} else if ($warningline) {
|
||||
$messagetype = 'warn';
|
||||
$statusclass = 'label-warning';
|
||||
} else {
|
||||
$messagetype = 'ok';
|
||||
$statusclass = 'label-success';
|
||||
}
|
||||
$status = '<span class="'.$messagetype.'">'.$status.'</span>';
|
||||
$status = html_writer::span($status, 'label ' . $statusclass);
|
||||
// Here we'll store all the feedback found
|
||||
$feedbacktext = '';
|
||||
// Append the feedback if there is some
|
||||
|
||||
@@ -29,9 +29,9 @@ if ($primaryadmin) {
|
||||
$primaryadminname = NULL;
|
||||
}
|
||||
$temp->add(new admin_setting_configtext('supportname', new lang_string('supportname', 'admin'),
|
||||
new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
|
||||
new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
|
||||
$setting = new admin_setting_configtext('supportemail', new lang_string('supportemail', 'admin'),
|
||||
new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_NOTAGS);
|
||||
new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_EMAIL);
|
||||
$setting->set_force_ltr(true);
|
||||
$temp->add($setting);
|
||||
$temp->add(new admin_setting_configtext('supportpage', new lang_string('supportpage', 'admin'), new lang_string('configsupportpage', 'admin'), '', PARAM_URL));
|
||||
@@ -237,7 +237,7 @@ $temp->add(new admin_setting_configtext('smtpmaxbulk', new lang_string('smtpmaxb
|
||||
$temp->add(new admin_setting_heading('noreplydomainheading', new lang_string('noreplydomain', 'admin'),
|
||||
new lang_string('noreplydomaindetail', 'admin')));
|
||||
$temp->add(new admin_setting_configtext('noreplyaddress', new lang_string('noreplyaddress', 'admin'),
|
||||
new lang_string('confignoreplyaddress', 'admin'), 'noreply@' . get_host_from_url($CFG->wwwroot), PARAM_NOTAGS));
|
||||
new lang_string('confignoreplyaddress', 'admin'), 'noreply@' . get_host_from_url($CFG->wwwroot), PARAM_EMAIL));
|
||||
$temp->add(new admin_setting_configtextarea('allowedemaildomains',
|
||||
new lang_string('allowedemaildomains', 'admin'),
|
||||
new lang_string('configallowedemaildomains', 'admin'),
|
||||
|
||||
@@ -16,8 +16,7 @@ Feature: Display extended course names
|
||||
And I should not see "C_shortname Course fullname"
|
||||
|
||||
Scenario: Courses list with extended course names
|
||||
Given I expand "Site administration" node
|
||||
And I click on "Courses" "link" in the "//div[@id='settingsnav']/descendant::li[contains(concat(' ', normalize-space(@class), ' '), ' type_setting ')][contains(., 'Appearance')]" "xpath_element"
|
||||
Given I navigate to "Appearance > Courses" in site administration
|
||||
And I set the field "Display extended course names" to "1"
|
||||
When I press "Save changes"
|
||||
And I am on site homepage
|
||||
|
||||
@@ -25,7 +25,7 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
|
||||
And I log in as "admin"
|
||||
And I add "User Two (two@example.com)" user to "CH1" cohort members
|
||||
And I add "User Three (three@example.com)" user to "CH1" cohort members
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
|
||||
Scenario: Filter user accounts by role and cohort
|
||||
When I set the following fields to these values:
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300;
|
||||
$plugin->requires = 2016051900;
|
||||
$plugin->version = 2016120500;
|
||||
$plugin->requires = 2016112900;
|
||||
$plugin->component = 'tool_assignmentupgrade';
|
||||
$plugin->dependencies = array('mod_assign' => 2016051900);
|
||||
$plugin->dependencies = array('mod_assign' => 2016112900);
|
||||
|
||||
@@ -8,6 +8,8 @@ Feature: Manage availability conditions
|
||||
Scenario: Display list of availability conditions
|
||||
# Check the report doesn't show when not enabled.
|
||||
Given I log in as "admin"
|
||||
And I press "Customise this page"
|
||||
And I add the "Administration" block if not present
|
||||
And the following config values are set as admin:
|
||||
| enableavailability | 0 |
|
||||
And I expand "Site administration" node
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300;
|
||||
$plugin->requires = 2016051900;
|
||||
$plugin->version = 2016120500;
|
||||
$plugin->requires = 2016112900;
|
||||
$plugin->component = 'tool_availabilityconditions';
|
||||
|
||||
@@ -59,8 +59,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
Then I should see "Group 1"
|
||||
And I should see "Group 2"
|
||||
And I follow "Groupings"
|
||||
@@ -90,8 +89,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Permissions"
|
||||
And I navigate to "Users > Permissions" in current page administration
|
||||
And I set the field "Advanced role override" to "Student (1)"
|
||||
Then "mod/forum:editanypost" capability has "Allow" permission
|
||||
And I press "Cancel"
|
||||
@@ -134,30 +132,31 @@ Feature: Set up contextual data for tests
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| user4 | C1 | custom1 |
|
||||
| user2 | C1 | student |
|
||||
| user3 | C1 | editingteacher |
|
||||
And the following "role assigns" exist:
|
||||
| user | role | contextlevel | reference |
|
||||
| user1 | manager | System | |
|
||||
| user2 | editingteacher | Category | CAT1 |
|
||||
| user3 | editingteacher | Course | C1 |
|
||||
| user5 | custom2 | System | |
|
||||
When I log in as "user1"
|
||||
And I am on site homepage
|
||||
Then I should see "Front page settings"
|
||||
Then "Edit settings" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user2"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I should see "Turn editing on"
|
||||
And "Turn editing on" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user3"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I should see "Turn editing on"
|
||||
And "Turn editing on" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user4"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I should see "Turn editing on"
|
||||
And "Turn editing on" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user5"
|
||||
And I should see "You are logged in as"
|
||||
@@ -264,8 +263,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
Then the "groups" select box should contain "Group 1 (1)"
|
||||
And the "groups" select box should contain "Group 2 (1)"
|
||||
And I set the field "groups" to "Group 1 (1)"
|
||||
@@ -302,7 +300,7 @@ Feature: Set up contextual data for tests
|
||||
| System cohort A | 1 |
|
||||
| System cohort B | 2 |
|
||||
And I should not see "Cohort in category"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Cat 1"
|
||||
And I follow "Cohorts"
|
||||
And I should not see "System cohort"
|
||||
@@ -322,10 +320,9 @@ Feature: Set up contextual data for tests
|
||||
| fullname | course | gradecategory |
|
||||
| Grade sub category 2 | C1 | Grade category 1 |
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
Then I should see "Grade category 1"
|
||||
And I should see "Grade sub category 2"
|
||||
|
||||
@@ -349,7 +346,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I navigate to "Setup > Gradebook setup" in the course gradebook
|
||||
Then I should see "Test Grade Item 1"
|
||||
And I follow "Edit Test Grade Item 1"
|
||||
And I expand all fieldsets
|
||||
@@ -378,7 +375,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I navigate to "Scales" in the course gradebook
|
||||
Then I should see "Test Scale 1"
|
||||
And I should see "Disappointing, Good, Very good, Excellent"
|
||||
|
||||
@@ -429,7 +426,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I navigate to "Setup > Gradebook setup" in the course gradebook
|
||||
Then I should see "Test Outcome Grade Item 1"
|
||||
And I follow "Edit Test Outcome Grade Item 1"
|
||||
And the field "Outcome" matches value "Grade outcome 1"
|
||||
|
||||
@@ -32,8 +32,7 @@ Feature: Edit capabilities
|
||||
Scenario: Course capabilities overrides
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Permissions"
|
||||
And I navigate to "Users > Permissions" in current page administration
|
||||
And I override the system permissions of "Student" role with:
|
||||
| mod/forum:deleteanypost | Prohibit |
|
||||
| mod/forum:editanypost | Prevent |
|
||||
@@ -52,7 +51,7 @@ Feature: Edit capabilities
|
||||
| Forum name | I'm the name |
|
||||
| Description | I'm the introduction |
|
||||
And I follow "I'm the name"
|
||||
And I navigate to "Permissions" node in "Forum administration"
|
||||
And I navigate to "Permissions" in current page administration
|
||||
And I override the system permissions of "Student" role with:
|
||||
| mod/forum:deleteanypost | Prohibit |
|
||||
| mod/forum:editanypost | Prevent |
|
||||
|
||||
@@ -33,8 +33,6 @@ Feature: Verify that all form fields values can be get and set
|
||||
| activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible |
|
||||
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
|
||||
And I log in as "admin"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Appearance" node
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Reset" node in "Course administration"
|
||||
@@ -60,9 +58,8 @@ Feature: Verify that all form fields values can be get and set
|
||||
| HTML format | Student page contents |
|
||||
And I press "Save"
|
||||
Then I should see "Student page contents" in the "region-main" "region"
|
||||
And I click on "Edit" "link" in the "Administration" "block"
|
||||
# Select (multi-select) - Checking "I set the field".
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
# Checkbox - Checking "I set the field".
|
||||
And I set the field "Display description on course page" to "1"
|
||||
@@ -75,7 +72,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
And I press "Save and return to course"
|
||||
And I should see "Test this one"
|
||||
And I follow "Test this one"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
# Checkbox - Checking "the field matches value" and "the following fields match these values".
|
||||
And the following fields match these values:
|
||||
| Display description on course page | 1 |
|
||||
@@ -91,7 +88,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
# Select (simple) - Checking "I set the field".
|
||||
And I set the field "Group mode" to "Separate groups"
|
||||
And I press "Save and display"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And the following fields match these values:
|
||||
| Default format | NWiki |
|
||||
| Group mode | Separate groups |
|
||||
@@ -134,8 +131,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
@javascript
|
||||
Scenario: with JS enabled all form fields getters and setters works as expected
|
||||
Then I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
# Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain".
|
||||
And I set the field "groups" to "Group 2"
|
||||
And the "members" select box should contain "Student 2"
|
||||
@@ -158,7 +154,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
And the "available[day]" "field" should be enabled
|
||||
And the field "deadline[enabled]" matches value "1"
|
||||
And I press "Save and display"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And the field "available[enabled]" matches value "1"
|
||||
And the "available[day]" "field" should be enabled
|
||||
And the field "deadline[enabled]" matches value "1"
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_behat'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_capability'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_cohortroles'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
$plugin->dependencies = array(
|
||||
|
||||
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300;
|
||||
$plugin->requires = 2016051900;
|
||||
$plugin->version = 2016120500;
|
||||
$plugin->requires = 2016112900;
|
||||
$plugin->component = 'tool_customlang'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_dbtransfer'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300;
|
||||
$plugin->requires = 2016051900;
|
||||
$plugin->version = 2016120500;
|
||||
$plugin->requires = 2016112900;
|
||||
$plugin->component = 'tool_filetypes';
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300;
|
||||
$plugin->requires = 2016051900;
|
||||
$plugin->version = 2016120500;
|
||||
$plugin->requires = 2016112900;
|
||||
$plugin->component = 'tool_generator';
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_health'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
$plugin->maturity = MATURITY_ALPHA; // this version's maturity level
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_innodb'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'tool_installaddon';
|
||||
$plugin->version = 2016052300;
|
||||
$plugin->requires = 2016051900;
|
||||
$plugin->version = 2016120500;
|
||||
$plugin->requires = 2016112900;
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_langimport'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_tool_log_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,5 +39,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'logstore_database'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'logstore_legacy'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -56,5 +56,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'logstore_standard'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_log'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -7,12 +7,9 @@ Feature: Manage competency frameworks
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I expand "Site administration" node
|
||||
When I expand "Competencies" node
|
||||
Then I should see "Competency frameworks"
|
||||
|
||||
Scenario: Create a new framework
|
||||
Given I follow "Competency frameworks"
|
||||
Given I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "List of competency frameworks"
|
||||
And I click on "Add new competency framework" "button"
|
||||
And I should see "General"
|
||||
@@ -34,7 +31,7 @@ Feature: Manage competency frameworks
|
||||
Given the following lp "frameworks" exist:
|
||||
| shortname | idnumber |
|
||||
| Science Year-2 | sc-y-2 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-2"
|
||||
When I click on "Science Year-2" "link"
|
||||
Then I should see "Science Year-2"
|
||||
@@ -43,7 +40,7 @@ Feature: Manage competency frameworks
|
||||
Given the following lp "frameworks" exist:
|
||||
| shortname | idnumber |
|
||||
| Science Year-3 | sc-y-3 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-3"
|
||||
And I click on "Edit" of edit menu in the "Science Year-3" row
|
||||
And the field "Name" matches value "Science Year-3 "
|
||||
@@ -57,7 +54,7 @@ Feature: Manage competency frameworks
|
||||
Given the following lp "frameworks" exist:
|
||||
| shortname | idnumber |
|
||||
| Science Year-4 | sc-y-4 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-4"
|
||||
And I should see "sc-y-4"
|
||||
And I click on "Delete" of edit menu in the "Science Year-4" row
|
||||
@@ -90,7 +87,7 @@ Scenario: Edit a framework with competencies in user competency
|
||||
| user | competency |
|
||||
| admin | Comp1 |
|
||||
| admin | Comp2 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-5"
|
||||
And I click on "Edit" of edit menu in the "Science Year-5" row
|
||||
And the field "Name" matches value "Science Year-5 "
|
||||
@@ -120,7 +117,7 @@ Scenario: Edit a framework with competencies in user competency plan
|
||||
| user | competency | plan |
|
||||
| admin | Comp1 | Plan Science-6 |
|
||||
| admin | Comp2 | Plan Science-6 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-6"
|
||||
And I click on "Edit" of edit menu in the "Science Year-6" row
|
||||
And the field "Name" matches value "Science Year-6 "
|
||||
|
||||
@@ -26,9 +26,7 @@ Feature: Manage plearning plan
|
||||
| shortname | description |
|
||||
| Science template | science template description |
|
||||
And I follow "Home"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Competencies" node
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I click on ".template-userplans" "css_element" in the "Science template" "table_row"
|
||||
And I click on ".form-autocomplete-downarrow" "css_element"
|
||||
And I click on "Admin" item in the autocomplete list
|
||||
@@ -52,9 +50,7 @@ Feature: Manage plearning plan
|
||||
| student-plan1 | COHORTPLAN |
|
||||
| student-plan2 | COHORTPLAN |
|
||||
And I follow "Home"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Competencies" node
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I click on ".template-cohorts" "css_element" in the "Science template cohort" "table_row"
|
||||
And I click on ".form-autocomplete-downarrow" "css_element"
|
||||
And I click on "cohort plan" item in the autocomplete list
|
||||
|
||||
@@ -145,10 +145,7 @@ Feature: Manage plan workflow
|
||||
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
|
||||
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
|
||||
And I log in as "manager1"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Users" node
|
||||
And I expand "Accounts" node
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I follow "User 1"
|
||||
And I follow "Learning plans"
|
||||
And I should see "List of learning plans"
|
||||
@@ -167,10 +164,7 @@ Feature: Manage plan workflow
|
||||
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
|
||||
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
|
||||
And I log in as "manager1"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Users" node
|
||||
And I expand "Accounts" node
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I follow "User 1"
|
||||
And I follow "Learning plans"
|
||||
And I should see "List of learning plans"
|
||||
@@ -191,10 +185,7 @@ Scenario: Manager reopen a complete learning plan
|
||||
| Test-Plan3 | user1 | Description of plan 3 for user 1 | complete | manager1 |
|
||||
| Test-Plan4 | user1 | Description of plan 4 for user 1 | complete | manager1 |
|
||||
And I log in as "manager1"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Users" node
|
||||
And I expand "Accounts" node
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I follow "User 1"
|
||||
And I follow "Learning plans"
|
||||
And I should see "List of learning plans"
|
||||
|
||||
@@ -7,12 +7,9 @@ Feature: Manage plearning plan templates
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I expand "Site administration" node
|
||||
When I expand "Competencies" node
|
||||
Then I should see "Learning plan templates"
|
||||
|
||||
Scenario: Create a new learning plan template
|
||||
Given I follow "Learning plan templates"
|
||||
Given I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "List of learning plan templates"
|
||||
And I click on "Add new learning plan template" "button"
|
||||
And I should see "Add new learning plan template"
|
||||
@@ -26,7 +23,7 @@ Feature: Manage plearning plan templates
|
||||
Given the following lp "templates" exist:
|
||||
| shortname | description |
|
||||
| Science template Year-2 | science template description |
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "Science template Year-2"
|
||||
When I click on "Science template Year-2" "link"
|
||||
Then I should see "Science template Year-2"
|
||||
@@ -36,7 +33,7 @@ Feature: Manage plearning plan templates
|
||||
Given the following lp "templates" exist:
|
||||
| shortname | description |
|
||||
| Science template Year-3 | science template description |
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "Science template Year-3"
|
||||
And I click on "Edit" of edit menu in the "Science template Year-3" row
|
||||
And the field "Name" matches value "Science template Year-3"
|
||||
@@ -49,7 +46,7 @@ Feature: Manage plearning plan templates
|
||||
Given the following lp "templates" exist:
|
||||
| shortname | description |
|
||||
| Science template Year-4 | science template description |
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "Science template Year-4"
|
||||
And I click on "Delete" of edit menu in the "Science template Year-4" row
|
||||
And "Confirm" "dialogue" should be visible
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_lp'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -53,6 +53,10 @@ class framework_importer {
|
||||
protected $importer = null;
|
||||
protected $foundheaders = array();
|
||||
protected $scalecache = array();
|
||||
/** @var bool $useprogressbar Control whether importing should use progress bars or not. */
|
||||
protected $useprogressbar = false;
|
||||
/** @var \core\progress\display_if_slow|null $progress The progress bar instance. */
|
||||
protected $progress = null;
|
||||
|
||||
/**
|
||||
* Store an error message for display later
|
||||
@@ -164,8 +168,11 @@ class framework_importer {
|
||||
* @param string delimiter The specified delimiter for the file.
|
||||
* @param string importid The id of the csv import.
|
||||
* @param array mappingdata The mapping data from the import form.
|
||||
* @param bool $useprogressbar Whether progress bar should be displayed, to avoid html output on CLI.
|
||||
*/
|
||||
public function __construct($text = null, $encoding = null, $delimiter = null, $importid = 0, $mappingdata = null) {
|
||||
public function __construct($text = null, $encoding = null, $delimiter = null, $importid = 0, $mappingdata = null,
|
||||
$useprogressbar = false) {
|
||||
|
||||
global $CFG;
|
||||
|
||||
// The format of our records is:
|
||||
@@ -204,7 +211,7 @@ class framework_importer {
|
||||
}
|
||||
|
||||
$this->foundheaders = $this->importer->get_columns();
|
||||
|
||||
$this->useprogressbar = $useprogressbar;
|
||||
$domainid = 1;
|
||||
|
||||
$flat = array();
|
||||
@@ -264,8 +271,19 @@ class framework_importer {
|
||||
$this->fail(get_string('invalidimportfile', 'tool_lpimportcsv'));
|
||||
return;
|
||||
} else {
|
||||
// We are calling from browser, display progress bar.
|
||||
if ($this->useprogressbar === true) {
|
||||
$this->progress = new \core\progress\display_if_slow(get_string('processingfile', 'tool_lpimportcsv'));
|
||||
$this->progress->start_html();
|
||||
} else {
|
||||
// Avoid html output on CLI scripts.
|
||||
$this->progress = new \core\progress\none();
|
||||
}
|
||||
$this->progress->start_progress('', count($this->flat));
|
||||
// Build a tree from this flat list.
|
||||
raise_memory_limit(MEMORY_EXTRA);
|
||||
$this->add_children($this->framework, '');
|
||||
$this->progress->end_progress();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,6 +296,7 @@ class framework_importer {
|
||||
public function add_children(& $node, $parentidnumber) {
|
||||
foreach ($this->flat as $competency) {
|
||||
if ($competency->parentidnumber == $parentidnumber) {
|
||||
$this->progress->increment_progress();
|
||||
$node->children[] = $competency;
|
||||
$this->add_children($competency, $competency->idnumber);
|
||||
}
|
||||
@@ -443,17 +462,28 @@ class framework_importer {
|
||||
$record->contextid = context_system::instance()->id;
|
||||
|
||||
$framework = api::create_framework($record);
|
||||
if ($this->useprogressbar === true) {
|
||||
$this->progress = new \core\progress\display_if_slow(get_string('importingfile', 'tool_lpimportcsv'));
|
||||
$this->progress->start_html();
|
||||
} else {
|
||||
$this->progress = new \core\progress\none();
|
||||
}
|
||||
|
||||
$this->progress->start_progress('', (count($this->framework->children) * 2));
|
||||
raise_memory_limit(MEMORY_EXTRA);
|
||||
// Now all the children.
|
||||
foreach ($this->framework->children as $comp) {
|
||||
$this->progress->increment_progress();
|
||||
$this->create_competency($comp, null, $framework);
|
||||
}
|
||||
|
||||
// Now create the rules.
|
||||
foreach ($this->framework->children as $record) {
|
||||
$this->progress->increment_progress();
|
||||
$this->set_rules($record);
|
||||
$this->set_related($record);
|
||||
}
|
||||
$this->progress->end_progress();
|
||||
|
||||
$this->importer->cleanup();
|
||||
return $framework;
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Page to continue after an action.
|
||||
*
|
||||
* @package tool_lpimportcsv
|
||||
* @copyright 2015 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
require_once(__DIR__ . '/../../../config.php');
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
|
||||
$pagetitle = get_string('pluginname', 'tool_lpimportcsv');
|
||||
|
||||
$context = context_system::instance();
|
||||
|
||||
$id = required_param('id', PARAM_INT);
|
||||
$url = new moodle_url("/admin/tool/lpimportcsv/index.php");
|
||||
$PAGE->set_context($context);
|
||||
$PAGE->set_url($url);
|
||||
$PAGE->set_title($pagetitle);
|
||||
$PAGE->set_pagelayout('admin');
|
||||
$PAGE->set_heading($pagetitle);
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($pagetitle);
|
||||
$urlparams = ['competencyframeworkid' => $id, 'pagecontextid' => $context->id];
|
||||
$frameworksurl = new moodle_url('/admin/tool/lp/competencies.php', $urlparams);
|
||||
echo $OUTPUT->notification(get_string('competencyframeworkcreated', 'tool_lp'), 'notifysuccess');
|
||||
echo $OUTPUT->continue_button($frameworksurl);
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
@@ -37,6 +37,7 @@ $PAGE->set_pagelayout('admin');
|
||||
$PAGE->set_heading($pagetitle);
|
||||
|
||||
$form = null;
|
||||
echo $OUTPUT->header();
|
||||
if (optional_param('needsconfirm', 0, PARAM_BOOL)) {
|
||||
$form = new \tool_lpimportcsv\form\import($url->out(false));
|
||||
} else if (optional_param('confirm', 0, PARAM_BOOL)) {
|
||||
@@ -53,7 +54,7 @@ if ($form->is_cancelled()) {
|
||||
|
||||
if ($data->confirm) {
|
||||
$importid = $data->importid;
|
||||
$importer = new \tool_lpimportcsv\framework_importer(null, null, null, $importid, $data);
|
||||
$importer = new \tool_lpimportcsv\framework_importer(null, null, null, $importid, $data, true);
|
||||
|
||||
$error = $importer->get_error();
|
||||
if ($error) {
|
||||
@@ -61,21 +62,23 @@ if ($form->is_cancelled()) {
|
||||
$form->set_import_error($error);
|
||||
} else {
|
||||
$framework = $importer->import();
|
||||
redirect(new moodle_url('continue.php', array('id' => $framework->get_id())));
|
||||
$urlparams = ['competencyframeworkid' => $framework->get_id(), 'pagecontextid' => $context->id];
|
||||
$frameworksurl = new moodle_url('/admin/tool/lp/competencies.php', $urlparams);
|
||||
echo $OUTPUT->notification(get_string('competencyframeworkcreated', 'tool_lp'), 'notifysuccess');
|
||||
echo $OUTPUT->continue_button($frameworksurl);
|
||||
die();
|
||||
}
|
||||
} else {
|
||||
$text = $form->get_file_content('importfile');
|
||||
$encoding = $data->encoding;
|
||||
$delimiter = $data->delimiter_name;
|
||||
$importer = new \tool_lpimportcsv\framework_importer($text, $encoding, $delimiter);
|
||||
$importer = new \tool_lpimportcsv\framework_importer($text, $encoding, $delimiter, 0, null, true);
|
||||
$confirmform = new \tool_lpimportcsv\form\import_confirm(null, $importer);
|
||||
$form = $confirmform;
|
||||
$pagetitle = get_string('confirmcolumnmappings', 'tool_lpimportcsv');
|
||||
}
|
||||
}
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($pagetitle);
|
||||
|
||||
$form->display();
|
||||
|
||||
@@ -38,11 +38,13 @@ $string['importfile'] = 'CSV framework description file';
|
||||
$string['importfile_help'] = 'A competency framework may be imported via text file. The format of the file can be determined by creating a new competency framework on the site and then exporting it.';
|
||||
$string['importfile_link'] = 'admin/tool/lpimportcsv';
|
||||
$string['import'] = 'Import';
|
||||
$string['importingfile'] = 'Importing file data';
|
||||
$string['invalidimportfile'] = 'File format is invalid.';
|
||||
$string['isframework'] = 'Is framework';
|
||||
$string['noframeworks'] = 'No competency frameworks have been created yet';
|
||||
$string['parentidnumber'] = 'Parent ID number';
|
||||
$string['pluginname'] = 'Import competency framework';
|
||||
$string['processingfile'] = 'Processing file';
|
||||
$string['relatedidnumbers'] = 'Cross-referenced competency ID numbers';
|
||||
$string['ruleconfig'] = 'Rule config (optional)';
|
||||
$string['ruleoutcome'] = 'Rule outcome (optional)';
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
$plugin->version = 2016083000; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_lpimportcsv'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->dependencies = array('tool_lp' => 2016052300);
|
||||
$plugin->dependencies = array('tool_lp' => 2016112900);
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_lpmigrate'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->dependencies = array(
|
||||
'tool_lp' => ANY_VERSION
|
||||
|
||||
@@ -125,9 +125,7 @@ class manager {
|
||||
|
||||
} catch (\Horde_Imap_Client_Exception $e) {
|
||||
$message = $e->getMessage();
|
||||
mtrace("Unable to connect to IMAP server. Failed with '{$message}'");
|
||||
|
||||
return false;
|
||||
throw new \moodle_exception('imapconnectfailure', 'tool_messageinbound', '', null, $message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300;
|
||||
$plugin->requires = 2016051900;
|
||||
$plugin->version = 2016120500;
|
||||
$plugin->requires = 2016112900;
|
||||
$plugin->component = 'tool_messageinbound';
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
$plugin->version = 2016052305; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_mobile'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -77,5 +77,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2016052305, 'tool', 'monitor');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2016052305; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_monitor'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_multilangupgrade'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_phpunit'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_profiling'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -65,6 +65,6 @@ Feature: Backup user data
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
When I go to "User report" in the course gradebook
|
||||
When I navigate to "User report" in the course gradebook
|
||||
Then "Quiz 1" row "Grade" column of "user-grade" table should contain "5"
|
||||
And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50"
|
||||
|
||||
@@ -49,9 +49,10 @@ Feature: Basic recycle bin functionality
|
||||
And I should see "Deleting C2"
|
||||
And I should see "C2 has been completely deleted"
|
||||
And I press "Continue"
|
||||
And I go to the courses management page
|
||||
And I should not see "Course 2" in the "#course-listing" "css_element"
|
||||
When I navigate to "Recycle bin" node in "Category: Miscellaneous"
|
||||
And I am on course index
|
||||
And I should see "Course 1"
|
||||
And I should not see "Course 2"
|
||||
When I navigate to "Recycle bin" in current page administration
|
||||
Then I should see "Course 2"
|
||||
And I should see "Contents will be permanently deleted after 14 days"
|
||||
And I click on "Restore" "link" in the "region-main" "region"
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_recyclebin'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_replace'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
$plugin->maturity = MATURITY_ALPHA; // this version's maturity level
|
||||
|
||||
@@ -75,7 +75,7 @@ if (!empty($delall) && confirm_sesskey()) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!empty($ignore)) {
|
||||
if (!empty($ignore) && confirm_sesskey()) {
|
||||
unset($SESSION->users_result[$id]);
|
||||
echo json_encode(true);
|
||||
exit;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300;
|
||||
$plugin->requires = 2016051900;
|
||||
$plugin->version = 2016120500;
|
||||
$plugin->requires = 2016112900;
|
||||
$plugin->component = 'tool_spamcleaner'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_task'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ define(['jquery', 'core/ajax', 'core/log', 'core/notification', 'core/templates'
|
||||
* Get the current values for the form inputs and refresh the list of matching templates.
|
||||
*
|
||||
* @method refreshSearch
|
||||
* @param {String} themename The naeme of the theme.
|
||||
*/
|
||||
var refreshSearch = function(themename) {
|
||||
var componentStr = $('[data-field="component"]').val();
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_templatelibrary'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_unsuproles'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_uploadcourse'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -358,38 +358,40 @@ if ($formdata = $mform2->is_cancelled()) {
|
||||
|
||||
// add default values for remaining fields
|
||||
$formdefaults = array();
|
||||
foreach ($STD_FIELDS as $field) {
|
||||
if (isset($user->$field)) {
|
||||
continue;
|
||||
}
|
||||
// all validation moved to form2
|
||||
if (isset($formdata->$field)) {
|
||||
// process templates
|
||||
$user->$field = uu_process_template($formdata->$field, $user);
|
||||
$formdefaults[$field] = true;
|
||||
if (in_array($field, $upt->columns)) {
|
||||
$upt->track($field, s($user->$field), 'normal');
|
||||
if ($updatetype != UU_UPDATE_FILEOVERRIDE && $updatetype != UU_UPDATE_NOCHANGES) {
|
||||
foreach ($STD_FIELDS as $field) {
|
||||
if (isset($user->$field)) {
|
||||
continue;
|
||||
}
|
||||
// all validation moved to form2
|
||||
if (isset($formdata->$field)) {
|
||||
// process templates
|
||||
$user->$field = uu_process_template($formdata->$field, $user);
|
||||
$formdefaults[$field] = true;
|
||||
if (in_array($field, $upt->columns)) {
|
||||
$upt->track($field, s($user->$field), 'normal');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($PRF_FIELDS as $field) {
|
||||
if (isset($user->$field)) {
|
||||
continue;
|
||||
}
|
||||
if (isset($formdata->$field)) {
|
||||
// process templates
|
||||
$user->$field = uu_process_template($formdata->$field, $user);
|
||||
|
||||
// Form contains key and later code expects value.
|
||||
// Convert key to value for required profile fields.
|
||||
require_once($CFG->dirroot.'/user/profile/field/'.$proffields[$field]->datatype.'/field.class.php');
|
||||
$profilefieldclass = 'profile_field_'.$proffields[$field]->datatype;
|
||||
$profilefield = new $profilefieldclass($proffields[$field]->id);
|
||||
if (method_exists($profilefield, 'convert_external_data')) {
|
||||
$user->$field = $profilefield->edit_save_data_preprocess($user->$field, null);
|
||||
foreach ($PRF_FIELDS as $field) {
|
||||
if (isset($user->$field)) {
|
||||
continue;
|
||||
}
|
||||
if (isset($formdata->$field)) {
|
||||
// process templates
|
||||
$user->$field = uu_process_template($formdata->$field, $user);
|
||||
|
||||
$formdefaults[$field] = true;
|
||||
// Form contains key and later code expects value.
|
||||
// Convert key to value for required profile fields.
|
||||
require_once($CFG->dirroot.'/user/profile/field/'.$proffields[$field]->datatype.'/field.class.php');
|
||||
$profilefieldclass = 'profile_field_'.$proffields[$field]->datatype;
|
||||
$profilefield = new $profilefieldclass($proffields[$field]->id);
|
||||
if (method_exists($profilefield, 'convert_external_data')) {
|
||||
$user->$field = $profilefield->edit_save_data_preprocess($user->$field, null);
|
||||
}
|
||||
|
||||
$formdefaults[$field] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ $string['deleteerrors'] = 'Delete errors';
|
||||
$string['encoding'] = 'Encoding';
|
||||
$string['errormnetadd'] = 'Can not add remote users';
|
||||
$string['errors'] = 'Errors';
|
||||
$string['invalidupdatetype'] = 'This option cannot be selected with the chosen upload type.';
|
||||
$string['invaliduserdata'] = 'Invalid data detected for user {$a} and it has been automatically cleaned.';
|
||||
$string['nochanges'] = 'No changes';
|
||||
$string['pluginname'] = 'User upload';
|
||||
|
||||
@@ -29,14 +29,13 @@ Feature: Upload users
|
||||
And I should see "Section 1"
|
||||
And I press "Upload users"
|
||||
And I press "Continue"
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I should see "Tom Jones"
|
||||
And I should see "Trent Reznor"
|
||||
And I should see "reznor@example.com"
|
||||
And I am on site homepage
|
||||
And I follow "Maths"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
And I set the field "groups" to "Section 1 (1)"
|
||||
And the "members" select box should contain "Tom Jones"
|
||||
|
||||
|
||||
@@ -350,6 +350,7 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
$errors = parent::validation($data, $files);
|
||||
$columns = $this->_customdata['columns'];
|
||||
$optype = $data['uutype'];
|
||||
$updatetype = $data['uuupdatetype'];
|
||||
|
||||
// detect if password column needed in file
|
||||
if (!in_array('password', $columns)) {
|
||||
@@ -382,6 +383,12 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
}
|
||||
}
|
||||
|
||||
// If the 'Existing user details' value is set we need to ensure that the
|
||||
// 'Upload type' is not set to something invalid.
|
||||
if (!empty($updatetype) && ($optype == UU_USER_ADDNEW || $optype == UU_USER_ADDINC)) {
|
||||
$errors['uuupdatetype'] = get_string('invalidupdatetype', 'tool_uploaduser');
|
||||
}
|
||||
|
||||
// look for other required data
|
||||
if ($optype != UU_USER_UPDATE) {
|
||||
$requiredusernames = useredit_get_required_name_fields();
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_uploaduser'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
use tool_usertours\local\forms;
|
||||
use tool_usertours\local\table;
|
||||
use core\notification;
|
||||
|
||||
/**
|
||||
* Tour manager.
|
||||
@@ -117,6 +118,21 @@ class manager {
|
||||
*/
|
||||
const ACTION_RESETFORALL = 'resetforall';
|
||||
|
||||
/**
|
||||
* @var CONFIG_SHIPPED_TOUR
|
||||
*/
|
||||
const CONFIG_SHIPPED_TOUR = 'shipped_tour';
|
||||
|
||||
/**
|
||||
* @var CONFIG_SHIPPED_FILENAME
|
||||
*/
|
||||
const CONFIG_SHIPPED_FILENAME = 'shipped_filename';
|
||||
|
||||
/**
|
||||
* @var CONFIG_SHIPPED_VERSION
|
||||
*/
|
||||
const CONFIG_SHIPPED_VERSION = 'shipped_version';
|
||||
|
||||
/**
|
||||
* This is the entry point for this controller class.
|
||||
*
|
||||
@@ -349,6 +365,10 @@ class manager {
|
||||
if (empty($tour)) {
|
||||
$this->header('newtour');
|
||||
} else {
|
||||
if (!empty($tour->get_config(self::CONFIG_SHIPPED_TOUR))) {
|
||||
notification::add(get_string('modifyshippedtourwarning', 'tool_usertours'), notification::WARNING);
|
||||
}
|
||||
|
||||
$this->header($tour->get_name());
|
||||
$data = $tour->prepare_data_for_form();
|
||||
|
||||
@@ -646,6 +666,11 @@ class manager {
|
||||
}
|
||||
|
||||
$tour = $step->get_tour();
|
||||
|
||||
if (!empty($tour->get_config(self::CONFIG_SHIPPED_TOUR))) {
|
||||
notification::add(get_string('modifyshippedtourwarning', 'tool_usertours'), notification::WARNING);
|
||||
}
|
||||
|
||||
$PAGE->navbar->add($tour->get_name(), $tour->get_view_link());
|
||||
if (isset($id)) {
|
||||
$PAGE->navbar->add($step->get_title(), $step->get_edit_link());
|
||||
@@ -750,4 +775,68 @@ class manager {
|
||||
$step->remove();
|
||||
redirect($tour->get_view_link());
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure all of the default tours that are shipped with Moodle are created
|
||||
* and up to date with the latest version.
|
||||
*/
|
||||
public static function update_shipped_tours() {
|
||||
global $DB, $CFG;
|
||||
|
||||
// A list of tours that are shipped with Moodle. They are in
|
||||
// the format filename => version. The version value needs to
|
||||
// be increased if the tour has been updated.
|
||||
$shippedtours = [
|
||||
'boost_administrator.json' => 1,
|
||||
'boost_course_view.json' => 1,
|
||||
];
|
||||
|
||||
$existingtourrecords = $DB->get_recordset('tool_usertours_tours');
|
||||
|
||||
// Get all of the existing shipped tours and check if they need to be
|
||||
// updated.
|
||||
foreach ($existingtourrecords as $tourrecord) {
|
||||
$tour = tour::load_from_record($tourrecord);
|
||||
|
||||
if (!empty($tour->get_config(self::CONFIG_SHIPPED_TOUR))) {
|
||||
$filename = $tour->get_config(self::CONFIG_SHIPPED_FILENAME);
|
||||
$version = $tour->get_config(self::CONFIG_SHIPPED_VERSION);
|
||||
|
||||
// If we know about this tour (otherwise leave it as is).
|
||||
if (isset($shippedtours[$filename])) {
|
||||
// And the version in the DB is an older version.
|
||||
if ($version < $shippedtours[$filename]) {
|
||||
// Remove the old version because it's been updated
|
||||
// and needs to be recreated.
|
||||
$tour->remove();
|
||||
} else {
|
||||
// The tour has not been updated so we don't need to
|
||||
// do anything with it.
|
||||
unset($shippedtours[$filename]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$existingtourrecords->close();
|
||||
|
||||
foreach ($shippedtours as $filename => $version) {
|
||||
$filepath = $CFG->dirroot . '/admin/tool/usertours/tours/' . $filename;
|
||||
$tourjson = file_get_contents($filepath);
|
||||
$tour = self::import_tour_from_json($tourjson);
|
||||
|
||||
// Set some additional config data to record that this tour was
|
||||
// added as a shipped tour.
|
||||
$tour->set_config(self::CONFIG_SHIPPED_TOUR, true);
|
||||
$tour->set_config(self::CONFIG_SHIPPED_FILENAME, $filename);
|
||||
$tour->set_config(self::CONFIG_SHIPPED_VERSION, $version);
|
||||
|
||||
if (defined('BEHAT_SITE_RUNNING') || (defined('PHPUNIT_TEST') && PHPUNIT_TEST)) {
|
||||
// Disable this tour if this is behat or phpunit.
|
||||
$tour->set_enabled(false);
|
||||
}
|
||||
|
||||
$tour->persist();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
use tool_usertours\manager;
|
||||
|
||||
/**
|
||||
* Perform the post-install procedures.
|
||||
*/
|
||||
@@ -71,4 +73,7 @@ function xmldb_tool_usertours_install() {
|
||||
$DB->delete_records('usertours_steps', null);
|
||||
$DB->delete_records('usertours_tours', null);
|
||||
}
|
||||
|
||||
// Update the tours shipped with Moodle.
|
||||
manager::update_shipped_tours();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Upgrade code for install
|
||||
*
|
||||
* @package tool_usertours
|
||||
* @copyright 2016 Ryan Wyllie <ryan@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
use tool_usertours\manager;
|
||||
|
||||
/**
|
||||
* Upgrade the user tours plugin.
|
||||
*
|
||||
* @param int $oldversion The old version of the user tours plugin
|
||||
* @return bool
|
||||
*/
|
||||
function xmldb_tool_usertours_upgrade($oldversion) {
|
||||
global $CFG, $DB;
|
||||
|
||||
if ($oldversion < 2016120501) {
|
||||
// Update the tours shipped with Moodle.
|
||||
manager::update_shipped_tours();
|
||||
|
||||
upgrade_plugin_savepoint(true, 2016120501, 'tool', 'usertours');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -60,6 +60,7 @@ $string['filter_role'] = 'Role';
|
||||
$string['filter_role_help'] = 'A tour may be restricted to users with selected roles in the context where the tour is shown. For example, restricting a Dashboard tour to users with the role of student won\'t work if users have the role of student in a course (as is generally the case). A Dashboard tour can only be restricted to users with a system role.';
|
||||
$string['importtour'] = 'Import tour';
|
||||
$string['left'] = 'Left';
|
||||
$string['modifyshippedtourwarning'] = 'This is a user tour that has shipped with Moodle. Any modifications you make may be overridden during your next site upgrade.';
|
||||
$string['movestepdown'] = 'Move step down';
|
||||
$string['movestepup'] = 'Move step up';
|
||||
$string['movetourdown'] = 'Move tour down';
|
||||
@@ -136,3 +137,35 @@ $string['target_selector_targetvalue_help'] = 'A CSS selector can be used to tar
|
||||
$string['viewtour_info'] = 'This is the \'{$a->tourname}\' tour. It applies to the path \'{$a->path}\'.';
|
||||
$string['viewtour_edit'] = 'You can <a href="{$a->editlink}">edit the tour defaults</a> and <a href="{$a->resetlink}">force the tour to be displayed</a> to all users again.';
|
||||
$string['tour_resetforall'] = 'The state of the tour has been reset. It will be displayed to all users again.';
|
||||
|
||||
// Boost - administrator tour.
|
||||
$string['tour1_title_welcome'] = 'Welcome';
|
||||
$string['tour1_content_welcome'] = 'Welcome to the Boost theme for Moodle 3.2. If you\'ve used Moodle before you might find some things look a bit different.';
|
||||
$string['tour1_title_navigation'] = 'Navigation';
|
||||
$string['tour1_content_navigation'] = 'Major navigation is now through this nav drawer. The contents update depending on where you are in the site. Use the button at the top to hide or show it.';
|
||||
$string['tour1_title_customisation'] = 'Customisation';
|
||||
$string['tour1_content_customisation'] = 'To customise the look of your site and the front page, use the settings menu in the corner of this header. Try turning editing on right now.';
|
||||
$string['tour1_title_blockregion'] = 'Block region';
|
||||
$string['tour1_content_blockregion'] = 'There is still a block region over here. We recommend removing the Navigation and Administration blocks completely, as all the functionality is elsewhere in the Boost theme.';
|
||||
$string['tour1_title_addingblocks'] = 'Adding blocks';
|
||||
$string['tour1_content_addingblocks'] = 'In fact, think carefully about including any blocks on your pages. Blocks are not shown on the Moodle Mobile app, so as a general rule it\'s much better to make sure your site works well without any blocks.';
|
||||
$string['tour1_title_end'] = 'End of tour';
|
||||
$string['tour1_content_end'] = 'This has been a user tour, a new feature in Moodle 3.2. It won\'t show again unless you reset it using the link in the footer. As an admin you can also create your own tours like this!';
|
||||
|
||||
// Boost - course view tour.
|
||||
$string['tour2_title_welcome'] = 'Welcome';
|
||||
$string['tour2_content_welcome'] = 'Welcome to the Boost theme for Moodle 3.2. If you\'ve used Moodle before you might find things look a bit different here on the course page.';
|
||||
$string['tour2_title_customisation'] = 'Customisation';
|
||||
$string['tour2_content_customisation'] = 'To change any course settings, use the settings menu in the corner of this header. You will find a similar settings menu on the home page of every activity, too. Try turning editing on right now.';
|
||||
$string['tour2_title_navigation'] = 'Navigation';
|
||||
$string['tour2_content_navigation'] = 'Navigation is now through this nav drawer. Use the button at the top to hide or show it. You will see that there are links for sections of your course.';
|
||||
$string['tour2_title_opendrawer'] = 'Open the nav drawer';
|
||||
$string['tour2_content_opendrawer'] = 'Try opening the nav drawer now.';
|
||||
$string['tour2_title_participants'] = 'Course participants';
|
||||
$string['tour2_content_participants'] = 'View participants here. This is also where you go to add or remove students.';
|
||||
$string['tour2_title_addblock'] = 'Add a block';
|
||||
$string['tour2_content_addblock'] = 'If you turn editing on you can add blocks from the nav drawer. However, think carefully about including any blocks on your pages. Blocks are not shown on the Moodle Mobile app, so for the best user experience it is better to make sure your course works well without any blocks.';
|
||||
$string['tour2_title_addingblocks'] = 'Adding blocks';
|
||||
$string['tour2_content_addingblocks'] = 'You can add blocks to this page using this button. However, think carefully about including any blocks on your pages. Blocks are not shown on the Moodle Mobile app, so for the best user experience it is better to make sure your course works well without any blocks.';
|
||||
$string['tour2_title_end'] = 'End of tour';
|
||||
$string['tour2_content_end'] = 'This has been a user tour, a new feature in Moodle 3.2. It won\'t show again unless you reset it using the link in the footer. The site admin can also create further tours for this site if required.';
|
||||
|
||||
@@ -25,7 +25,7 @@ Feature: Add a new user tour
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | targetvalue_selector | Title | Content |
|
||||
| Selector | .usermenu | User menu | This is your personal user menu. You'll find your personal preferences and your user profile here. |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
||||
And I press "Next"
|
||||
And I should see "This area shows you what's happening in some of your courses"
|
||||
@@ -38,7 +38,7 @@ Feature: Add a new user tour
|
||||
And I should see "This area shows you what's happening in some of your courses"
|
||||
And I press "End tour"
|
||||
And I should not see "This area shows you what's happening in some of your courses"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
And I am on homepage
|
||||
And I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
||||
And I should not see "This area shows you what's happening in some of your courses"
|
||||
And I follow "Reset user tour on this page"
|
||||
@@ -58,7 +58,7 @@ Feature: Add a new user tour
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | Title | Content |
|
||||
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
Then I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
||||
|
||||
@javascript
|
||||
@@ -77,5 +77,5 @@ Feature: Add a new user tour
|
||||
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
|
||||
And I open the User tour settings page
|
||||
When I click on "Enable" "link" in the "My first tour" "table_row"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
And I am on homepage
|
||||
Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
||||
|
||||
@@ -16,7 +16,7 @@ Feature: Apply tour filters to a tour
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | Title | Content |
|
||||
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
Then I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
{"name":"Boost - administrator","description":"A tour of some new features in the Boost theme, for administrators","pathmatch":"FRONTPAGE","enabled":"1","sortorder":"0","configdata":"{\"placement\":\"bottom\",\"orphan\":\"0\",\"backdrop\":\"1\",\"reflex\":\"0\",\"filtervalues\":{\"role\":[\"-1\"],\"theme\":[\"boost\"]},\"majorupdatetime\":1479366244,\"default_tour\":true,\"filename\":\"boost_administrator.json\",\"version\":1}","version":"2016102001","steps":[{"title":"tour1_title_welcome,tool_usertours","content":"tour1_content_welcome,tool_usertours","targettype":"2","targetvalue":"","sortorder":"0","configdata":"{}"},{"title":"tour1_title_navigation,tool_usertours","content":"tour1_content_navigation,tool_usertours","targettype":"0","targetvalue":"[data-region=\"drawer-toggle\"] button[data-action=\"toggle-drawer\"]","sortorder":"1","configdata":"{}"},{"title":"tour1_title_customisation,tool_usertours","content":"tour1_content_customisation,tool_usertours","targettype":"0","targetvalue":"body:not(.editing) #page-header .card-block","sortorder":"2","configdata":"{\"placement\":\"bottom\"}"},{"title":"tour1_title_blockregion,tool_usertours","content":"tour1_content_blockregion,tool_usertours","targettype":"0","targetvalue":"body.editing [data-region=\"blocks-column\"]","sortorder":"3","configdata":"{}"},{"title":"tour1_title_addingblocks,tool_usertours","content":"tour1_content_addingblocks,tool_usertours","targettype":"0","targetvalue":"body.editing [data-region=\"blocks-column\"]","sortorder":"4","configdata":"{\"placement\":\"bottom\"}"},{"title":"tour1_title_end,tool_usertours","content":"tour1_content_end,tool_usertours","targettype":"2","targetvalue":"","sortorder":"5","configdata":"{}"}]}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"Boost - course view","description":"A tour for introducing administrators and teachers to courses in the Boost theme","pathmatch":"\/course\/view.php%","enabled":"1","sortorder":"1","configdata":"{\"placement\":\"bottom\",\"orphan\":\"0\",\"backdrop\":\"1\",\"reflex\":\"0\",\"filtervalues\":{\"role\":[\"-1\",\"editingteacher\"],\"theme\":[\"boost\"]},\"majorupdatetime\":1480050104,\"shipped_tour\":true,\"shipped_filename\":\"boost_course_view.json\",\"shipped_version\":1}","version":"2016120501","steps":[{"title":"tour2_title_welcome,tool_usertours","content":"tour2_content_welcome,tool_usertours","targettype":"2","targetvalue":"","sortorder":"0","configdata":"{}"},{"title":"tour2_title_customisation,tool_usertours","content":"tour2_content_customisation,tool_usertours","targettype":"0","targetvalue":"body:not(.editing) #page-header .card-block","sortorder":"1","configdata":"{}"},{"title":"tour2_title_navigation,tool_usertours","content":"tour2_content_navigation,tool_usertours","targettype":"0","targetvalue":"[data-region=\"drawer-toggle\"] button[data-action=\"toggle-drawer\"]","sortorder":"2","configdata":"{}"},{"title":"tour2_title_opendrawer,tool_usertours","content":"tour2_content_opendrawer,tool_usertours","targettype":"0","targetvalue":"body:not(.drawer-open-left) [data-region=\"drawer-toggle\"] button[data-action=\"toggle-drawer\"]","sortorder":"3","configdata":"{}"},{"title":"tour2_title_participants,tool_usertours","content":"tour2_content_participants,tool_usertours","targettype":"0","targetvalue":"body.drawer-open-left [data-region=\"drawer\"] [data-key=\"participants\"]","sortorder":"4","configdata":"{\"placement\":\"bottom\",\"backdrop\":\"0\"}"},{"title":"tour2_title_addblock,tool_usertours","content":"tour2_content_addblock,tool_usertours","targettype":"0","targetvalue":"body.drawer-open-left:not(.editing) [data-region=\"drawer\"]","sortorder":"5","configdata":"{\"placement\":\"right\",\"orphan\":\"0\",\"backdrop\":\"0\",\"reflex\":\"0\"}"},{"title":"tour2_title_addingblocks,tool_usertours","content":"tour2_content_addingblocks,tool_usertours","targettype":"0","targetvalue":"body.drawer-open-left.editing [data-region=\"drawer\"] [data-key=\"addblock\"]","sortorder":"6","configdata":"{\"backdrop\":\"0\",\"placement\":\"top\"}"},{"title":"tour2_title_end,tool_usertours","content":"tour2_content_end,tool_usertours","targettype":"2","targetvalue":"","sortorder":"7","configdata":"{}"}]}
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016102001; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016052300; // Requires this Moodle version.
|
||||
$plugin->version = 2016120501; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_usertours'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'tool_xmldb'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
|
||||
@@ -55,5 +55,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_cas'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
$plugin->dependencies = array('auth_ldap' => 2016051900);
|
||||
$plugin->dependencies = array('auth_ldap' => 2016112900);
|
||||
|
||||
@@ -151,6 +151,7 @@ class login implements renderable, templatable {
|
||||
$data->rememberusername = $this->rememberusername;
|
||||
$data->passwordautocomplete = $this->passwordautocomplete;
|
||||
$data->signupurl = $this->signupurl->out(false);
|
||||
$data->username = $this->username;
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
+21
-17
@@ -301,18 +301,24 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
|
||||
// Find obsolete users.
|
||||
if (count($userlist)) {
|
||||
$remove_users = array();
|
||||
// All the drivers can cope with chunks of 10,000. See line 4491 of lib/dml/tests/dml_est.php
|
||||
$userlistchunks = array_chunk($userlist , 10000);
|
||||
foreach($userlistchunks as $userlistchunk) {
|
||||
list($notin_sql, $params) = $DB->get_in_or_equal($userlistchunk, SQL_PARAMS_NAMED, 'u', false);
|
||||
$params['authtype'] = $this->authtype;
|
||||
$sql = "SELECT u.id, u.username
|
||||
$removeusers = array();
|
||||
$params['authtype'] = $this->authtype;
|
||||
$sql = "SELECT u.id, u.username
|
||||
FROM {user} u
|
||||
WHERE u.auth=:authtype AND u.deleted=0 AND u.mnethostid=:mnethostid $suspendselect AND u.username $notin_sql";
|
||||
$params['mnethostid'] = $CFG->mnet_localhost_id;
|
||||
$remove_users = $remove_users + $DB->get_records_sql($sql, $params);
|
||||
WHERE u.auth=:authtype
|
||||
AND u.deleted=0
|
||||
AND u.mnethostid=:mnethostid
|
||||
$suspendselect";
|
||||
$params['mnethostid'] = $CFG->mnet_localhost_id;
|
||||
$internalusersrs = $DB->get_recordset_sql($sql, $params);
|
||||
|
||||
$usernamelist = array_flip($userlist);
|
||||
foreach ($internalusersrs as $internaluser) {
|
||||
if (!array_key_exists($internaluser->username, $usernamelist)) {
|
||||
$removeusers[] = $internaluser;
|
||||
}
|
||||
}
|
||||
$internalusersrs->close();
|
||||
} else {
|
||||
$sql = "SELECT u.id, u.username
|
||||
FROM {user} u
|
||||
@@ -320,13 +326,13 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
$params = array();
|
||||
$params['authtype'] = $this->authtype;
|
||||
$params['mnethostid'] = $CFG->mnet_localhost_id;
|
||||
$remove_users = $DB->get_records_sql($sql, $params);
|
||||
$removeusers = $DB->get_records_sql($sql, $params);
|
||||
}
|
||||
|
||||
if (!empty($remove_users)) {
|
||||
$trace->output(get_string('auth_dbuserstoremove','auth_db', count($remove_users)));
|
||||
if (!empty($removeusers)) {
|
||||
$trace->output(get_string('auth_dbuserstoremove', 'auth_db', count($removeusers)));
|
||||
|
||||
foreach ($remove_users as $user) {
|
||||
foreach ($removeusers as $user) {
|
||||
if ($this->config->removeuser == AUTH_REMOVEUSER_FULLDELETE) {
|
||||
delete_user($user);
|
||||
$trace->output(get_string('auth_dbdeleteuser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)), 1);
|
||||
@@ -339,7 +345,7 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($remove_users);
|
||||
unset($removeusers);
|
||||
}
|
||||
|
||||
if (!count($userlist)) {
|
||||
@@ -933,5 +939,3 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
return core_user::clean_data($user);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@ class auth_db_testcase extends advanced_testcase {
|
||||
/** @var string Original error log */
|
||||
protected $oldlog;
|
||||
|
||||
/** @var int The amount of users to create for the large user set deletion test */
|
||||
protected $largedeletionsetsize = 128;
|
||||
|
||||
protected function init_auth_database() {
|
||||
global $DB, $CFG;
|
||||
require_once("$CFG->dirroot/auth/db/auth.php");
|
||||
@@ -444,4 +447,56 @@ class auth_db_testcase extends advanced_testcase {
|
||||
|
||||
$this->cleanup_auth_database();
|
||||
}
|
||||
|
||||
/**
|
||||
* Testing the deletion of a user when there are many users in the external DB.
|
||||
*/
|
||||
public function test_deleting_with_many_users() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
$this->preventResetByRollback();
|
||||
$this->init_auth_database();
|
||||
$auth = get_auth_plugin('db');
|
||||
$auth->db_init();
|
||||
|
||||
// Set to delete from moodle when missing from DB.
|
||||
set_config('removeuser', AUTH_REMOVEUSER_FULLDELETE, 'auth/db');
|
||||
$auth->config->removeuser = AUTH_REMOVEUSER_FULLDELETE;
|
||||
|
||||
// Create users.
|
||||
$users = [];
|
||||
for ($i = 0; $i < $this->largedeletionsetsize; $i++) {
|
||||
$user = (object)array('username' => "u$i", 'name' => "u$i", 'pass' => 'heslo', 'email' => "u$i@example.com");
|
||||
$user->id = $DB->insert_record('auth_db_users', $user);
|
||||
$users[] = $user;
|
||||
}
|
||||
|
||||
// Sync to moodle.
|
||||
$trace = new null_progress_trace();
|
||||
$auth->sync_users($trace, true);
|
||||
|
||||
// Check user is there.
|
||||
$user = array_shift($users);
|
||||
$moodleuser = $DB->get_record('user', array('email' => $user->email, 'auth' => 'db'));
|
||||
$this->assertNotNull($moodleuser);
|
||||
$this->assertEquals($user->username, $moodleuser->username);
|
||||
|
||||
// Delete a user.
|
||||
$DB->delete_records('auth_db_users', array('id' => $user->id));
|
||||
|
||||
// Sync again.
|
||||
$auth->sync_users($trace, true);
|
||||
|
||||
// Check user is no longer there.
|
||||
$moodleuser = $DB->get_record('user', array('id' => $moodleuser->id));
|
||||
$this->assertFalse($auth->user_login($user->username, 'heslo'));
|
||||
$this->assertEquals(1, $moodleuser->deleted);
|
||||
|
||||
// Make sure it was the only user deleted.
|
||||
$numberdeleted = $DB->count_records('user', array('deleted' => 1, 'auth' => 'db'));
|
||||
$this->assertEquals(1, $numberdeleted);
|
||||
|
||||
$this->cleanup_auth_database();
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_db'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2016052302; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_email'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
+2
-2
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_fc'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_imap'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -55,5 +55,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_ldap'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version (3.1).
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version (3.1).
|
||||
$plugin->component = 'auth_lti'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -43,5 +43,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_manual'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -43,5 +43,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_mnet'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_nntp'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_nologin'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_none'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
*/
|
||||
|
||||
$string['auth_pamdescription'] = 'This method uses PAM to access the native usernames on this server. You have to install <a href="http://www.math.ohio-state.edu/~ccunning/pam_auth/">PHP4 PAM Authentication</a> in order to use this module.';
|
||||
$string['auth_passwordisexpired'] = 'Your password is expired. Do you want change your password now?';
|
||||
$string['auth_passwordwillexpire'] = 'Your password will expire in {$a} days. Do you want change your password now?';
|
||||
$string['auth_passwordisexpired'] = 'Your password has expired. Do you want to change your password now?';
|
||||
$string['auth_passwordwillexpire'] = 'Your password will expire in {$a} days. Do you want to change your password now?';
|
||||
$string['pluginname'] = 'PAM (Pluggable Authentication Modules)';
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_pam'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_pop3'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version
|
||||
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version
|
||||
$plugin->component = 'auth_shibboleth'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user