mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
Merge branch 'MDL-82286-main' of https://github.com/daledavies/moodle
This commit is contained in:
commit
70abac7f27
3 changed files with 21 additions and 2 deletions
|
@ -256,7 +256,7 @@ if (!isset($_SERVER['REMOTE_ADDR']) && isset($_SERVER['argv'][0])) {
|
||||||
|
|
||||||
// sometimes default PHP settings are borked on shared hosting servers, I wonder why they have to do that??
|
// sometimes default PHP settings are borked on shared hosting servers, I wonder why they have to do that??
|
||||||
ini_set('precision', 14); // needed for upgrades and gradebook
|
ini_set('precision', 14); // needed for upgrades and gradebook
|
||||||
ini_set('serialize_precision', 17); // Make float serialization consistent on all systems.
|
ini_set('serialize_precision', -1); // Make float serialization consistent on all systems.
|
||||||
|
|
||||||
// Scripts may request no debug and error messages in output
|
// Scripts may request no debug and error messages in output
|
||||||
// please note it must be defined before including the config.php script
|
// please note it must be defined before including the config.php script
|
||||||
|
|
|
@ -23,6 +23,7 @@ namespace quizaccess_seb;
|
||||||
* @author Andrew Madden <andrewmadden@catalyst-au.net>
|
* @author Andrew Madden <andrewmadden@catalyst-au.net>
|
||||||
* @copyright 2020 Catalyst IT
|
* @copyright 2020 Catalyst IT
|
||||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||||
|
* @covers \quizaccess_seb\config_key
|
||||||
*/
|
*/
|
||||||
class config_key_test extends \advanced_testcase {
|
class config_key_test extends \advanced_testcase {
|
||||||
|
|
||||||
|
@ -43,6 +44,20 @@ class config_key_test extends \advanced_testcase {
|
||||||
$this->assertEquals('4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945', $hash);
|
$this->assertEquals('4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945', $hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test config key hash is derived correctly by Moodle.
|
||||||
|
*
|
||||||
|
* @param string $config The SEB config file name.
|
||||||
|
* @param string $hash The correct config key hash for this file.
|
||||||
|
*
|
||||||
|
* @dataProvider real_ck_hash_provider
|
||||||
|
*/
|
||||||
|
public function test_config_key_hash_is_derived_correctly($config, $hash): void {
|
||||||
|
$xml = file_get_contents(__DIR__ . '/fixtures/' . $config);
|
||||||
|
$derivedhash = config_key::generate($xml)->get_hash();
|
||||||
|
$this->assertEquals($hash, $derivedhash);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check that the Config Key hash is not altered if the originatorVersion is present in the XML or not.
|
* Check that the Config Key hash is not altered if the originatorVersion is present in the XML or not.
|
||||||
*/
|
*/
|
||||||
|
@ -64,7 +79,7 @@ class config_key_test extends \advanced_testcase {
|
||||||
'unencrypted_mac2.1.4' => ['unencrypted_mac_001.seb',
|
'unencrypted_mac2.1.4' => ['unencrypted_mac_001.seb',
|
||||||
'4fa9af8ec8759eb7c680752ef4ee5eaf1a860628608fccae2715d519849f9292', ''],
|
'4fa9af8ec8759eb7c680752ef4ee5eaf1a860628608fccae2715d519849f9292', ''],
|
||||||
'unencrypted_win2.2.3' => ['unencrypted_win_223.seb',
|
'unencrypted_win2.2.3' => ['unencrypted_win_223.seb',
|
||||||
'fc6f4ea5922717760f4d6d536c23b8d19bf20b52aa97940f5427a76e20f49026', ''],
|
'2534e4e9f3188f9f9133bf7cf7b4c5d898292bbd7e8d0230f39d1176636a1431', ''],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>batteryChargeThresholdCritical</key>
|
||||||
|
<real>0.1</real>
|
||||||
|
<key>batteryChargeThresholdLow</key>
|
||||||
|
<real>0.2</real>
|
||||||
<key>originatorVersion</key>
|
<key>originatorVersion</key>
|
||||||
<string>SEB_Win_2.1.1</string>
|
<string>SEB_Win_2.1.1</string>
|
||||||
<key>startURL</key>
|
<key>startURL</key>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue