Skip to content

Commit

Permalink
MDL-11304 remerging fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Oct 7, 2007
1 parent fe6e5f3 commit 7e2aced
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mod/forum/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,12 @@
if (! $course = get_record("course", "id", $discussion->course)) {
error("The course number was incorrect ($discussion->course)");
}
if (! $cm = get_coursemodule_from_instance("forum", $forum->id, $course->id)) {
error("Incorrect cm");
}

$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$cm = get_coursemodule_from_instance("forum", $forum->id, $course->id);
$modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
$modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);

if (! forum_user_can_post($forum)) {
if (has_capability('moodle/legacy:guest', $coursecontext, NULL, false)) { // User is a guest here!
Expand Down

0 comments on commit 7e2aced

Please sign in to comment.