diff --git a/mod/lesson/backup/moodle2/backup_lesson_activity_task.class.php b/mod/lesson/backup/moodle2/backup_lesson_activity_task.class.php
index 40d0dbdae8e..c8c377bac72 100644
--- a/mod/lesson/backup/moodle2/backup_lesson_activity_task.class.php
+++ b/mod/lesson/backup/moodle2/backup_lesson_activity_task.class.php
@@ -75,11 +75,6 @@ class backup_lesson_activity_task extends backup_activity_task {
$replacement = '$@LESSONESSAY*$1@$';
$content = preg_replace($pattern, $replacement, $content);
- // Provides the interface for viewing and adding high scores
- $pattern = '#'.$base.'/highscores\.php\?id=([0-9]+)#';
- $replacement = '$@LESSONHIGHSCORES*$1@$';
- $content = preg_replace($pattern, $replacement, $content);
-
// Provides the interface for viewing the report
$pattern = '#'.$base.'/report\.php\?id=([0-9]+)#';
$replacement = '$@LESSONREPORT*$1@$';
diff --git a/mod/lesson/backup/moodle2/backup_lesson_stepslib.php b/mod/lesson/backup/moodle2/backup_lesson_stepslib.php
index cf6c1b81f24..c2351c85839 100644
--- a/mod/lesson/backup/moodle2/backup_lesson_stepslib.php
+++ b/mod/lesson/backup/moodle2/backup_lesson_stepslib.php
@@ -20,11 +20,11 @@
*
* This is the "graphical" structure of the lesson module:
*
- * lesson ---------->-------------|------------>---------|----------->----------|----------->----------|
- * (CL,pk->id) | | | |
- * | | | | |
- * | lesson_grades lesson_high_scores lesson_timer lesson_overrides
- * | (UL, pk->id,fk->lessonid) (UL, pk->id,fk->lessonid) (UL, pk->id,fk->lessonid) (UL, pk->id,fk->lessonid)
+ * lesson ---------->-------------|------------>---------|----------->----------|
+ * (CL,pk->id) | | |
+ * | | | |
+ * | lesson_grades lesson_timer lesson_overrides
+ * | (UL, pk->id,fk->lessonid) (UL, pk->id,fk->lessonid) (UL, pk->id,fk->lessonid)
* | |
* | |
* | |
@@ -67,7 +67,7 @@ class backup_lesson_activity_structure_step extends backup_activity_structure_st
// The lesson table
// This table contains all of the goodness for the lesson module, quite
// alot goes into it but nothing relational other than course when will
- // need to be corrected upon restore
+ // need to be corrected upon restore.
$lesson = new backup_nested_element('lesson', array('id'), array(
'course', 'name', 'intro', 'introformat', 'practice', 'modattempts',
'usepassword', 'password',
@@ -76,12 +76,9 @@ class backup_lesson_activity_structure_step extends backup_activity_structure_st
'minquestions', 'maxpages', 'timelimit', 'retake', 'activitylink',
'mediafile', 'mediaheight', 'mediawidth', 'mediaclose', 'slideshow',
'width', 'height', 'bgcolor', 'displayleft', 'displayleftif', 'progressbar',
- 'showhighscores', 'maxhighscores', 'available', 'deadline', 'timemodified',
+ 'available', 'deadline', 'timemodified',
'completionendreached', 'completiontimespent'
));
- // Tell the lesson element about the showhighscores elements mapping to the highscores
- // database field.
- $lesson->set_source_alias('highscores', 'showhighscores');
// The lesson_pages table
// Grouped within a `pages` element, important to note that page is relational
@@ -130,14 +127,6 @@ class backup_lesson_activity_structure_step extends backup_activity_structure_st
'userid','grade','late','completed'
));
- // The lesson_high_scores table
- // Grouped by a highscores element this is relational to the lesson, user,
- // and possibly a grade.
- $highscores = new backup_nested_element('highscores');
- $highscore = new backup_nested_element('highscore', array('id'), array(
- 'gradeid','userid','nickname'
- ));
-
// The lesson_timer table
// Grouped by a `timers` element this is relational to the lesson and user.
$timers = new backup_nested_element('timers');
@@ -162,8 +151,6 @@ class backup_lesson_activity_structure_step extends backup_activity_structure_st
$branches->add_child($branch);
$lesson->add_child($grades);
$grades->add_child($grade);
- $lesson->add_child($highscores);
- $highscores->add_child($highscore);
$lesson->add_child($timers);
$timers->add_child($timer);
$lesson->add_child($overrides);
@@ -184,11 +171,10 @@ class backup_lesson_activity_structure_step extends backup_activity_structure_st
// Check if we are also backing up user information
if ($this->get_setting_value('userinfo')) {
// Set the source table for elements that are reliant on the user
- // lesson_attempts, lesson_branch, lesson_grades, lesson_high_scores, lesson_timer
+ // lesson_attempts, lesson_branch, lesson_grades, lesson_timer.
$attempt->set_source_table('lesson_attempts', array('answerid' => backup::VAR_PARENTID));
$branch->set_source_table('lesson_branch', array('pageid' => backup::VAR_PARENTID));
$grade->set_source_table('lesson_grades', array('lessonid'=>backup::VAR_PARENTID));
- $highscore->set_source_table('lesson_high_scores', array('lessonid' => backup::VAR_PARENTID));
$timer->set_source_table('lesson_timer', array('lessonid' => backup::VAR_PARENTID));
} else {
$overrideparams['userid'] = backup_helper::is_sqlparam(null); // Without userinfo, skip user overrides.
@@ -200,7 +186,6 @@ class backup_lesson_activity_structure_step extends backup_activity_structure_st
$attempt->annotate_ids('user', 'userid');
$branch->annotate_ids('user', 'userid');
$grade->annotate_ids('user', 'userid');
- $highscore->annotate_ids('user', 'userid');
$timer->annotate_ids('user', 'userid');
$override->annotate_ids('user', 'userid');
$override->annotate_ids('group', 'groupid');
diff --git a/mod/lesson/backup/moodle2/restore_lesson_activity_task.class.php b/mod/lesson/backup/moodle2/restore_lesson_activity_task.class.php
index b769452407f..3f4f8a1669b 100644
--- a/mod/lesson/backup/moodle2/restore_lesson_activity_task.class.php
+++ b/mod/lesson/backup/moodle2/restore_lesson_activity_task.class.php
@@ -70,7 +70,6 @@ class restore_lesson_activity_task extends restore_activity_task {
$rules[] = new restore_decode_rule('LESSONEDIT', '/mod/lesson/edit.php?id=$1', 'course_module');
$rules[] = new restore_decode_rule('LESSONESAY', '/mod/lesson/essay.php?id=$1', 'course_module');
- $rules[] = new restore_decode_rule('LESSONHIGHSCORES', '/mod/lesson/highscores.php?id=$1', 'course_module');
$rules[] = new restore_decode_rule('LESSONREPORT', '/mod/lesson/report.php?id=$1', 'course_module');
$rules[] = new restore_decode_rule('LESSONMEDIAFILE', '/mod/lesson/mediafile.php?id=$1', 'course_module');
$rules[] = new restore_decode_rule('LESSONVIEWBYID', '/mod/lesson/view.php?id=$1', 'course_module');
@@ -99,8 +98,6 @@ class restore_lesson_activity_task extends restore_activity_task {
$rules[] = new restore_log_rule('lesson', 'view grade', 'essay.php?id={course_module}', '[name]');
$rules[] = new restore_log_rule('lesson', 'update grade', 'essay.php?id={course_module}', '[name]');
$rules[] = new restore_log_rule('lesson', 'update email essay grade', 'essay.php?id={course_module}', '[name]');
- $rules[] = new restore_log_rule('lesson', 'update highscores', 'highscores.php?id={course_module}', '[name]');
- $rules[] = new restore_log_rule('lesson', 'view highscores', 'highscores.php?id={course_module}', '[name]');
return $rules;
}
diff --git a/mod/lesson/backup/moodle2/restore_lesson_stepslib.php b/mod/lesson/backup/moodle2/restore_lesson_stepslib.php
index afd5ee386e0..38a33a4ebcf 100644
--- a/mod/lesson/backup/moodle2/restore_lesson_stepslib.php
+++ b/mod/lesson/backup/moodle2/restore_lesson_stepslib.php
@@ -66,12 +66,14 @@ class restore_lesson_activity_structure_step extends restore_activity_structure_
$data->deadline = $this->apply_date_offset($data->deadline);
$data->timemodified = $this->apply_date_offset($data->timemodified);
- // lesson->highscores can come both in data->highscores and
- // data->showhighscores, handle both. MDL-26229
+ // The lesson->highscore code was removed in MDL-49581.
+ // Remove it if found in the backup file.
if (isset($data->showhighscores)) {
- $data->highscores = $data->showhighscores;
unset($data->showhighscores);
}
+ if (isset($data->highscores)) {
+ unset($data->highscores);
+ }
// Supply items that maybe missing from previous versions.
if (!isset($data->completionendreached)) {
@@ -178,15 +180,8 @@ class restore_lesson_activity_structure_step extends restore_activity_structure_
}
protected function process_lesson_highscore($data) {
- global $DB;
-
- $data = (object)$data;
- $oldid = $data->id;
- $data->lessonid = $this->get_new_parentid('lesson');
- $data->userid = $this->get_mappingid('user', $data->userid);
- $data->gradeid = $this->get_mappingid('lesson_grade', $data->gradeid);
-
- $newitemid = $DB->insert_record('lesson_high_scores', $data);
+ // Do not process any high score data.
+ // high scores were removed in Moodle 3.0 See MDL-49581.
}
protected function process_lesson_timer($data) {
diff --git a/mod/lesson/classes/event/highscore_added.php b/mod/lesson/classes/event/highscore_added.php
index 9d9f2506f21..e5d9513f97f 100644
--- a/mod/lesson/classes/event/highscore_added.php
+++ b/mod/lesson/classes/event/highscore_added.php
@@ -18,6 +18,7 @@
* The mod_lesson highscore added event.
*
* @package mod_lesson
+ * @deprecated since Moodle 3.0
* @copyright 2013 Mark Nelson Essay prompt:
-
-
Do you want to start at the last page you saw?';
-$string['youmadehighscore'] = 'You made it on the top {$a} high scores list.';
$string['youranswer'] = 'Your answer';
$string['yourcurrentgradeis'] = 'Your current grade is {$a}';
$string['yourcurrentgradeisoutof'] = 'Your current grade is {$a->grade} out of {$a->total}';
@@ -523,3 +511,18 @@ $string['youshouldview'] = 'You should answer at least: {$a}';
$string['essayemailmessage'] = '{$a->question}
Your response:
{$a->response}
{$a->teacher}\'s comments:
{$a->comment}
You have received {$a->earned} out of {$a->outof} for this essay question.
Your grade for the lesson has been changed to {$a->newgrade}%.
'; $string['lessonattempted'] = 'Lesson attempted'; + +// Deprecated since Moodle 3.0. +$string['clicktopost'] = 'Click here to post your grade on the High Scores list.'; +$string['configmaxhighscores'] = 'Number of high scores displayed'; +$string['displayhighscores'] = 'Display high scores'; +$string['entername'] = 'Enter a nickname for the high scores list'; +$string['eventhighscoreadded'] = 'Highscore added'; +$string['eventhighscoresviewed'] = 'Highscores viewed'; +$string['highscores'] = 'High scores'; +$string['maxhighscores'] = 'Number of high scores displayed'; +$string['nothighscore'] = 'You did not make the top {$a} high scores list.'; +$string['topscorestitle'] = 'Top {$a} high scores'; +$string['viewhighscores'] = 'View high scores list'; +$string['youmadehighscore'] = 'You made it on the top {$a} high scores list.'; + diff --git a/mod/lesson/lib.php b/mod/lesson/lib.php index 9869d27afee..bc87c9eb4b9 100644 --- a/mod/lesson/lib.php +++ b/mod/lesson/lib.php @@ -930,7 +930,6 @@ function lesson_reset_userdata($data) { } $DB->delete_records_select('lesson_timer', "lessonid IN ($lessonssql)", $params); - $DB->delete_records_select('lesson_high_scores', "lessonid IN ($lessonssql)", $params); $DB->delete_records_select('lesson_grades', "lessonid IN ($lessonssql)", $params); $DB->delete_records_select('lesson_attempts', "lessonid IN ($lessonssql)", $params); $DB->delete_records_select('lesson_branch', "lessonid IN ($lessonssql)", $params); @@ -1127,10 +1126,6 @@ function lesson_extend_settings_navigation($settings, $lessonnode) { $lessonnode->add(get_string('manualgrading', 'lesson'), $url); } - if ($PAGE->activityrecord->highscores) { - $url = new moodle_url('/mod/lesson/highscores.php', array('id'=>$PAGE->cm->id)); - $lessonnode->add(get_string('highscores', 'lesson'), $url); - } } /** diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index 2dfd017cf7f..668d76ccdd7 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -967,8 +967,6 @@ abstract class lesson_add_page_form_base extends moodleform { * @property int $displayleft Display a left menu * @property int $displayleftif Sets the condition on which the left menu is displayed * @property int $progressbar Flag to toggle display of a lesson progress bar - * @property int $highscores Flag to toggle collection of high scores - * @property int $maxhighscores Number of high scores to limit to * @property int $available Timestamp of when this lesson becomes available * @property int $deadline Timestamp of when this lesson is no longer available * @property int $timemodified Timestamp when lesson was last modified @@ -1056,7 +1054,6 @@ class lesson extends lesson_base { $DB->delete_records("lesson_grades", array("lessonid"=>$this->properties->id)); $DB->delete_records("lesson_timer", array("lessonid"=>$this->properties->id)); $DB->delete_records("lesson_branch", array("lessonid"=>$this->properties->id)); - $DB->delete_records("lesson_high_scores", array("lessonid"=>$this->properties->id)); if ($events = $DB->get_records('event', array("modulename"=>'lesson', "instance"=>$this->properties->id))) { foreach($events as $event) { $event = calendar_event::load($event); diff --git a/mod/lesson/mediafile.php b/mod/lesson/mediafile.php index faf3d317430..a699da7cf2c 100644 --- a/mod/lesson/mediafile.php +++ b/mod/lesson/mediafile.php @@ -74,7 +74,6 @@ echo $lessonoutput->header($lesson, $cm); /// Check lesson availability /// Check for password /// Check dependencies -/// Check for high scores if (!$canmanage) { if (!$lesson->is_accessible()) { // Deadline restrictions echo $lessonoutput->header($lesson, $cm); @@ -91,20 +90,12 @@ if (!$canmanage) { // with or without md5 for backward compatibility (MDL-11090) $USER->lessonloggedin[$lesson->id] = true; $correctpass = true; - if ($lesson->highscores) { - // Logged in - redirect so we go through all of these checks before starting the lesson. - redirect("$CFG->wwwroot/mod/lesson/view.php?id=$cm->id"); - } } else if (isset($lesson->extrapasswords)) { // Group overrides may have additional passwords. foreach ($lesson->extrapasswords as $password) { if (strcmp($password, md5(trim($userpassword))) === 0 || strcmp($password, trim($userpassword)) === 0) { $correctpass = true; $USER->lessonloggedin[$lesson->id] = true; - if ($lesson->highscores) { - // Logged in - redirect so we go through all of these checks before starting the lesson. - redirect("$CFG->wwwroot/mod/lesson/view.php?id=$cm->id"); - } } } } diff --git a/mod/lesson/mod_form.php b/mod/lesson/mod_form.php index d64cfe64f05..efbe1a32030 100644 --- a/mod/lesson/mod_form.php +++ b/mod/lesson/mod_form.php @@ -77,11 +77,6 @@ class mod_lesson_mod_form extends moodleform_mod { $mform->setType('mediaclose', PARAM_BOOL); $mform->setDefault('mediaclose', $CFG->lesson_mediaclose); - /** Legacy maximum highscores element to maintain backwards compatibility */ - $mform->addElement('hidden', 'maxhighscores'); - $mform->setType('maxhighscores', PARAM_INT); - $mform->setDefault('maxhighscores', $CFG->lesson_maxhighscores); - $mform->addElement('text', 'name', get_string('name'), array('size'=>'64')); if (!empty($CFG->formatstringstriptags)) { $mform->setType('name', PARAM_TEXT); diff --git a/mod/lesson/renderer.php b/mod/lesson/renderer.php index 0a8dd036c43..1e536ce898d 100644 --- a/mod/lesson/renderer.php +++ b/mod/lesson/renderer.php @@ -601,24 +601,4 @@ class mod_lesson_renderer extends plugin_renderer_base { $output = html_writer::tag('p', $contents, $attributes); return $output; } - /** - * Returns HTML to display add_highscores_form - * @param lesson $lesson - * @return string - */ - public function add_highscores_form(lesson $lesson) { - global $CFG; - $output = $this->output->box_start('generalbox boxaligncenter'); - $output .= $this->output->box_start('mdl-align'); - $output .= '"; - $output .= $this->output->box_end(); - $output .= $this->output->box_end(); - return $output; - } } diff --git a/mod/lesson/report.php b/mod/lesson/report.php index b325a08c2eb..2ac4c762371 100644 --- a/mod/lesson/report.php +++ b/mod/lesson/report.php @@ -82,7 +82,7 @@ if ($action === 'delete') { $DB->delete_records('lesson_timer', array('id' => $timer->id)); } - /// Remove the grade from the grades and high_scores tables - this is silly, it should be linked to specific attempt (skodak) + // Remove the grade from the grades tables - this is silly, it should be linked to specific attempt (skodak). $grades = $DB->get_records_sql("SELECT id FROM {lesson_grades} WHERE userid = :userid AND lessonid = :lessonid ORDER BY completed", $params, $try, 1); @@ -90,7 +90,6 @@ if ($action === 'delete') { if ($grades) { $grade = reset($grades); $DB->delete_records('lesson_grades', array('id' => $grade->id)); - $DB->delete_records('lesson_high_scores', array('gradeid' => $grade->id, 'lessonid' => $lesson->id, 'userid' => $userid)); } /// Remove attempts and update the retry number diff --git a/mod/lesson/settings.php b/mod/lesson/settings.php index 3a9cb9cce7a..7e762d2daf9 100644 --- a/mod/lesson/settings.php +++ b/mod/lesson/settings.php @@ -48,10 +48,6 @@ if ($ADMIN->fulltree) { $settings->add(new admin_setting_configcheckbox('lesson_mediaclose', get_string('mediaclose', 'lesson'), get_string('configmediaclose', 'lesson'), false, PARAM_TEXT)); - /** Misc lesson settings */ - $settings->add(new admin_setting_configtext('lesson_maxhighscores', get_string('maxhighscores', 'lesson'), - get_string('configmaxhighscores','lesson'), 10, PARAM_INT)); - /** Default lesson settings */ $numbers = array(); for ($i=20; $i>1; $i--) { diff --git a/mod/lesson/tabs.php b/mod/lesson/tabs.php index ee5ac24dde8..e3b385746ff 100644 --- a/mod/lesson/tabs.php +++ b/mod/lesson/tabs.php @@ -57,9 +57,6 @@ if (has_capability('mod/lesson:viewreports', $context)) { if (has_capability('mod/lesson:grade', $context)) { $row[] = new tabobject('essay', "$CFG->wwwroot/mod/lesson/essay.php?id=$cm->id", get_string('manualgrading', 'lesson')); } -if ($lesson->highscores) { - $row[] = new tabobject('highscores', "$CFG->wwwroot/mod/lesson/highscores.php?id=$cm->id", get_string('highscores', 'lesson')); -} $tabs[] = $row; diff --git a/mod/lesson/tests/events_test.php b/mod/lesson/tests/events_test.php index b03f063444d..39f9953e590 100644 --- a/mod/lesson/tests/events_test.php +++ b/mod/lesson/tests/events_test.php @@ -241,6 +241,7 @@ class mod_lesson_events_testcase extends advanced_testcase { 'noob', $this->lesson->properties()->cmid); $this->assertEventLegacyLogData($expected, $event); $this->assertEventContextNotUsed($event); + $this->assertDebuggingCalled(); } /** @@ -270,6 +271,7 @@ class mod_lesson_events_testcase extends advanced_testcase { $this->lesson->properties()->name, $this->lesson->properties()->cmid); $this->assertEventLegacyLogData($expected, $event); $this->assertEventContextNotUsed($event); + $this->assertDebuggingCalled(); } /** diff --git a/mod/lesson/upgrade.txt b/mod/lesson/upgrade.txt index ed16599b6f6..d75bea4067c 100644 --- a/mod/lesson/upgrade.txt +++ b/mod/lesson/upgrade.txt @@ -1,5 +1,8 @@ This files describes API changes in the lesson code. +=== 3.0 === +* Removed broken high score code. Use the activity results block instead. + === 2.9 === * The grade_item_delete function in mod/lesson/lib.php was removed because it was not doing anything and was never called. * A third optional boolean parameter $endreached was added to lesson::update_timer to indicate that end of lesson was reached. This is used by 'completionendreached' custom completion rule. diff --git a/mod/lesson/version.php b/mod/lesson/version.php index 446a72cda20..fc95088654d 100644 --- a/mod/lesson/version.php +++ b/mod/lesson/version.php @@ -24,7 +24,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2015051100; // The current module version (Date: YYYYMMDDXX) +$plugin->version = 2015072000; // The current module version (Date: YYYYMMDDXX) $plugin->requires = 2015050500; // Requires this Moodle version $plugin->component = 'mod_lesson'; // Full name of the plugin (used for diagnostics) $plugin->cron = 0; diff --git a/mod/lesson/view.php b/mod/lesson/view.php index c36637007d3..1f384f0b25e 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -73,7 +73,6 @@ if ($userhasgrade && !$lesson->retake) { /// Check lesson availability /// Check for password /// Check dependencies -/// Check for high scores if (!$canmanage) { if (!$lesson->is_accessible()) { // Deadline restrictions echo $lessonoutput->header($lesson, $cm, '', false, null, get_string('notavailable')); @@ -90,20 +89,13 @@ if (!$canmanage) { // with or without md5 for backward compatibility (MDL-11090) $correctpass = true; $USER->lessonloggedin[$lesson->id] = true; - if ($lesson->highscores) { - // Logged in - redirect so we go through all of these checks before starting the lesson. - redirect("$CFG->wwwroot/mod/lesson/view.php?id=$cm->id"); - } + } else if (isset($lesson->extrapasswords)) { // Group overrides may have additional passwords. foreach ($lesson->extrapasswords as $password) { if (strcmp($password, md5(trim($userpassword))) === 0 || strcmp($password, trim($userpassword)) === 0) { $correctpass = true; $USER->lessonloggedin[$lesson->id] = true; - if ($lesson->highscores) { - // Logged in - redirect so we go through all of these checks before starting the lesson. - redirect("$CFG->wwwroot/mod/lesson/view.php?id=$cm->id"); - } } } } @@ -167,9 +159,6 @@ if (!$canmanage) { exit(); } } - } else if ($lesson->highscores && !$lesson->practice && !optional_param('viewed', 0, PARAM_INT) && empty($pageid)) { - // Display high scores before starting lesson - redirect(new moodle_url('/mod/lesson/highscores.php', array("id"=>$cm->id))); } } @@ -572,41 +561,6 @@ if ($pageid != LESSON_EOL) { } $lessoncontent .= $OUTPUT->box_end(); //End of Lesson button to Continue. - // high scores code - if ($lesson->highscores && !$canmanage && !$lesson->practice) { - $lessoncontent .= $OUTPUT->box_start('center'); - if ($grades = $DB->get_records("lesson_grades", array("lessonid" => $lesson->id), "completed")) { - $madeit = false; - if ($highscores = $DB->get_records("lesson_high_scores", array("lessonid" => $lesson->id))) { - // get all the high scores into an array - $topscores = array(); - $uniquescores = array(); - foreach ($highscores as $highscore) { - $grade = $grades[$highscore->gradeid]->grade; - $topscores[] = $grade; - $uniquescores[$grade] = 1; - } - // sort to find the lowest score - sort($topscores); - $lowscore = $topscores[0]; - - if ($gradeinfo->grade >= $lowscore || count($uniquescores) <= $lesson->maxhighscores) { - $madeit = true; - } - } - if (!$highscores or $madeit) { - $lessoncontent .= $lessonoutput->paragraph(get_string("youmadehighscore", "lesson", $lesson->maxhighscores), 'center'); - $aurl = new moodle_url('/mod/lesson/highscores.php', array('id'=>$PAGE->cm->id, 'sesskey'=>sesskey())); - $lessoncontent .= $OUTPUT->single_button($aurl, get_string('clicktopost', 'lesson')); - } else { - $lessoncontent .= get_string("nothighscore", "lesson", $lesson->maxhighscores)."