Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bfbae65caa | |||
| 8c52e7ca55 | |||
| fc66630f6c | |||
| 9464e3449e | |||
| 65ab20645a | |||
| 41afb596e6 | |||
| 224a3af976 | |||
| 78cf3e1b49 | |||
| e7240a2adb | |||
| bbf492040e | |||
| 5291b32c63 | |||
| 2c636fe760 | |||
| 8dca7193e7 | |||
| 9dbb082f04 | |||
| 87e29b9b4a | |||
| 6e21aa585a | |||
| a3f8c78437 | |||
| c2454323b2 | |||
| 1ca2a55381 | |||
| a989d788c7 | |||
| e5830e234d | |||
| f459ae270b | |||
| 5d14b0b0c2 | |||
| b1fc632e5c | |||
| 35c252a91d | |||
| fa96021455 | |||
| 2edc104c11 | |||
| 63555942ce | |||
| 6f2aca4839 | |||
| 15224105f4 | |||
| 0aa9dce2a3 | |||
| 3ffc2ed914 |
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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&dir=$columndir&\">".$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) {
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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'])) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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'];
|
||||
|
||||
@@ -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}}
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 '';
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
@@ -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);
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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"
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user