MDL-70731 mod_forum: Fix moodle_exception error messages
This commit is contained in:
@@ -45,14 +45,14 @@ $discussionvault = $vaultfactory->get_discussion_vault();
|
||||
$discussion = $discussionvault->get_from_id($d);
|
||||
|
||||
if (!$discussion) {
|
||||
throw new \moodle_exception('Unable to find discussion with id ' . $discussionid);
|
||||
throw new \moodle_exception('errordiscussionnotfound', 'mod_forum');
|
||||
}
|
||||
|
||||
$forumvault = $vaultfactory->get_forum_vault();
|
||||
$forum = $forumvault->get_from_id($discussion->get_forum_id());
|
||||
|
||||
if (!$forum) {
|
||||
throw new \moodle_exception('Unable to find forum with id ' . $discussion->get_forum_id());
|
||||
throw new \moodle_exception('errorforumnotfound', 'mod_forum');
|
||||
}
|
||||
|
||||
$course = $forum->get_course_record();
|
||||
|
||||
@@ -258,11 +258,13 @@ $string['emaildigesttype_help'] = 'The type of notification that you will receiv
|
||||
* Digest - subjects only - you will receive one digest e-mail per day containing just the subject of each forum post.
|
||||
';
|
||||
$string['emptymessage'] = 'Something was wrong with your post. Perhaps you left it blank, or the attachment was too big. Your changes have NOT been saved.';
|
||||
$string['errorcannotlock'] = 'You do not have the permission to lock discussions.';
|
||||
$string['errordiscussionnotfound'] = 'The discussion was not found';
|
||||
$string['erroremptymessage'] = 'Post message cannot be empty';
|
||||
$string['erroremptysubject'] = 'Post subject cannot be empty.';
|
||||
$string['errorenrolmentrequired'] = 'You must be enrolled in this course to access this content';
|
||||
$string['errorforumnotfound'] = 'The forum that this discussion belongs to was not found';
|
||||
$string['errorwhiledelete'] = 'An error occurred while deleting record.';
|
||||
$string['errorcannotlock'] = 'You do not have the permission to lock discussions.';
|
||||
$string['eventassessableuploaded'] = 'Some content has been posted.';
|
||||
$string['everyonecanchoose'] = 'Everyone can choose to be subscribed';
|
||||
$string['everyonecannowchoose'] = 'Everyone can now choose to be subscribed';
|
||||
|
||||
Reference in New Issue
Block a user