Compare commits

..

32 Commits

Author SHA1 Message Date
Ilya Tregubov bfbae65caa Moodle release 3.11.15 2023-06-10 14:07:30 +08:00
Ilya Tregubov 8c52e7ca55 weekly release 3.11.14+ 2023-06-09 13:14:36 +08:00
Andrew Nicols fc66630f6c Merge branch 'wip_MDL-78400_m311' of https://github.com/gjb2048/moodle into MOODLE_311_STABLE 2023-06-08 10:59:13 +08:00
Andrew Nicols 9464e3449e Merge branch 'MDL-76406-311' of https://github.com/safatshahin/moodle into MOODLE_311_STABLE 2023-06-08 10:43:23 +08:00
Stevani Andolo 65ab20645a MDL-78215 core: Added support unit test 2023-06-08 09:37:41 +08:00
Stevani Andolo 41afb596e6 MDL-78215 core: support checking if 0.0.0.0 is in subnet 2023-06-08 09:37:40 +08:00
Paul Holden 224a3af976 MDL-77193 mnet: correct sorting of access control table. 2023-06-07 09:54:12 +08:00
Gareth Barnard 78cf3e1b49 MDL-78400 JavaScript: Building JS puts build files in src dir on Win. 2023-06-05 14:47:52 +01:00
Safat e7240a2adb MDL-76406 core: Add environment check for versions not supporting 8.2 2023-06-02 12:10:07 +10:00
Petr Skoda bbf492040e MDL-76683 core_group: fix template 2023-06-02 02:04:16 +00:00
Ilya Tregubov 5291b32c63 weekly release 3.11.14+ 2023-06-02 09:55:53 +08:00
Ilya Tregubov 2c636fe760 Merge branch 'MDL-75961-311' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2023-06-01 09:09:27 +08:00
Sara Arjona 8dca7193e7 Merge branch 'MDL-77907-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-05-31 12:18:28 +02:00
Sara Arjona 9dbb082f04 weekly release 3.11.14+ 2023-05-26 09:29:05 +02:00
Jun Pataleta 87e29b9b4a Merge branch 'MDL-76065-311' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2023-05-25 11:57:34 +08:00
Andrew Nicols 6e21aa585a Merge branch 'MDL-77995-311' of https://github.com/paulholden/moodle into MOODLE_311_STABLE 2023-05-25 09:51:08 +08:00
Simey Lameze a3f8c78437 MDL-75961 behat: review and enhance mod_imscp tests
This commit makes the following improvements to mod_imscp tests:
* Removes unnecessary @javascript and @_file_upload tags from non-JS tests.
* Removes user/enrol data generation from tests that can be performed as admin.
* Removes "I log out" and other unnecessary steps.
2023-05-24 10:43:19 +08:00
Angelia Dela Cruz c2454323b2 MDL-75961 behat: IMSCP behat generators use UI
Replace steps that manually add IMSCP instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2023-05-24 10:43:19 +08:00
Jun Pataleta 1ca2a55381 Merge branch 'MDL-76688/311' of https://github.com/skodak/moodle into MOODLE_311_STABLE 2023-05-23 15:21:40 +08:00
Simey Lameze a989d788c7 MDL-76065 behat: Review and enhance mod_lti Behat tests
In this commit, the following improvements were made to the mod_lti Behat tests:

