From 8bccba71e630a8290cf573815809d55ebfeae58e Mon Sep 17 00:00:00 2001 From: pilpi Date: Sat, 22 Nov 2008 12:36:14 +0000 Subject: [PATCH] quiz editing: MDL-17299 Moved function definitions from mod/quiz/edit.php to mod/quiz/editlib.php --- mod/quiz/edit.php | 89 -------------------------------------------- mod/quiz/editlib.php | 89 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 89 deletions(-) diff --git a/mod/quiz/edit.php b/mod/quiz/edit.php index 8837c7de17..c3af13356c 100644 --- a/mod/quiz/edit.php +++ b/mod/quiz/edit.php @@ -118,95 +118,6 @@ function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmo return $out; } -/** - * Add an arbitrary element to array at a specified index, pushing the rest - * back. - * - * @param array $array The array to operate on - * @param mixed $value The element to add - * @param integer $at The position at which to add the element - * @return array - */ -function array_add_at($array,$value,$at){ - $beginpart=array_slice($array, 0,$at); - $endpart=array_slice($array, $at, (count($array)-$at) ); - $beginpart[]=$value; - $result=array_merge($beginpart,$endpart); - return $result; -} -/** - * Prints the form for setting a quiz' overall grade - */ -function quiz_print_grading_form($quiz, $pageurl, $tabindex){ - global $USER; - $strsave=get_string('save',"quiz"); - echo "
"; - echo '
'; - echo "sesskey\" />"; - echo $pageurl->hidden_params_out(); - echo ': "; - echo ''; - echo ''; - echo ''; - helpbutton("maxgrade", get_string("maximumgrade"), "quiz"); - echo '
'; - echo "
\n"; -} -/** - * Print the status bar - * - * @param mixed $quiz The quiz object of the quiz in question - * @param integer $sumgrades The sum of the grades of the quiz to display - */ - -function quiz_print_status_bar($quiz,$sumgrades){ - global $CFG; - $numberofquestions=quiz_number_of_questions_in_quiz($quiz->questions); - ?>
- : - - | - - | - wwwroot/course/mod.php", - array("return"=>"true","update"=>$quiz->cmid, "sesskey"=>sesskey())); - echo '
'; - print_string('updatethis', '', get_string('modulename', 'quiz')); - echo ': '; - if($quiz->shufflequestions){ - echo "*"; - } - echo get_string("shufflequestions",'quiz').": "; - if($quiz->shufflequestions){ - echo get_string("yes"); - } - else{ - echo get_string("no"); - } - echo " | "; - print_string("questionsperpage","quiz"); - $questionsperpagebool = ($quiz->questionsperpage < 1) ? 0 : 1; - if($questionsperpagebool){ - echo ": $quiz->questionsperpage"; - }else{ - echo ": ".get_string("unlimited"); - } - - ?> -
- \n"; } + +/** + * Add an arbitrary element to array at a specified index, pushing the rest + * back. + * + * @param array $array The array to operate on + * @param mixed $value The element to add + * @param integer $at The position at which to add the element + * @return array + */ +function array_add_at($array,$value,$at){ + $beginpart=array_slice($array, 0,$at); + $endpart=array_slice($array, $at, (count($array)-$at) ); + $beginpart[]=$value; + $result=array_merge($beginpart,$endpart); + return $result; +} +/** + * Prints the form for setting a quiz' overall grade + */ +function quiz_print_grading_form($quiz, $pageurl, $tabindex){ + global $USER; + $strsave=get_string('save',"quiz"); + echo "
"; + echo '
'; + echo "sesskey\" />"; + echo $pageurl->hidden_params_out(); + echo ': "; + echo ''; + echo ''; + echo ''; + helpbutton("maxgrade", get_string("maximumgrade"), "quiz"); + echo '
'; + echo "
\n"; +} +/** + * Print the status bar + * + * @param mixed $quiz The quiz object of the quiz in question + * @param integer $sumgrades The sum of the grades of the quiz to display + */ + +function quiz_print_status_bar($quiz,$sumgrades){ + global $CFG; + $numberofquestions=quiz_number_of_questions_in_quiz($quiz->questions); + ?>
+ : + + | + + | + wwwroot/course/mod.php", + array("return"=>"true","update"=>$quiz->cmid, "sesskey"=>sesskey())); + echo '
'; + print_string('updatethis', '', get_string('modulename', 'quiz')); + echo ': '; + if($quiz->shufflequestions){ + echo "*"; + } + echo get_string("shufflequestions",'quiz').": "; + if($quiz->shufflequestions){ + echo get_string("yes"); + } + else{ + echo get_string("no"); + } + echo " | "; + print_string("questionsperpage","quiz"); + $questionsperpagebool = ($quiz->questionsperpage < 1) ? 0 : 1; + if($questionsperpagebool){ + echo ": $quiz->questionsperpage"; + }else{ + echo ": ".get_string("unlimited"); + } + + ?> +
+ \ No newline at end of file -- 2.39.5