Skip to content

Commit

Permalink
user/policy: MDL-23812 set PAGE context and appropriately use moodle_…
Browse files Browse the repository at this point in the history
…url for button

Thanks to Myles Carrick for the patch!
  • Loading branch information
danpoltawski committed Aug 15, 2010
1 parent b3f5291 commit e6cdc5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion user/policy.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
$strpolicyagreement = get_string('policyagreement');
$strpolicyagreementclick = get_string('policyagreementclick');

$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
$PAGE->set_title($strpolicyagreement);
$PAGE->set_heading($SITE->fullname);
$PAGE->navbar->add($strpolicyagreement);
Expand All @@ -82,7 +83,7 @@
echo '</object></div>';

$formcontinue = new single_button(new moodle_url('policy.php', array('agree'=>1)), get_string('yes'));
$formcancel = new single_button($CFG->wwwroot.'/login/logout.php', get_string('no'));
$formcancel = new single_button(new moodle_url($CFG->wwwroot.'/login/logout.php', array('agree'=>0)), get_string('no'));
echo $OUTPUT->confirm($strpolicyagree, $formcontinue, $formcancel);

echo $OUTPUT->footer();
Expand Down

0 comments on commit e6cdc5e

Please sign in to comment.