* Replaced manual steps with data generators to set completion.
* Eliminated unnecessary user and course enrolments data generation as some tests can be performed as an admin.
* Removed the @javascript tag from non-JS tests.
* Updated the LTI data generator to generate an internal Moodle URL in the toolurl field, enabling the use of XML files.
2023-05-23 12:35:01 +08:00
Angelia Dela Cruz e5830e234d MDL-76065 behat: LTI behat generators use UI
Replace steps that manually add LTI instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2023-05-23 12:32:05 +08:00
Jun Pataleta f459ae270b weekly release 3.11.14+ 2023-05-19 21:14:09 +08:00
Andrew Nicols 5d14b0b0c2 MDL-77733 behat: Remove extraneous no-axe option
There is no need for no-axe if we make axe a boolean value. We already
have automatic support for negated boolean flags.
2023-05-19 11:28:29 +08:00
Andrew Nicols b1fc632e5c MDL-77733 behat: Correct version number in upgrade.txt 2023-05-18 13:28:28 +08:00
Andrew Nicols 35c252a91d Merge branch 'MDL-77733-311' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2023-05-18 13:27:53 +08:00
Angelia Dela Cruz fa96021455 MDL-77907 Behat: Coverage for duplicating competency framework 2023-05-15 17:24:52 +08:00
Petr Skoda 2edc104c11 MDL-76688 filter_text: prevent LaTeX3 syntax 2023-05-08 10:13:04 +02:00
Sara Arjona 63555942ce weekly release 3.11.14+ 2023-05-04 12:43:09 +02:00
Jun Pataleta 6f2aca4839 Merge branch 'MDL-76857-311' of https://github.com/sarjona/moodle into MOODLE_311_STABLE 2023-05-02 15:44:30 +08:00
Sara Arjona 15224105f4 MDL-76857 filter_displayh5p: Improve behat tests
Although the screenshots in the failures for some of the scenarios in
filter/displayh5p/tests/behat/h5p_filter.feature, like "Render a local
H5P file as teacher" were displaying the expected result, there were
some javascript errors (probably due to behat is quicker and the
iframes were not always ready).
I've added one extra step before accessing the iframe to give more
time to the H5P player to load and confirm the page is displayed
properly.
2023-04-27 11:22:42 +02:00
Paul Holden 0aa9dce2a3 MDL-77995 javascript: more precise path matching building JS. 2023-04-24 10:51:23 +01:00
Simey Lameze 3ffc2ed914 MDL-77733 behat: enable Axe accessibility tests by default 2023-04-04 09:21:48 +08:00
28 changed files with 165 additions and 152 deletions
+2 -3
View File
@@ -30,10 +30,9 @@
* @param {String} srcPath the matched src path
* @return {String} The rewritten destination path.
*/
const babelRename = function(destPath, srcPath) {
destPath = srcPath.replace('src', 'build');
destPath = destPath.replace('.js', '.min.js');
destPath = srcPath.replace(`amd/src`, `amd/build`);
destPath = destPath.replace(/\.js$/, '.min.js');
return destPath;
};
+1
View File
@@ -3751,6 +3751,7 @@
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="7.4.0" level="required">
<RESTRICT function="restrict_php_version_82" message="unsupportedphpversion82" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
+10 -2
View File
@@ -6,7 +6,7 @@ require_once(__DIR__ . '/../../config.php');
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
$sort = optional_param('sort', 'username', PARAM_ALPHA);
$sort = optional_param('sort', 'username', PARAM_ALPHAEXT);
$dir = optional_param('dir', 'ASC', PARAM_ALPHA);
$page = optional_param('page', 0, PARAM_INT);
$perpage = optional_param('perpage', 30, PARAM_INT);
@@ -153,7 +153,15 @@ foreach ($columns as $column) {
$headings[$column] = "<a href=\"?sort=$column&amp;dir=$columndir&amp;\">".$string[$column]."</a>$columnicon";
}
$headings['delete'] = '';
$acl = $DB->get_records('mnet_sso_access_control', null, "$sort $dir", '*'); //, $page * $perpage, $perpage);
$sortorder = get_safe_orderby([
'username' => 'username',
'mnet_host_id' => 'mnet_host_id',
'access' => 'accessctrl',
'default' => 'username',
], $sort, $dir, false);
$acl = $DB->get_records('mnet_sso_access_control', null, $sortorder);
$aclcount = $DB->count_records('mnet_sso_access_control');
if (!$acl) {
+11 -9
View File
@@ -49,7 +49,7 @@ list($options, $unrecognized) = cli_get_params(
'torun' => 0,
'optimize-runs' => '',
'add-core-features-to-theme' => false,
'axe' => false,
'axe' => null,
'disable-composer' => false,
'composer-upgrade' => true,
'composer-self-update' => true,
@@ -69,7 +69,7 @@ Behat utilities to initialise behat tests
Usage:
php init.php [--parallel=value [--maxruns=value] [--fromrun=value --torun=value]]
[--axe] [-o | --optimize-runs] [-a | --add-core-features-to-theme]
[--no-axe] [-o | --optimize-runs] [-a | --add-core-features-to-theme]
[--no-composer-self-update] [--no-composer-upgrade]
[--disable-composer]
[--help]
@@ -79,7 +79,7 @@ Options:
-m, --maxruns Max parallel processes to be executed at one time
--fromrun Execute run starting from (Used for parallel runs on different vms)
--torun Execute run till (Used for parallel runs on different vms)
--axe Include axe accessibility tests
--no-axe Disable axe accessibility tests.
-o, --optimize-runs
Split features with specified tags in all parallel runs.
@@ -110,6 +110,12 @@ if (!empty($options['help'])) {
exit(0);
}
if ($options['axe']) {
echo "Axe accessibility tests are enabled by default, to disable them, use the --no-axe option.\n";
} else if ($options['axe'] === false) {
echo "Axe accessibility tests have been disabled.\n";
}
// Check which util file to call.
$utilfile = 'util_single_run.php';
$commandoptions = "";
@@ -118,9 +124,7 @@ if ($options['parallel'] && $options['parallel'] > 1) {
$utilfile = 'util.php';
// Sanitize all input options, so they can be passed to util.
foreach ($options as $option => $value) {
if ($value) {
$commandoptions .= " --$option=\"$value\"";
}
$commandoptions .= behat_get_command_flags($option, $value);
}
} else {
// Only sanitize options for single run.
@@ -130,9 +134,7 @@ if ($options['parallel'] && $options['parallel'] > 1) {
];
foreach ($cmdoptionsforsinglerun as $option) {
if (!empty($options[$option])) {
$commandoptions .= " --$option='$options[$option]'";
}
$commandoptions .= behat_get_command_flags($option, $options[$option]);
}
}
+4 -9
View File
@@ -54,7 +54,7 @@ list($options, $unrecognized) = cli_get_params(
'torun' => 0,
'optimize-runs' => '',
'add-core-features-to-theme' => false,
'axe' => false,
'axe' => true,
),
array(
'h' => 'help',
@@ -70,7 +70,7 @@ $help = "
Behat utilities to manage the test environment
Usage:
php util.php [--install|--drop|--enable|--disable|--diag|--updatesteps|--axe|--help] [--parallel=value [--maxruns=value]]
php util.php [--install|--drop|--enable|--disable|--diag|--updatesteps|--no-axe|--help] [--parallel=value [--maxruns=value]]
Options:
--install Installs the test environment for acceptance tests
@@ -79,7 +79,7 @@ Options:
--disable Disables test environment
--diag Get behat test environment status code
--updatesteps Update feature step file.
--axe Include axe accessibility tests
--no-axe Disable axe accessibility tests.
-j, --parallel Number of parallel behat run operation
-m, --maxruns Max parallel processes to be executed at one time.
@@ -317,12 +317,7 @@ function commands_to_execute($options) {
}
foreach ($extraoptions as $option => $value) {
if ($options[$option]) {
$extra .= " --$option";
if ($value) {
$extra .= "=\"$value\"";
}
}
$extra .= behat_get_command_flags($option, $value);
}
if (empty($options['parallel'])) {
+3 -3
View File
@@ -49,7 +49,7 @@ list($options, $unrecognized) = cli_get_params(
'updatesteps' => false,
'optimize-runs' => '',
'add-core-features-to-theme' => false,
'axe' => false,
'axe' => true,
),
array(
'h' => 'help',
@@ -76,7 +76,7 @@ Options:
--disable Disables test environment
--diag Get behat test environment status code
--updatesteps Update feature step file.
--axe Include axe accessibility tests
--no-axe Disable axe accessibility tests.
-o, --optimize-runs Split features with specified tags in all parallel runs.
-a, --add-core-features-to-theme Add all core features to specified theme's
@@ -183,7 +183,7 @@ if ($options['install']) {
behat_config_manager::set_behat_run_config_value('behatsiteenabled', 1);
}
// Define whether to run Behat with axe tests.
// Configure axe according to option.
behat_config_manager::set_behat_run_config_value('axe', $options['axe']);
// Enable test mode.
+2
View File
@@ -1,5 +1,7 @@
This files describes API changes in the tool_behat code.
=== 3.11.15 ===
* Behat is initialised with Axe accessibility tests enabled by default, if you want to disable them please use the --no-axe option.
=== 3.7 ===
* Behat will now look for behat step definitions in the current
theme and any parents the theme may have.
@@ -128,3 +128,18 @@ Feature: Manage competency frameworks
Then I should see "Competency framework updated"
And I should see "Science Year-6 Edited"
And I should see "sc-y-6"
Scenario: Duplicate a competency framework
Given the following lp "frameworks" exist:
| shortname | idnumber |
| CF1 | CF1 |
And the following lp "competencies" exist:
| shortname | framework |
| C1 | CF1 |
And I navigate to "Competencies > Competency frameworks" in site administration
# Duplicate the selected competency framework
When I click on "Duplicate" of edit menu in the "CF1" row
# Confirm that the selected framework was duplicated by clicking on the link
And I click on "CF1 (copy) (CF1_1)" "link"
# Confirm that the corresponding competency also exists in the duplicated framework
Then I should see "C1"
@@ -69,6 +69,7 @@ Feature: Render H5P content using filters
And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue"
And I wait until the page is ready
When I click on "Save and display" "button"
And I should see "PageName1" in the "page-header" "region"
# Switch to iframe created by filter
And I switch to "h5p-iframe" class iframe
# Switch to iframe created by embed.php page
@@ -104,6 +105,7 @@ Feature: Render H5P content using filters
And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue"
And I wait until the page is ready
When I click on "Save and display" "button"
And I should see "PageName1" in the "page-header" "region"
# Switch to iframe created by filter
And I switch to "h5p-iframe" class iframe
Then I should see "Note that the libraries may exist in the file you uploaded, but you're not allowed to upload new libraries."
@@ -129,6 +131,7 @@ Feature: Render H5P content using filters
And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue"
And I wait until the page is ready
And I click on "Save and display" "button"
And I should see "PageName1" in the "page-header" "region"
# Switch to iframe created by filter
And I switch to "h5p-iframe" class iframe
# Libraries don't exist, so an error should be displayed.
@@ -152,6 +155,7 @@ Feature: Render H5P content using filters
And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue"
And I wait until the page is ready
And I click on "Save and display" "button"
And I should see "PageName2" in the "page-header" "region"
# Switch to iframe created by filter
And I switch to "h5p-iframe" class iframe
# Switch to iframe created by embed.php page
@@ -191,6 +195,7 @@ Feature: Render H5P content using filters
And I click on "Select this file" "button"
And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue"
And I click on "Save and display" "button"
And I should see "PageName1" in the "page-header" "region"
And I switch to "h5p-iframe" class iframe
# Library is disabled, so an error should be displayed.
Then I should see "This file can't be displayed because its content type is disabled."
+1
View File
@@ -84,6 +84,7 @@ function filter_tex_sanitize_formula(string $texexp): string {
'\afterassignment', '\expandafter', '\noexpand', '\special',
'\let', '\futurelet', '\else', '\fi', '\chardef', '\makeatletter', '\afterground',
'\noexpand', '\line', '\mathcode', '\item', '\section', '\mbox', '\declarerobustcommand',
'\ExplSyntaxOn',
];
$allowlist = ['inputenc'];
+1 -1
View File
@@ -120,7 +120,7 @@
{{#members}}
<optgroup label="{{role}}">
{{#rolemembers}}
<option value="{{value}}" title="{{{text}}}">{{{text}}}</option>
<option value="{{value}}" title="{{text}}">{{{text}}}</option>
{{/rolemembers}}
</optgroup>
{{/members}}
+1
View File
@@ -1407,6 +1407,7 @@ $string['unsupportedphpversion73'] = 'PHP version 7.3 and higher are not support
$string['unsupportedphpversion74'] = 'PHP version 7.4 and higher are not supported.';
$string['unsupportedphpversion80'] = 'PHP version 8.0 and higher are not supported.';
$string['unsupportedphpversion81'] = 'PHP version 8.1 and higher are not supported.';
$string['unsupportedphpversion82'] = 'PHP version 8.2 and higher are not supported.';
$string['unsuspenduser'] = 'Activate user account';
$string['updateaccounts'] = 'Update existing accounts';
$string['updatecomponent'] = 'Update component';
+21
View File
@@ -548,3 +548,24 @@ function cli_execute_parallel($cmds, $cwd = null, $delay = 0) {
}
return $processes;
}
/**
* Get command flags for an option/value combination
*
* @param string $option
* @param string|bool|null $value
* @return string
*/
function behat_get_command_flags(string $option, $value): string {
$commandoptions = '';
if (is_bool($value)) {
if ($value) {
return " --{$option}";
} else {
return " --no-{$option}";
}
} else if ($value !== null) {
return " --$option=\"$value\"";
}
return '';
}
+1 -1
View File
@@ -223,7 +223,7 @@ class curl_security_helper extends curl_security_helper_base {
protected function address_explicitly_blocked($addr) {
$blockedhosts = $this->get_blocked_hosts_by_category();
$iphostsblocked = array_merge($blockedhosts['ipv4'], $blockedhosts['ipv6']);
return address_in_subnet($addr, implode(',', $iphostsblocked));
return address_in_subnet($addr, implode(',', $iphostsblocked), true);
}
/**
+11
View File
@@ -1675,3 +1675,14 @@ function restrict_php_version_80($result) {
function restrict_php_version_81($result) {
return restrict_php_version($result, '8.1');
}
/**
* Check if the current PHP version is greater than or equal to
* PHP version 8.2
*
* @param object $result an environment_results instance
* @return bool result of version check
*/
function restrict_php_version_82($result) {
return restrict_php_version($result, '8.2');
}
+3 -2
View File
@@ -8956,11 +8956,12 @@ function make_unique_id_code($extra = '') {
*
* @param string $addr The address you are checking
* @param string $subnetstr The string of subnet addresses
* @param bool $checkallzeros The state to whether check for 0.0.0.0
* @return bool
*/
function address_in_subnet($addr, $subnetstr) {
function address_in_subnet($addr, $subnetstr, $checkallzeros = false) {
if ($addr == '0.0.0.0') {
if ($addr == '0.0.0.0' && !$checkallzeros) {
return false;
}
$subnets = explode(',', $subnetstr);
+5
View File
@@ -135,6 +135,11 @@ class curl_security_helper_test extends \advanced_testcase {
// Test when DNS resolution fails.
[[], "http://example.com", "127.0.0.1", "", true],
// Test ensures that the default value of getremoteaddr() 0.0.0.0 will check against the provided blocked list.
[$simpledns, "http://0.0.0.0/x.png", "0.0.0.0", "", true],
// Test set using IPV4 with integer format.
[$simpledns, "http://2852039166/x.png", "169.254.169.254", "", true],
// Test some freaky deaky Unicode domains. Should be blocked always.
[$simpledns, "http://169。254。169。254/", "127.0.0.1", "", true],
[$simpledns, "http://169。254。169。254/", "1.2.3.4", "", true],
+3
View File
@@ -1,6 +1,9 @@
This files describes API changes in core libraries and APIs,
information provided here is intended especially for developers.
=== 3.11.15 ===
* Added a new parameter in address_in_subnet to give us the ability to check for 0.0.0.0 or not.
=== 3.11.14 ===
* Added 'extrainfo' in the DB options config. Its extra information for the DB driver, e.g. SQL Server,
has additional configuration according to its environment, which the administrator can specify to alter and
@@ -14,52 +14,26 @@ Feature: Display the IMS content package description in the IMSCP and optionally
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "activities" exist:
| activity | course | name | intro | packagefilepath |
| imscp | C1 | Test IMS content package | Test IMS content package description | mod/imscp/tests/packages/singelscobasic.zip |
@javascript @_file_upload
Scenario: Description is displayed in the IMS content package
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "IMS content package" to section "1"
And I set the following fields to these values:
| Name | Test IMS content package |
| Description | Test IMS content package description |
And I upload "mod/imscp/tests/packages/singlescobasic.zip" file to "Package file" filemanager
And I click on "Save and display" "button"
When I am on the "Test IMS content package" "imscp activity" page
When I am on the "Test IMS content package" "imscp activity" page logged in as teacher1
Then I should see "Test IMS content package description"
@javascript @_file_upload
Scenario: Show IMS description in the course homepage
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "IMS content package" to section "1"
And I set the following fields to these values:
| Name | Test IMS content package |
| Description | Test IMS content package description |
And I upload "mod/imscp/tests/packages/singlescobasic.zip" file to "Package file" filemanager
And I click on "Save and display" "button"
When I am on the "Test IMS content package" "imscp activity editing" page
When I am on the "Test IMS content package" "imscp activity editing" page logged in as teacher1
And the following fields match these values:
| Display description on course page | |
And I set the following fields to these values:
| Display description on course page | 1 |
And I press "Save and return to course"
When I am on "Course 1" course homepage
Then I should see "Test IMS content package description"
@javascript @_file_upload
Scenario: Hide IMS description in the course homepage
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "IMS content package" to section "1"
And I set the following fields to these values:
| Name | Test IMS content package |
| Description | Test IMS content package description |
And I upload "mod/imscp/tests/packages/singlescobasic.zip" file to "Package file" filemanager
And I click on "Save and display" "button"
When I am on the "Test IMS content package" "imscp activity editing" page
When I am on the "Test IMS content package" "imscp activity editing" page logged in as teacher1
And the following fields match these values:
| Display description on course page | |
And I press "Save and return to course"
When I am on "Course 1" course homepage
Then I should not see "Test IMS content package description"
@@ -1,4 +1,4 @@
@mod @mod_imscp @_file_upload @core_completion @javascript
@mod @mod_imscp @core_completion
Feature: View activity completion information in the IMS content package activity
In order to have visibility of IMS content package completion requirements
As a student
@@ -18,36 +18,21 @@ Feature: View activity completion information in the IMS content package activit
| teacher1 | C1 | editingteacher |
Scenario: View automatic completion items
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "IMS content package" to section "1"
And I set the following fields to these values:
| Name | Music history |
| Completion tracking | Show activity as complete when conditions are met |
| Require view | 1 |
And I upload "mod/imscp/tests/packages/singlescobasic.zip" file to "Package file" filemanager
And I click on "Save and display" "button"
And I am on "Course 1" course homepage
# Teacher view.
And I am on the "Music history" "imscp activity" page
And I log out
Given the following "activities" exist:
| activity | course | name | completion | completionview | packagefilepath |
| imscp | C1 | Music history | 2 | 1 | mod/imscp/tests/pacakges/singescobbasic.zip |
# Student view.
When I am on the "Music history" "imscp activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done"
@javascript
Scenario: Use manual completion
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "IMS content package" to section "1"
And I set the following fields to these values:
| Name | Music history |
| Completion tracking | Students can manually mark the activity as completed |
And I upload "mod/imscp/tests/packages/singlescobasic.zip" file to "Package file" filemanager
And I click on "Save and display" "button"
And I am on the "Music history" "imscp activity" page
Given the following "activities" exist:
| activity | course | name | completion | packagefilepath |
| imscp | C1 | Music history | 1 | mod/imscp/tests/packages/singescobasic.zip |
And I am on the "Music history" "imscp activity" page logged in as teacher1
# Teacher view.
And the manual completion button for "Music history" should be disabled
And I log out
# Student view.
When I am on the "Music history" "imscp activity" page logged in as student1
Then the manual completion button of "Music history" is displayed as "Mark as done"
@@ -0,0 +1,19 @@
@mod @mod_imscp @javascript @_file_upload
Feature: Create an IMSCP activity through UI
In order to confirm that IMSCP activity creation via UI works correctly
Background:
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
Scenario: IMS activity is created using UI
Given I am on the "Course 1" course page logged in as admin
And I turn editing mode on
And I add a "IMS content package" to section "1"
And I set the following fields to these values:
| Name | Test IMS content package 2 |
| Description | Test IMS content package description |
And I upload "mod/imscp/tests/packages/singlescobasic.zip" file to "Package file" filemanager
When I press "Save and return to course"
Then I should see "Test IMS content package 2"
+11 -25
View File
@@ -14,17 +14,12 @@ Feature: Add preconfigured tools via teacher interface
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "activities" exist:
| activity | course | name | typeid | toolurl |
| lti | C1 | Test tool | 0 | /mod/lti/tests/fixtures/ims_cartridge_basic_lti_link.xml |
@javascript
Scenario: Add a tool from a cartridge
Given the following "activity" exists:
| course | C1 |
| activity | lti |
| name | Test tool activity |
When I am on the "Test tool activity" "lti activity editing" page logged in as teacher1
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/ims_cartridge_basic_lti_link.xml"
And I press "Save and return to course"
And I am on the "Test tool activity" "lti activity editing" page
Given I am on the "Test tool" "lti activity editing" page logged in as teacher1
And I expand all fieldsets
Then the field "Tool URL" matches value "http://www.example.com/lti/provider.php"
And the field "Secure tool URL" matches value "https://www.example.com/lti/provider.php"
@@ -33,11 +28,7 @@ Feature: Add preconfigured tools via teacher interface
@javascript @_switch_window
Scenario: Add a preconfigured tool from a cartridge
Given the following "activity" exists:
| course | C1 |
| activity | lti |
| name | Test tool activity 1 |
When I am on the "Test tool activity 1" "lti activity editing" page logged in as teacher1
Given I am on the "Test tool" "lti activity editing" page logged in as teacher1
And I follow "Add preconfigured tool"
And I switch to "add_tool" window
And I set the field "Tool name" to "Placeholder"
@@ -46,25 +37,20 @@ Feature: Add preconfigured tools via teacher interface
And I switch to the main window
And I wait "2" seconds
And I follow "Edit preconfigured tool"
And I switch to "edit_tool" window
When I switch to "edit_tool" window
Then the field "Tool URL" matches value "http://www.example.com/lti/provider.php"
And the field "Icon URL" matches value "http://download.moodle.org/unittest/test.jpg"
And the field "Secure icon URL" matches value "https://download.moodle.org/unittest/test.jpg"
And I press "Cancel"
And I switch to the main window
And I press "Save and return to course"
And I am on the "Test tool activity 1" "lti activity editing" page
And I press "Save and display"
And I am on the "Test tool" "lti activity editing" page
And the field "Preconfigured tool" matches value "Placeholder"
@javascript @_switch_window
Scenario: Add and use a preconfigured tool
Given the following "activity" exists:
| course | C1 |
| activity | lti |
| name | Test tool activity |
When I am on the "Test tool activity" "lti activity editing" page logged in as teacher1
Given I am on the "Test tool" "lti activity editing" page logged in as teacher1
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
And I press "Save and return to course"
And I am on the "Test tool activity" "lti activity" page
And I switch to "contentframe" iframe
And I press "Save and display"
When I switch to "contentframe" iframe
Then I should see "This represents a tool provider"
+4 -10
View File
@@ -87,15 +87,9 @@ Feature: Content-Item support
@javascript
Scenario: Editing a manually configured external tool
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "External tool" to section "1"
And the field "Preconfigured tool" matches value "Automatic, based on tool URL"
And I set the field "Activity name" to "Test tool activity 1"
And the "Select content" "button" should be disabled
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
And I press "Save and return to course"
When I open "Test tool activity 1" actions menu
And I choose "Edit settings" in the open action menu
Given the following "activities" exist:
| activity | course | name | typeid | toolurl |
| lti | C1 | Test tool | 0 | /mod/lti/tests/fixtures/tool_provider.php |
And I am on the "Test tool" "lti activity editing" page logged in as teacher1
Then the field "Preconfigured tool" matches value "Automatic, based on tool URL"
And the "Select content" "button" should be disabled
@@ -1,4 +1,4 @@
@mod @mod_lti @core_completion @javascript
@mod @mod_lti @core_completion
Feature: View activity completion information in the LTI activity
In order to have visibility of LTI completion requirements
As a student
@@ -25,30 +25,28 @@ Feature: View activity completion information in the LTI activity
Then "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "View" completion condition
@javascript
Scenario: View automatic completion items as a student
Given I am on the "Music history" "lti activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And I log out
And I am on the "Course 1" course page logged in as teacher1
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "90.00" to the user "Vinnie Student1" for the grade item "Music history"
And I press "Save changes"
And I log out
When I am on the "Music history" "lti activity" page logged in as student1
Then the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "View" completion condition of "Music history" is displayed as "done"
@javascript
Scenario: Use manual completion
Given I am on the "Music history" "lti activity editing" page logged in as teacher1
And I expand all fieldsets
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
And I press "Save and return to course"
And I press "Save and display"
# Teacher view.
Given I am on the "Music history" "lti activity" page
And the manual completion button for "Music history" should be disabled
And I log out
# Student view.
When I am on the "Music history" "lti activity" page logged in as student1
Then the manual completion button of "Music history" is displayed as "Mark as done"
+6 -11
View File
@@ -5,23 +5,18 @@ Feature: Rename external tools via inline editing
I need to be able to rename the LTI tool and have it's name change in the gradebook
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "courses" exist:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "activities" exist:
| activity | course | name |
| lti | C1 | Test tool activity 1 |
@javascript
Scenario: Add a tool and inline edit
When I log in as "teacher1"
When I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I add a "External tool" to section "1" and I fill the form with:
| Activity name | Test tool activity 1 |
And I set the field "Edit title" in the "li#section-1" "css_element" to "Test tool activity renamed"
And I set the field "Edit title" in the "Test tool activity 1" "activity" to "Test tool activity renamed"
And I navigate to "Setup > Gradebook setup" in the course gradebook
Then I should not see "Test tool activity 1"
And I should see "Test tool activity renamed"
+1 -12
View File
@@ -5,18 +5,7 @@ Feature: Configure tool types
I need to be able to add, remove and configure tool types
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
Given I log in as "admin"
And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
@javascript
+3
View File
@@ -42,6 +42,9 @@ class mod_lti_generator extends testing_module_generator {
if (!isset($record->toolurl)) {
$record->toolurl = '';
} else {
$toolurl = new moodle_url($record->toolurl);
$record->toolurl = $toolurl->out(false);
}
if (!isset($record->resourcekey)) {
$record->resourcekey = '12345';
+2 -2
View File
@@ -29,9 +29,9 @@
defined('MOODLE_INTERNAL') || die();
$version = 2021051714.00; // 20210517 = branching date YYYYMMDD - do not modify!
$version = 2021051715.00; // 20210517 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '3.11.14 (Build: 20230424)';// Human-friendly version name
$release = '3.11.15 (Build: 20230612)';// Human-friendly version name
$branch = '311'; // This version's branch.
$maturity = MATURITY_STABLE; // This version's maturity level.