File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -831,7 +831,7 @@ private function check_post_exists(int $postid): object {
831831 */
832832 private function check_user_can_create_discussion (): void {
833833 if (!has_capability ('mod/moodleoverflow:startdiscussion ' , $ this ->info ->modulecontext )) {
834- throw new moodle_exception ('cannotcreatediscussion ' , 'moodleoverflow ' );
834+ throw new moodle_exception ('nopostmoodleoverflow ' , 'moodleoverflow ' );
835835 }
836836 }
837837
@@ -894,8 +894,6 @@ private function catch_unenrolled(): void {
894894 'returnurl ' => '/mod/moodleoverflow/view.php?m= ' . $ this ->info ->moodleoverflow ->id , ]),
895895 get_string ('youneedtoenrol ' ));
896896 }
897- // Notify the user, that he can not post a new discussion.
898- throw new moodle_exception ('nopostmoodleoverflow ' , 'moodleoverflow ' );
899897 }
900898 }
901899}
You can’t perform that action at this time.
0 commit comments