Commit 9a3adb20 authored by David Mudrak's avatar David Mudrak
Browse files

NOMDL forum: fixed the string wording to match the current code condition

Previous string was used together with the legacy:guest capability.
However, the current code checks is_enrolled() instead. This led to a
weird situation when non-enrolled admin or manager could not subscribe
to a forum and the error message was completely confusing for them.
parent 99eb51d9
......@@ -238,7 +238,6 @@ $string['noattachments'] = 'There are no attachments to this post';
$string['nodiscussions'] = 'There are no discussion topics yet in this forum';
$string['nodiscussionsstartedby'] = 'No discussions started by this user';
$string['noguestpost'] = 'Sorry, guests are not allowed to post.';
$string['noguestsubscribe'] = 'Sorry, guests are not allowed to subscribe to receive forum postings by email.';
$string['noguesttracking'] = 'Sorry, guests are not allowed to set tracking options.';
$string['nomorepostscontaining'] = 'No more posts containing \'{$a}\' were found';
$string['nonews'] = 'No news has been posted yet';
......@@ -340,6 +339,7 @@ $string['startedby'] = 'Started by';
$string['subject'] = 'Subject';
$string['subscribe'] = 'Subscribe to this forum';
$string['subscribeall'] = 'Subscribe everyone to this forum';
$string['subscribeenrolledonly'] = 'Sorry, only enrolled users are allowed to subscribe to receive forum postings by email.';
$string['subscribed'] = 'Subscribed';
$string['subscribenone'] = 'Unsubscribe everyone from this forum';
$string['subscribers'] = 'Subscribers';
......@@ -78,7 +78,7 @@ if (!is_enrolled($context)) { // Guests and visitors can't subscribe - only en
echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string('noguestsubscribe', 'forum').'<br /><br />'.get_string('liketologin'),
echo $OUTPUT->confirm(get_string('subscribeenrolledonly', 'forum').'<br /><br />'.get_string('liketologin'),
get_login_url(), new moodle_url('/mod/forum/view.php', array('f'=>$id)));
echo $OUTPUT->footer();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment