Merge branch 'MDL-49985_master' of git://github.com/markn86/moodle

Conflicts:
	mod/forum/post.php
This commit is contained in:
Andrew Nicols
2015-05-06 11:11:21 +08:00
17 changed files with 22 additions and 54 deletions
+1 -3
View File
@@ -186,9 +186,7 @@ if (!$choiceformshown) {
echo $OUTPUT->box_start('generalbox', 'notice');
echo '<p align="center">'. get_string('notenrolledchoose', 'choice') .'</p>';
echo $OUTPUT->container_start('continuebutton');
echo $OUTPUT->single_button(new moodle_url('/enrol/index.php?',
array('id' => $course->id, 'returnurl' => $PAGE->url)),
get_string('enrolme', 'core_enrol', $courseshortname));
echo $OUTPUT->single_button(new moodle_url('/enrol/index.php?', array('id'=>$course->id)), get_string('enrolme', 'core_enrol', $courseshortname));
echo $OUTPUT->container_end();
echo $OUTPUT->box_end();
+6 -7
View File
@@ -118,7 +118,9 @@ if (!empty($forum)) { // User is starting a new discussion in a forum
if (enrol_selfenrol_available($course->id)) {
$SESSION->wantsurl = qualified_me();
$SESSION->enrolcancel = clean_param($_SERVER['HTTP_REFERER'], PARAM_LOCALURL);
redirect($CFG->wwwroot.'/enrol/index.php?id='.$course->id, get_string('youneedtoenrol'));
redirect(new moodle_url('/enrol/index.php', array('id' => $course->id,
'returnurl' => '/mod/forum/view.php?f=' . $forum->id)),
get_string('youneedtoenrol'));
}
}
}
@@ -187,12 +189,9 @@ if (!empty($forum)) { // User is starting a new discussion in a forum
if (!is_enrolled($coursecontext)) { // User is a guest here!
$SESSION->wantsurl = qualified_me();
$SESSION->enrolcancel = clean_param($_SERVER['HTTP_REFERER'], PARAM_LOCALURL);
redirect(new moodle_url('/enrol/index.php', array(
'id' => $course->id,
'returnurl' => new moodle_url('/mod/forum/view.php',
array('f' => $forum->id))
)),
get_string('youneedtoenrol'));
redirect(new moodle_url('/enrol/index.php', array('id' => $course->id,
'returnurl' => '/mod/forum/view.php?f=' . $forum->id)),
get_string('youneedtoenrol'));
}
}
print_error('nopostforum', 'forum');