diff --git a/mod/lesson/lang/en/lesson.php b/mod/lesson/lang/en/lesson.php index fe1cf25434d40..7898e78264fcf 100644 --- a/mod/lesson/lang/en/lesson.php +++ b/mod/lesson/lang/en/lesson.php @@ -338,6 +338,7 @@ $string['processerror'] = 'Error occurred during processing!'; $string['progressbar'] = 'Progress bar'; $string['progressbar_help'] = 'If enabled, a bar is displayed at the bottom of lesson pages showing approximate percentage of completion.'; +$string['progresscompleted'] = 'You have completed {$a}% of the lesson'; $string['progressbarteacherwarning'] = 'Progress bar does not display for {$a}'; $string['progressbarteacherwarning2'] = 'You will not see the progress bar because you can edit this lesson'; $string['qtype'] = 'Page type'; diff --git a/mod/lesson/renderer.php b/mod/lesson/renderer.php index ff322325c8174..fc1c99e42c2cc 100644 --- a/mod/lesson/renderer.php +++ b/mod/lesson/renderer.php @@ -539,20 +539,10 @@ public function progress_bar(lesson $lesson) { } // print out the Progress Bar. Attempted to put as much as possible in the style sheets. - $cells = array(); - if ($progress != 0) { // some browsers do not repsect the 0 width. - $cells[0] = new html_table_cell(); - $cells[0]->style = 'width:'.$progress.'%'; - $cells[0]->attributes['class'] = 'progress_bar_completed'; - $cells[0]->text = ' '; - } - $cells[] = '
'; - - $table = new html_table(); - $table->attributes['class'] = 'progress_bar_table'; - $table->data = array(new html_table_row($cells)); + $content = '