mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 20:06:46 +02:00
Merge branch 'moodleurl_out_as_local_url' of git://git.luns.net.uk/moodle
This commit is contained in:
commit
d37d6e2a8e
7 changed files with 37 additions and 7 deletions
|
@ -561,7 +561,7 @@ if (!$quiz_reordertool) {
|
|||
$randomform = new quiz_add_random_form(new moodle_url('/mod/quiz/addrandom.php'), $contexts);
|
||||
$randomform->set_data(array(
|
||||
'category' => $pagevars['cat'],
|
||||
'returnurl' => str_replace($CFG->wwwroot, '', $thispageurl->out(false)),
|
||||
'returnurl' => $thispageurl->out_as_local_url(false),
|
||||
'cmid' => $cm->id,
|
||||
));
|
||||
?>
|
||||
|
|
|
@ -453,7 +453,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
|
|||
|
||||
$pageopen = false;
|
||||
|
||||
$returnurl = str_replace($CFG->wwwroot, '', $pageurl->out(false));
|
||||
$returnurl = $pageurl->out_as_local_url(false);
|
||||
$questiontotalcount = count($order);
|
||||
|
||||
foreach ($order as $count => $qnum) {
|
||||
|
@ -731,7 +731,7 @@ function quiz_print_pagecontrols($quiz, $pageurl, $page, $hasattempts, $defaultc
|
|||
$returnurladdtoquiz = new moodle_url($pageurl, array('addonpage' => $page));
|
||||
|
||||
// Print a button linking to the choose question type page.
|
||||
$returnurladdtoquiz = str_replace($CFG->wwwroot, '', $returnurladdtoquiz->out(false));
|
||||
$returnurladdtoquiz = $returnurladdtoquiz->out_as_local_url(false);
|
||||
$newquestionparams = array('returnurl' => $returnurladdtoquiz,
|
||||
'cmid' => $quiz->cmid, 'appendqnumstring' => 'addquestion');
|
||||
create_new_question_button($defaultcategoryid, $newquestionparams,
|
||||
|
|
|
@ -829,7 +829,7 @@ function quiz_question_edit_button($cmid, $question, $returnurl, $contentafteric
|
|||
// Build the icon.
|
||||
if ($action) {
|
||||
if ($returnurl instanceof moodle_url) {
|
||||
$returnurl = str_replace($CFG->wwwroot, '', $returnurl->out(false));
|
||||
$returnurl = $returnurl->out_as_local_url(false);
|
||||
}
|
||||
$questionparams = array('returnurl' => $returnurl, 'cmid' => $cmid, 'id' => $question->id);
|
||||
$questionurl = new moodle_url("$CFG->wwwroot/question/question.php", $questionparams);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue