Skip to content

Commit 2336b6e

Browse files
Add small info in discussion overview if forum is in review mode
1 parent 7d05c7c commit 2336b6e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lang/en/moodleoverflow.php

+2
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@
425425
$string['nothing'] = 'Nothing';
426426
$string['questions'] = 'Questions';
427427
$string['questions_and_posts'] = 'Questions and answers';
428+
$string['desc:review_questions'] = 'All questions are going to be reviewed by a teacher before being published';
429+
$string['desc:review_everything'] = 'All questions and answers are going to be reviewed by a teacher before being published.';
428430
$string['allowreview'] = 'Allow moderated forums';
429431
$string['allowreview_desc'] = 'Allow teachers to enable that all posts (or only all questions) have to be reviewed by them in order to be published.';
430432
$string['amount_waiting_for_review'] = '{$a} post(s) need to be reviewed!';

view.php

+9
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@
100100
echo html_writer::tag('p', get_string($strkeys[$moodleoverflow->anonymous], 'moodleoverflow'));
101101
}
102102

103+
$reviewlevel = \mod_moodleoverflow\review::get_review_level($moodleoverflow);
104+
if ($reviewlevel > 0) {
105+
$strkeys = [
106+
\mod_moodleoverflow\review::QUESTIONS => 'desc:review_questions',
107+
\mod_moodleoverflow\review::EVERYTHING => 'desc:review_everything'
108+
];
109+
echo html_writer::tag('p', get_string($strkeys[$reviewlevel], 'moodleoverflow'));
110+
}
111+
103112
// Show the description of the instance.
104113
if (!empty($moodleoverflow->intro)) {
105114
echo $OUTPUT->box(format_module_intro('moodleoverflow', $moodleoverflow, $cm->id), 'generalbox', 'intro');

0 commit comments

Comments
 (0)