Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-26190' of git://github.com/srynot4sale/moodle

  • Loading branch information...
commit 9f3813016cd6536c173368e399451fe0f4cdee5e 2 parents 34700d6 + 0b15b43
Eloy Lafuente (stronk7) stronk7 authored
4 blocks/completionstatus/block_completionstatus.php
View
@@ -49,6 +49,7 @@ public function get_content() {
// Don't display if completion isn't enabled!
if (!$this->page->course->enablecompletion) {
+ $this->content->text = get_string('completionnotenabled', 'block_completionstatus');
return $this->content;
}
@@ -58,6 +59,7 @@ public function get_content() {
// Check if this course has any criteria
if (empty($completions)) {
+ $this->content->text = get_string('nocriteria', 'block_completionstatus');
return $this->content;
}
@@ -157,7 +159,7 @@ public function get_content() {
// Is course complete?
$coursecomplete = $info->is_course_complete($USER->id);
-
+
// Load course completion
$params = array(
'userid' => $USER->id,
2  blocks/selfcompletion/block_selfcompletion.php
View
@@ -54,6 +54,7 @@ public function get_content() {
// Don't display if completion isn't enabled!
if (!$this->page->course->enablecompletion) {
+ $this->content->text = get_string('completionnotenabled', 'block_selfcompletion');
return $this->content;
}
@@ -68,6 +69,7 @@ public function get_content() {
// Check if self completion is one of this course's criteria
if (empty($completion)) {
+ $this->content->text = get_string('selfcompletionnotenabled', 'block_selfcompletion');
return $this->content;
}
2  blocks/selfcompletion/lang/en/block_selfcompletion.php
View
@@ -26,3 +26,5 @@
$string['selfcompletion'] = 'Self completion';
$string['pluginname'] = 'Self completion';
$string['completecourse'] = 'Complete course';
+$string['completionnotenabled'] = 'Course completion is not enabled';
+$string['selfcompletionnotenabled'] = 'The self completion criteria has not been enabled for this course';
Please sign in to comment.
Something went wrong with that request. Please try again.