1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-25 10:26:17 +02:00

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

This commit is contained in:
Dan Poltawski 2013-01-25 12:35:40 +08:00
commit ebf6e8f60a
4 changed files with 12 additions and 4 deletions

@ -220,7 +220,7 @@ class block_completionstatus extends block_base {
$this->content->footer = '<br><a href="'.$details->out().'">'.get_string('moredetails', 'completion').'</a>';
} else {
// If user is not enrolled, show error
$this->content->text = get_string('notenroled', 'completion');
$this->content->text = get_string('nottracked', 'completion');
}
if (has_capability('report/completion:view', $context)) {

@ -87,7 +87,7 @@ class block_selfcompletion extends block_base {
// Check this user is enroled
if (!$info->is_tracked_user($USER->id)) {
$this->content->text = get_string('notenroled', 'completion');
$this->content->text = get_string('nottracked', 'completion');
return $this->content;
}

@ -45,6 +45,11 @@ if ($courseid) {
require_login($course);
$completion = new completion_info($course);
if (!$completion->is_enabled()) {
throw new moodle_exception('completionnotenabled', 'completion');
} elseif (!$completion->is_tracked_user($USER->id)) {
throw new moodle_exception('nottracked', 'completion');
}
// Check if we are marking a user complete via the completion report
$user = optional_param('user', 0, PARAM_INT);
@ -136,7 +141,9 @@ if (isguestuser() or !confirm_sesskey()) {
// Now change state
$completion = new completion_info($course);
if (!$completion->is_enabled()) {
die;
throw new moodle_exception('completionnotenabled', 'completion');
} elseif (!$completion->is_tracked_user($USER->id)) {
throw new moodle_exception('nottracked', 'completion');
}
// Check completion state is manual

@ -135,9 +135,10 @@ $string['markcomplete']='Mark complete';
$string['markedcompleteby']='Marked complete by {$a}';
$string['markingyourselfcomplete']='Marking yourself complete';
$string['moredetails']='More details';
$string['notcompleted'] = 'Not completed';
$string['nocriteriaset']='No completion criteria set for this course';
$string['notcompleted'] = 'Not completed';
$string['notenroled']='You are not enrolled in this course';
$string['nottracked']='You are currently not being tracked by completion in this course';
$string['notyetstarted']='Not yet started';
$string['overallcriteriaaggregation']='Overall criteria type aggregation';
$string['pending']='Pending';