Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c40a5e030 | |||
| 59e3c69754 | |||
| bcc6fa863e | |||
| 0695bf0d31 | |||
| 9b7aec5f8f | |||
| 8e5a14947d | |||
| 33c05e98e1 | |||
| 511c36ae30 | |||
| b0389d2785 | |||
| d0d7d578c5 | |||
| 2c42e4ca95 | |||
| c60d769026 | |||
| 31f6d9ccc5 | |||
| 81e5662cb0 | |||
| a1428eb9cf | |||
| 3860a59298 | |||
| e6dabb77a2 | |||
| a353ca34f5 | |||
| 27c9fe993a | |||
| d2c98b6b88 | |||
| e5187812a5 | |||
| dda5919426 | |||
| 2fa4da9aa4 | |||
| ba790c87a3 | |||
| e8cd8fce88 | |||
| d8d09c9465 |
+2
-2
@@ -229,8 +229,8 @@ module.exports = function(grunt) {
|
||||
* @return {String} The rewritten destination path.
|
||||
*/
|
||||
var 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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-1
@@ -70,7 +70,8 @@ function filter_tex_sanitize_formula($texexp) {
|
||||
'\lowercase','\relax','\aftergroup',
|
||||
'\afterassignment','\expandafter','\noexpand','\special',
|
||||
'\let', '\futurelet','\else','\fi','\chardef','\makeatletter','\afterground',
|
||||
'\noexpand','\line','\mathcode','\item','\section','\mbox','\declarerobustcommand'
|
||||
'\noexpand','\line','\mathcode','\item','\section','\mbox','\declarerobustcommand',
|
||||
'\ExplSyntaxOn',
|
||||
];
|
||||
|
||||
$allowlist = ['inputenc'];
|
||||
|
||||
@@ -1354,6 +1354,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';
|
||||
|
||||
@@ -223,7 +223,7 @@ class curl_security_helper extends curl_security_helper_base {
|
||||
protected function address_explicitly_blocked($addr) {
|
||||
$blockedhosts = $this->get_blacklisted_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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1668,3 +1668,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
@@ -9014,11 +9014,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);
|
||||
|
||||
@@ -144,6 +144,11 @@ class core_curl_security_helper_testcase 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.9.22===
|
||||
* Added a new parameter in address_in_subnet to give us the ability to check for 0.0.0.0 or not.
|
||||
|
||||
===3.9.21===
|
||||
* 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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = 2020061521.00; // 20200615 = branching date YYYYMMDD - do not modify!
|
||||
$version = 2020061522.00; // 20200615 = branching date YYYYMMDD - do not modify!
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
$release = '3.9.21 (Build: 20230424)'; // Human-friendly version name
|
||||
$release = '3.9.22 (Build: 20230612)'; // Human-friendly version name
|
||||
$branch = '39'; // This version's branch.
|
||||
$maturity = MATURITY_STABLE; // This version's maturity level.
|
||||
|
||||
Reference in New Issue
Block a user