Skip to content

Commit

Permalink
MDL-80965 mod_quiz: Code style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyatregubov committed Sep 18, 2024
1 parent 97e90f2 commit 9c0e3c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions mod/quiz/classes/structure.php
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,7 @@ public function add_random_questions(int $addonpage, int $number, array $filterc
* @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])) {
Expand All @@ -1738,7 +1738,7 @@ public function describe_random_slot($slotid) {
/**
* 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();
}
Expand All @@ -1747,7 +1747,7 @@ protected function ensure_random_slot_info_loaded() {
/**
* 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.
Expand Down
3 changes: 2 additions & 1 deletion mod/quiz/lang/en/quiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,8 @@
$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.';
Expand Down

0 comments on commit 9c0e3c8

Please sign in to comment.