Skip to content

Commit

Permalink
MDL-33624 lang - remove incosistent use of placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Jul 12, 2012
1 parent 2cbdaa7 commit 19a8646
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion blog/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
}

if (!$course = $DB->get_record('course', array('id'=>$group->courseid))) {
print_error(get_string('invalidcourseid', 'blog'));
print_error('invalidcourseid');
}

$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
Expand Down
4 changes: 2 additions & 2 deletions course/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
$strcategories = get_string("categories");

if (! $course = $DB->get_record("course", array("id"=>$id))) {
print_error("invalidcourseid", 'error', '', $id);
print_error("invalidcourseid");
}
if ($site->id == $course->id) {
// can not delete frontpage!
print_error("invalidcourseid", 'error', '', $id);
print_error("invalidcourseid");
}

$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
Expand Down
2 changes: 1 addition & 1 deletion course/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ public static function duplicate_course($courseid, $fullname, $shortname, $categ
// Context validation.

if (! ($course = $DB->get_record('course', array('id'=>$params['courseid'])))) {
throw new moodle_exception('invalidcourseid', 'error', '', $params['courseid']);
throw new moodle_exception('invalidcourseid', 'error');
}

// Category where duplicated course is going to be created.
Expand Down
2 changes: 1 addition & 1 deletion enrol/authorize/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

/// Get course
if (!($course = $DB->get_record('course', array('id'=>$courseid)))) {
print_error('invalidcourseid', '', '', $courseid);
print_error('invalidcourseid');
}

/// Only SITE users can access to this page
Expand Down
2 changes: 1 addition & 1 deletion lang/en/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
$string['invalidconfirmdata'] = 'Invalid confirmation data';
$string['invalidcontext'] = 'Invalid context';
$string['invalidcourse'] = 'Invalid course';
$string['invalidcourseid'] = 'You are trying to use an invalid course ID: ({$a})';
$string['invalidcourseid'] = 'You are trying to use an invalid course ID';
$string['invalidcourselevel'] = 'Incorrect context level';
$string['invalidcoursemodule'] = 'Invalid course module ID';
$string['invalidcoursenameshort'] = 'Invalid short course name';
Expand Down
1 change: 0 additions & 1 deletion lang/en/notes.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
$string['editnote'] = 'Edit note';
$string['enablenotes'] = 'Enable notes';
$string['groupaddnewnote'] = 'Add a common note';
$string['invalidcourseid'] = 'Invalid course id: {$a}';
$string['invalidid'] = 'Invalid note ID specified';
$string['invaliduserid'] = 'Invalid user id: {$a}';
$string['nocontent'] = 'Note content can not be empty';
Expand Down
2 changes: 1 addition & 1 deletion mod/data/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}

if(! $course = $DB->get_record('course', array('id'=>$cm->course))) {
print_error('invalidcourseid', '', '', $cm->course);
print_error('invalidcourseid');
}

// fill in missing properties needed for updating of instance
Expand Down
2 changes: 1 addition & 1 deletion notes/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static function create_notes($notes = array()) {
//check the course exists
if (empty($courses[$note['courseid']])) {
$success = false;
$errormessage = get_string('invalidcourseid', 'notes', $note['courseid']);
$errormessage = get_string('invalidcourseid', 'error');
} else {
// Ensure the current user is allowed to run this function
$context = get_context_instance(CONTEXT_COURSE, $note['courseid']);
Expand Down

0 comments on commit 19a8646

Please sign in to comment.