MDL-80965 mod_quiz: Code style fixes.

This commit is contained in:
Ilya Tregubov
2024-09-18 15:29:54 +08:00
parent 93dd090c38
commit 674fbe100b
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -1441,7 +1441,7 @@ class structure {
* @param int $slotid id of slot.
* @return string that can be used to display the random slot.
*/
public function describe_random_slot($slotid) {
public function describe_random_slot(int $slotid): string {
$this->ensure_random_slot_info_loaded();
if (!isset($this->randomslotcategories[$slotid])) {
@@ -1465,7 +1465,7 @@ class structure {
/**
* Ensure that {@see load_random_slot_info()} has been called, so the data is available.
*/
protected function ensure_random_slot_info_loaded() {
protected function ensure_random_slot_info_loaded(): void {
if ($this->randomslotcategories == null) {
$this->load_random_slot_info();
}
@@ -1474,7 +1474,7 @@ class structure {
/**
* Load information about the question categories and tags for all random slots,
*/
protected function load_random_slot_info() {
protected function load_random_slot_info(): void {
global $DB;
// Find the random slots.
+2 -1
View File
@@ -813,7 +813,8 @@ $string['randomnumber'] = 'Number of random questions';
$string['randomnosubcat'] = 'Questions from this category only, not its subcategories.';
$string['randomqname'] = 'Random question based on filter condition';
$string['randomqnamecat'] = 'Random ({$a->category}) based on filter condition';
$string['randomqnamecattags'] = 'Random ({$a->category}) based on filter condition with tags: {$a->tags}';$string['randomquestion'] = 'Random question';
$string['randomqnamecattags'] = 'Random ({$a->category}) based on filter condition with tags: {$a->tags}';
$string['randomquestion'] = 'Random question';
$string['randomqnametags'] = 'Random question based on filter condition with tags: {$a}';
$string['randomquestion'] = 'Random question';
$string['randomquestion_help'] = 'A random question is a way of inserting a randomly-chosen question from a specified category or by a specified tag into an activity.';