mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-19313 Use an existing exception code
This commit is contained in:
parent
229a70996a
commit
15ac57cbc0
@ -45,7 +45,7 @@ $huburl = optional_param('huburl', '', PARAM_URL);
|
|||||||
$password = optional_param('password', '', PARAM_TEXT);
|
$password = optional_param('password', '', PARAM_TEXT);
|
||||||
$hubname = optional_param('hubname', '', PARAM_TEXT);
|
$hubname = optional_param('hubname', '', PARAM_TEXT);
|
||||||
if (empty($huburl) or !confirm_sesskey()) {
|
if (empty($huburl) or !confirm_sesskey()) {
|
||||||
throw new moodle_exception('cannotaccessthispage');
|
throw new moodle_exception('missingparameter');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TO DO
|
/* TO DO
|
||||||
@ -158,4 +158,4 @@ $siteregistrationform->display();
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo $OUTPUT->footer();
|
echo $OUTPUT->footer();
|
||||||
|
@ -50,7 +50,7 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
|
|||||||
$huburl = optional_param('huburl', '', PARAM_URL);
|
$huburl = optional_param('huburl', '', PARAM_URL);
|
||||||
$hubname = optional_param('hubname', '', PARAM_TEXT);
|
$hubname = optional_param('hubname', '', PARAM_TEXT);
|
||||||
if (empty($huburl) or !confirm_sesskey()) {
|
if (empty($huburl) or !confirm_sesskey()) {
|
||||||
throw new moodle_exception('cannotaccessthispage');
|
throw new moodle_exception('missingparameter');
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the publication form
|
//set the publication form
|
||||||
@ -71,4 +71,4 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
|
|||||||
|
|
||||||
echo $OUTPUT->footer();
|
echo $OUTPUT->footer();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
|
|||||||
$huburl = optional_param('huburl', '', PARAM_URL);
|
$huburl = optional_param('huburl', '', PARAM_URL);
|
||||||
$hubname = optional_param('hubname', '', PARAM_TEXT);
|
$hubname = optional_param('hubname', '', PARAM_TEXT);
|
||||||
if (empty($huburl) or !confirm_sesskey()) {
|
if (empty($huburl) or !confirm_sesskey()) {
|
||||||
throw new moodle_exception('cannotaccessthispage');
|
throw new moodle_exception('missingparameter');
|
||||||
}
|
}
|
||||||
|
|
||||||
$advertise = optional_param('advertise', false, PARAM_BOOL);
|
$advertise = optional_param('advertise', false, PARAM_BOOL);
|
||||||
@ -174,4 +174,4 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo $OUTPUT->footer();
|
echo $OUTPUT->footer();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user