From ef2b45a9776d032c8cd37c7afff8b2e2b4b92e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Tue, 6 Mar 2018 16:10:32 +0100 Subject: [PATCH] MDL-58179 lesson: Avoid using span with class "label" --- mod/lesson/locallib.php | 2 +- mod/lesson/pagetypes/branchtable.php | 4 ++-- mod/lesson/pagetypes/matching.php | 22 +++++++++++----------- mod/lesson/pagetypes/multichoice.php | 14 +++++++------- mod/lesson/pagetypes/numerical.php | 14 +++++++------- mod/lesson/pagetypes/shortanswer.php | 14 +++++++------- mod/lesson/pagetypes/truefalse.php | 14 +++++++------- 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index a5898c1b0bc..47a50697ad7 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -4711,7 +4711,7 @@ abstract class lesson_page extends lesson_base { $i = 1; foreach ($answers as $answer) { $cells = array(); - $cells[] = "".get_string("jump", "lesson")." $i: "; + $cells[] = ''; $cells[] = $this->get_jump_name($answer->jumpto); $table->data[] = new html_table_row($cells); if ($i === 1){ diff --git a/mod/lesson/pagetypes/branchtable.php b/mod/lesson/pagetypes/branchtable.php index 23f9c58de7c..2c2f5b21f8d 100644 --- a/mod/lesson/pagetypes/branchtable.php +++ b/mod/lesson/pagetypes/branchtable.php @@ -234,12 +234,12 @@ class lesson_page_type_branchtable extends lesson_page { continue; } $cells = array(); - $cells[] = "".get_string("branch", "lesson")." $i: "; + $cells[] = ''; $cells[] = format_text($answer->answer, $answer->answerformat, $options); $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("jump", "lesson")." $i: "; + $cells[] = ''; $cells[] = $this->get_jump_name($answer->jumpto); $table->data[] = new html_table_row($cells); diff --git a/mod/lesson/pagetypes/matching.php b/mod/lesson/pagetypes/matching.php index c43f7005f44..3a686df74a7 100644 --- a/mod/lesson/pagetypes/matching.php +++ b/mod/lesson/pagetypes/matching.php @@ -258,9 +258,9 @@ class lesson_page_type_matching extends lesson_page { if ($answer->answer != null) { $cells = array(); if ($n == 0) { - $cells[] = "".get_string("correctresponse", "lesson").''; + $cells[] = ''; } else { - $cells[] = "".get_string("wrongresponse", "lesson").''; + $cells[] = ''; } $cells[] = format_text($answer->answer, $answer->answerformat, $options); $table->data[] = new html_table_row($cells); @@ -268,22 +268,22 @@ class lesson_page_type_matching extends lesson_page { if ($n == 0) { $cells = array(); - $cells[] = ''.get_string("correctanswerscore", "lesson").": "; + $cells[] = ''; $cells[] = $answer->score; $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = ''.get_string("correctanswerjump", "lesson").": "; + $cells[] = ''; $cells[] = $this->get_jump_name($answer->jumpto); $table->data[] = new html_table_row($cells); } elseif ($n == 1) { $cells = array(); - $cells[] = ''.get_string("wronganswerscore", "lesson").": "; + $cells[] = ''; $cells[] = $answer->score; $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = ''.get_string("wronganswerjump", "lesson").": "; + $cells[] = ''; $cells[] = $this->get_jump_name($answer->jumpto); $table->data[] = new html_table_row($cells); } @@ -297,19 +297,19 @@ class lesson_page_type_matching extends lesson_page { $cells = array(); if ($this->lesson->custom && $answer->score > 0) { // if the score is > 0, then it is correct - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } else if ($this->lesson->custom) { - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } else if ($this->lesson->jumpto_is_correct($this->properties->id, $answer->jumpto)) { - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } else { - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } $cells[] = format_text($answer->answer, $answer->answerformat, $options); $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = ''.get_string("matchesanswer", "lesson")." $i: "; + $cells[] = ''; $cells[] = format_text($answer->response, $answer->responseformat, $options); $table->data[] = new html_table_row($cells); } diff --git a/mod/lesson/pagetypes/multichoice.php b/mod/lesson/pagetypes/multichoice.php index cb758ff08a9..54186adf9e4 100644 --- a/mod/lesson/pagetypes/multichoice.php +++ b/mod/lesson/pagetypes/multichoice.php @@ -277,30 +277,30 @@ class lesson_page_type_multichoice extends lesson_page { $cells = array(); if ($this->lesson->custom && $answer->score > 0) { // if the score is > 0, then it is correct - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } else if ($this->lesson->custom) { - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } else if ($this->lesson->jumpto_is_correct($this->properties->id, $answer->jumpto)) { // underline correct answers - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = '' . get_string('answer', 'lesson') . ' ' . $i . ': \n'; } else { - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } $cells[] = format_text($answer->answer, $answer->answerformat, $options); $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("response", "lesson")." $i"; + $cells[] = ''; $cells[] = format_text($answer->response, $answer->responseformat, $options); $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("score", "lesson").''; + $cells[] = ''; $cells[] = $answer->score; $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("jump", "lesson").''; + $cells[] = ''; $cells[] = $this->get_jump_name($answer->jumpto); $table->data[] = new html_table_row($cells); if ($i === 1){ diff --git a/mod/lesson/pagetypes/numerical.php b/mod/lesson/pagetypes/numerical.php index d1dc8c8b578..930aded00b3 100644 --- a/mod/lesson/pagetypes/numerical.php +++ b/mod/lesson/pagetypes/numerical.php @@ -139,30 +139,30 @@ class lesson_page_type_numerical extends lesson_page { $cells = array(); if ($this->lesson->custom && $answer->score > 0) { // if the score is > 0, then it is correct - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } else if ($this->lesson->custom) { - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } else if ($this->lesson->jumpto_is_correct($this->properties->id, $answer->jumpto)) { // underline correct answers - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = '' . get_string('answer', 'lesson') . ' ' . $i . ': \n'; } else { - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } $cells[] = format_text($answer->answer, $answer->answerformat, $options); $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("response", "lesson")." $i"; + $cells[] = ''; $cells[] = format_text($answer->response, $answer->responseformat, $options); $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("score", "lesson").''; + $cells[] = ''; $cells[] = $answer->score; $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("jump", "lesson").''; + $cells[] = ''; $cells[] = $this->get_jump_name($answer->jumpto); $table->data[] = new html_table_row($cells); if ($i === 1){ diff --git a/mod/lesson/pagetypes/shortanswer.php b/mod/lesson/pagetypes/shortanswer.php index cda674023f5..2db96916431 100644 --- a/mod/lesson/pagetypes/shortanswer.php +++ b/mod/lesson/pagetypes/shortanswer.php @@ -199,30 +199,30 @@ class lesson_page_type_shortanswer extends lesson_page { $cells = array(); if ($this->lesson->custom && $answer->score > 0) { // if the score is > 0, then it is correct - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } else if ($this->lesson->custom) { - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } else if ($this->lesson->jumpto_is_correct($this->properties->id, $answer->jumpto)) { // underline correct answers - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = '' . get_string('answer', 'lesson') . ' ' . $i . ': \n'; } else { - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } $cells[] = format_text($answer->answer, $answer->answerformat, $options); $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("response", "lesson")." $i"; + $cells[] = ''; $cells[] = format_text($answer->response, $answer->responseformat, $options); $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("score", "lesson").''; + $cells[] = ''; $cells[] = $answer->score; $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("jump", "lesson").''; + $cells[] = ''; $cells[] = $this->get_jump_name($answer->jumpto); $table->data[] = new html_table_row($cells); if ($i === 1){ diff --git a/mod/lesson/pagetypes/truefalse.php b/mod/lesson/pagetypes/truefalse.php index f8dd81f0c25..448c8ba4f38 100644 --- a/mod/lesson/pagetypes/truefalse.php +++ b/mod/lesson/pagetypes/truefalse.php @@ -124,30 +124,30 @@ class lesson_page_type_truefalse extends lesson_page { $cells = array(); if ($this->lesson->custom && $answer->score > 0) { // if the score is > 0, then it is correct - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } else if ($this->lesson->custom) { - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } else if ($this->lesson->jumpto_is_correct($this->properties->id, $answer->jumpto)) { // underline correct answers - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = '' . get_string('answer', 'lesson') . ' ' . $i . ': \n'; } else { - $cells[] = ''.get_string("answer", "lesson")." $i: \n"; + $cells[] = ''; } $cells[] = format_text($answer->answer, $answer->answerformat, $options); $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("response", "lesson")." $i"; + $cells[] = ''; $cells[] = format_text($answer->response, $answer->responseformat, $options); $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("score", "lesson").''; + $cells[] = ''; $cells[] = $answer->score; $table->data[] = new html_table_row($cells); $cells = array(); - $cells[] = "".get_string("jump", "lesson").''; + $cells[] = ''; $cells[] = $this->get_jump_name($answer->jumpto); $table->data[] = new html_table_row($cells);