-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82dd384
commit 0422b28
Showing
22 changed files
with
76 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
* @author Alex Yeung <[email protected]> | ||
*/ | ||
class getmarkingschemes extends request { | ||
|
||
/** @var string request method */ | ||
const METHOD = 'GET'; | ||
|
||
|
@@ -66,7 +67,7 @@ public function process_response($response): array { | |
'MKS_CODE' => $markingscheme['identifier'], | ||
'MKS_MARKS' => $markingscheme['usage_indicator']['code'], | ||
'MKS_TYPE' => $markingscheme['type']['code'], | ||
'MKS_IUSE' => $markingscheme['in_use_indicator'] | ||
'MKS_IUSE' => $markingscheme['in_use_indicator'], | ||
]; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
* @author Alex Yeung <[email protected]> | ||
*/ | ||
class privacy_provider_test extends \advanced_testcase { | ||
|
||
protected function setUp(): void { | ||
parent::setUp(); | ||
$this->resetAfterTest(); | ||
|
@@ -39,7 +40,7 @@ protected function setUp(): void { | |
* @return void | ||
* @throws \coding_exception | ||
*/ | ||
public function test_get_reason() { | ||
public function test_get_reason(): void { | ||
$reason = get_string(provider::get_reason(), 'sitsapiclient_easikit'); | ||
$this->assertEquals('This plugin does not store any personal data.', $reason); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,8 @@ | |
* @author Alex Yeung <[email protected]> | ||
*/ | ||
class privacy_provider_test extends \advanced_testcase { | ||
|
||
|
||
protected function setUp(): void { | ||
parent::setUp(); | ||
$this->resetAfterTest(); | ||
|
@@ -39,7 +41,7 @@ protected function setUp(): void { | |
* @return void | ||
* @throws \coding_exception | ||
*/ | ||
public function test_get_reason() { | ||
public function test_get_reason(): void { | ||
$reason = get_string(provider::get_reason(), 'sitsapiclient_stutalkdirect'); | ||
$this->assertEquals('This plugin does not store any personal data.', $reason); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
* @author Alex Yeung <[email protected]> | ||
*/ | ||
class errormanager { | ||
|
||
/** @var int error type cannot be determined */ | ||
const ERROR_UNKNOWN = -99; | ||
|
||
|
@@ -66,7 +67,7 @@ class errormanager { | |
self::ERROR_ATTEMPT_NUMBER_BLANK => 'Attempt number blank', | ||
self::ERROR_OVERWRITE_EXISTING_RECORD => 'Overwrite not allowed', | ||
self::ERROR_INVALID_MARKS => 'Invalid marks', | ||
self::ERROR_INVALID_HAND_IN_STATUS => 'Invalid hand in status' | ||
self::ERROR_INVALID_HAND_IN_STATUS => 'Invalid hand in status', | ||
]; | ||
|
||
/** @var array error types and their match error strings */ | ||
|
@@ -82,7 +83,7 @@ class errormanager { | |
'no further update allowed', | ||
], | ||
self::ERROR_INVALID_MARKS => ['Mark and/or Grade not valid'], | ||
self::ERROR_INVALID_HAND_IN_STATUS => ['handin_status provided is not in SUS table'] | ||
self::ERROR_INVALID_HAND_IN_STATUS => ['handin_status provided is not in SUS table'], | ||
]; | ||
|
||
/** | ||
|
@@ -91,7 +92,7 @@ class errormanager { | |
* @param int|null $errorcode error code | ||
* @return string error label | ||
*/ | ||
public static function get_error_label(int $errorcode = null) : string { | ||
public static function get_error_label(int $errorcode = null): string { | ||
// If no error code provided, return unknown error. | ||
if (!isset($errorcode)) { | ||
return self::ERROR_TYPES_LABEL[self::ERROR_UNKNOWN]; | ||
|
@@ -106,7 +107,7 @@ public static function get_error_label(int $errorcode = null) : string { | |
* @param string|null $errorstring | ||
* @return int | ||
*/ | ||
public static function identify_error(string $errorstring = null) : int { | ||
public static function identify_error(string $errorstring = null): int { | ||
// If no error string provided, return unknown error. | ||
if (!isset($errorstring)) { | ||
return self::ERROR_UNKNOWN; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
* @author Alex Yeung <[email protected]> | ||
*/ | ||
class privacy_provider_test extends \advanced_testcase { | ||
|
||
protected function setUp(): void { | ||
parent::setUp(); | ||
$this->resetAfterTest(); | ||
|
@@ -39,7 +40,7 @@ protected function setUp(): void { | |
* @return void | ||
* @throws \coding_exception | ||
*/ | ||
public function test_get_reason() { | ||
public function test_get_reason(): void { | ||
$reason = get_string(provider::get_reason(), 'local_sitsgradepush'); | ||
$this->assertEquals('This plugin does not store any personal data.', $reason); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters