| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Summary view] [Print] [Text view]
1 <?php // $Id: edit.php,v 1.21.2.1 2007/11/02 16:20:22 tjhunt Exp $ 2 /** 3 * Page to edit the question bank 4 * 5 * TODO: add logging 6 * 7 * @author Martin Dougiamas and many others. This has recently been extensively 8 * rewritten by Gustav Delius and other members of the Serving Mathematics project 9 * {@link http://maths.york.ac.uk/serving_maths} 10 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License 11 * @package questionbank 12 */ 13 14 require_once("../config.php"); 15 require_once ("editlib.php"); 16 17 list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) = question_edit_setup('questions'); 18 19 question_showbank_actions($thispageurl, $cm); 20 21 $context = $contexts->lowest(); 22 $streditingquestions = get_string('editquestions', "quiz"); 23 if ($cm!==null) { 24 $strupdatemodule = has_capability('moodle/course:manageactivities', $contexts->lowest()) 25 ? update_module_button($cm->id, $COURSE->id, get_string('modulename', $cm->modname)) 26 : ""; 27 $navlinks = array(); 28 $navlinks[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$COURSE->id", 'type' => 'activity'); 29 $navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?id={$cm->id}", 'type' => 'title'); 30 $navlinks[] = array('name' => $streditingquestions, 'link' => '', 'type' => 'title'); 31 $navigation = build_navigation($navlinks); 32 print_header_simple($streditingquestions, '', $navigation, "", "", true, $strupdatemodule); 33 34 $currenttab = 'edit'; 35 $mode = 'questions'; 36 ${$cm->modname} = $module; 37 include($CFG->dirroot."/mod/$cm->modname/tabs.php"); 38 } else { 39 // Print basic page layout. 40 $navlinks = array(); 41 $navlinks[] = array('name' => $streditingquestions, 'link' => '', 'type' => 'title'); 42 $navigation = build_navigation($navlinks); 43 44 print_header_simple($streditingquestions, '', $navigation); 45 46 // print tabs 47 $currenttab = 'questions'; 48 include ('tabs.php'); 49 } 50 51 52 echo '<table class="boxaligncenter" border="0" cellpadding="2" cellspacing="0">'; 53 echo '<tr><td valign="top">'; 54 55 question_showbank('questions', $contexts, $thispageurl, $cm, $pagevars['qpage'], $pagevars['qperpage'], $pagevars['qsortorder'], $pagevars['qsortorderdecoded'], 56 $pagevars['cat'], $pagevars['recurse'], $pagevars['showhidden'], $pagevars['showquestiontext']); 57 58 echo '</td></tr>'; 59 echo '</table>'; 60 61 print_footer($COURSE); 62 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |