mirror of
https://github.com/moodle/moodle.git
synced 2025-04-17 22:45:54 +02:00
MDL-19808 Added set_url and fixed minor bugs
This commit is contained in:
parent
29b64a2272
commit
d355865942
@ -12,6 +12,14 @@
|
||||
$mark = optional_param('mark', '', PARAM_ALPHA); // Used for tracking read posts if user initiated.
|
||||
$postid = optional_param('postid', 0, PARAM_INT); // Used for tracking read posts if user initiated.
|
||||
|
||||
$PAGE->set_url('/mod/forum/post.php', array(
|
||||
'd' => $d,
|
||||
'parent' => $parent,
|
||||
'mode' => $mode,
|
||||
'mark' => $mark,
|
||||
'postid' => $postid
|
||||
));
|
||||
|
||||
if (!$discussion = $DB->get_record('forum_discussions', array('id' => $d))) {
|
||||
print_error('invaliddiscussionid', 'forum');
|
||||
}
|
||||
|
@ -14,6 +14,16 @@
|
||||
$confirm = optional_param('confirm', 0, PARAM_INT);
|
||||
$groupid = optional_param('groupid', null, PARAM_INT);
|
||||
|
||||
$PAGE->set_url('/mod/forum/post.php', array(
|
||||
'reply' => $reply,
|
||||
'forum' => $forum,
|
||||
'edit' => $edit,
|
||||
'delete'=> $delete,
|
||||
'prune' => $prune,
|
||||
'name' => $name,
|
||||
'confirm'=>$confirm,
|
||||
'groupid'=>$groupid,
|
||||
));
|
||||
//these page_params will be passed as hidden variables later in the form.
|
||||
$page_params = array('reply'=>$reply, 'forum'=>$forum, 'edit'=>$edit);
|
||||
|
||||
@ -52,7 +62,7 @@
|
||||
|
||||
$PAGE->set_title($course->shortname);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->confirm(get_string('noguestpost', 'forum').'<br /><br />'.get_string('liketologin'), get_login_url(), get_referer(false));
|
||||
echo $OUTPUT->footer();
|
||||
@ -748,8 +758,10 @@
|
||||
|
||||
$forcefocus = empty($reply) ? NULL : 'message';
|
||||
|
||||
if (!empty($discussion->id)) {
|
||||
$PAGE->navbar->add(format_string($toppost->subject, true), "discuss.php?d=$discussion->id");
|
||||
}
|
||||
|
||||
$PAGE->navbar->add(format_string($toppost->subject, true), "discuss.php?d=$discussion->id");
|
||||
if ($post->parent) {
|
||||
$PAGE->navbar->add(get_string('editing', 'forum'));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user