mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
"MDL-14129, fixed hardcoded print_header"
This commit is contained in:
parent
7e76b9e8db
commit
53e242f9d1
@ -139,6 +139,7 @@ $string['cannotupdaterole'] = 'Cannot update role!';
|
||||
$string['cannotupdatemod'] = 'Could not update $a';
|
||||
$string['cannotupdatemodcap'] = 'Could not update $a capabilities!';
|
||||
$string['cannotupdateuser'] = 'Updating user failed';
|
||||
$string['cannotupdateusermsgpref'] = 'Updating user failed';
|
||||
$string['cannotupdateuseronexauth'] = 'Failed to update user data on external auth: $a. See the server logs for more details.';
|
||||
$string['cannotupdatepasswordonextauth'] = 'Failed to update password on external auth: $a. See the server logs for more details.';
|
||||
$string['cannotupdateplugincap'] = 'Could not update $a capabilities!';
|
||||
|
@ -18,6 +18,7 @@ $string['context'] = 'context';
|
||||
$string['disabled'] = 'Messaging is disabled on this site';
|
||||
$string['deletemessagesdays'] = 'Number of days before old messages are automatically deleted';
|
||||
$string['discussion'] = 'Discussion';
|
||||
$string['errorcallingprocessor'] = 'Error calling defined processor';
|
||||
$string['emailmessages'] = 'Email messages when I am offline';
|
||||
$string['emailtagline'] = 'This email is a copy of a message sent to you at \"$a\"';
|
||||
$string['emptysearchstring'] = 'You must search for something';
|
||||
|
@ -43,7 +43,7 @@ $userid = optional_param('id', $USER->id, PARAM_INT); // user id
|
||||
$course = optional_param('course', SITEID, PARAM_INT); // course id (defaults to Site)
|
||||
|
||||
if (!$course = $DB->get_record('course', array('id' => $course))) {
|
||||
error('Course ID was incorrect');
|
||||
print_error('invalidcourseid');
|
||||
}
|
||||
|
||||
if ($course->id != SITEID) {
|
||||
@ -62,7 +62,7 @@ if (isguestuser()) {
|
||||
}
|
||||
|
||||
if (!$user = $DB->get_record('user', array('id' => $userid))) {
|
||||
error('User ID was incorrect');
|
||||
print_error('invaliduserid');
|
||||
}
|
||||
|
||||
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
@ -121,13 +121,13 @@ if ( ($form = data_submitted()) && confirm_sesskey()) {
|
||||
$pclass = new $processclass();
|
||||
$pclass->process_form($form, $preferences);
|
||||
} else{
|
||||
error('Error calling defined processor');
|
||||
print_error('errorcallingprocessor', 'message');
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Save all the new preferences to the database
|
||||
if (!set_user_preferences( $preferences, $user->id ) ){
|
||||
error('Error updating user message preferences');
|
||||
print_error('cannotupdateusermsgpref');
|
||||
}
|
||||
|
||||
redirect("$CFG->wwwroot/message/edit.php?id=$user->id&course=$course->id");
|
||||
@ -163,7 +163,7 @@ foreach ( $processors as $processorid => $processor){
|
||||
$pclass = new $processclass();
|
||||
$pclass->load_data($preferences, $user->id);
|
||||
} else{
|
||||
error('Error calling defined processor');
|
||||
print_error('errorcallingprocessor', 'message');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -249,7 +249,7 @@ foreach ( $processors as $processorid => $processor){
|
||||
$pclass = new $processclass();
|
||||
$pclass->config_form($preferences);
|
||||
} else{
|
||||
error('Error calling defined processor');
|
||||
print_error('errorcallingprocessor', 'message');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user