From: thepurpleblob Date: Fri, 18 Jun 2004 12:59:06 +0000 (+0000) Subject: Added functions to only display categories that the user is actually X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2ceec2d6be52acf32b610d59d283162478256b48;p=moodle.git Added functions to only display categories that the user is actually allowed to edit. Used in question edit screens --- diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 3197a3c26a..27da0de875 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -1331,6 +1331,26 @@ function quiz_print_category_form($course, $current) { echo ""; } +function quiz_category_select_menu($courseid,$published=false,$only_editable=false) { +/// displays a select menu of categories with appended coursenames +/// optionaly non editable categories may be excluded +/// added Howard Miller June '04 + // get sql fragment for published + $publishsql=""; + if ($published) { + $publishsql = "or publish=1"; + } + $categories = get_records_select("quiz_categories","course=$courseid $publishsql"); + echo "\n"; +} function quiz_get_category_coursename($category) { /// if the category is published, adds on the course