MDL-20636 Add @package and GPL boiler-plate to files in /question.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 22 Feb 2011 19:59:12 +0000 (19:59 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 22 Feb 2011 19:59:12 +0000 (19:59 +0000)
58 files changed:
question/addquestion.php
question/category.php
question/category_class.php
question/edit.php
question/export.php
question/format.php
question/format/aiken/format.php
question/format/blackboard/format.php
question/format/blackboard_six/format.php
question/format/examview/format.php
question/format/gift/format.php
question/format/learnwise/format.php
question/format/missingword/format.php
question/format/qti_two/custommediafilter.php
question/format/qti_two/format.php
question/format/qti_two/qt_common.php
question/format/webct/format.php
question/format/xhtml/format.php
question/question.php
question/todo/diffstat.txt
question/type/calculated/datasetdefinitions_form.php
question/type/calculated/datasetitems_form.php
question/type/calculated/db/upgrade.php
question/type/calculated/edit_calculated_form.php
question/type/calculated/questiontype.php
question/type/calculated/version.php
question/type/calculatedmulti/edit_calculatedmulti_form.php
question/type/calculatedmulti/questiontype.php
question/type/calculatedsimple/questiontype.php
question/type/ddwtos/script.js
question/type/ddwtos/version.php
question/type/essay/questiontype.php
question/type/essay/version.php
question/type/gapselect/edit_form_base.php
question/type/gapselect/rendererbase.php
question/type/gapselect/version.php
question/type/match/db/upgrade.php
question/type/match/question.php
question/type/match/questiontype.php
question/type/match/version.php
question/type/multianswer/db/upgrade.php
question/type/multianswer/edit_multianswer_form.php
question/type/multianswer/questiontype.php
question/type/multianswer/version.php
question/type/multichoice/db/upgrade.php
question/type/multichoice/questiontype.php
question/type/multichoice/version.php
question/type/numerical/db/upgrade.php
question/type/numerical/version.php
question/type/opaque/lang/en/qtype_opaque.php
question/type/opaque/questiontype.php
question/type/opaque/settings.php
question/type/randomsamatch/edit_randomsamatch_form.php
question/type/randomsamatch/questiontype.php
question/type/randomsamatch/version.php
question/type/shortanswer/version.php
question/type/truefalse/version.php
question/upgrade.php

index 7287150..b69df45 100644 (file)
@@ -1,35 +1,30 @@
 <?php
 
-///////////////////////////////////////////////////////////////////////////
-//                                                                       //
-// NOTICE OF COPYRIGHT                                                   //
-//                                                                       //
-// Moodle - Modular Object-Oriented Dynamic Learning Environment         //
-//          http://moodle.org                                            //
-//                                                                       //
-// Copyright (C) 1999 onwards Martin Dougiamas  http://dougiamas.com     //
-//                                                                       //
-// This program is free software; you can redistribute it and/or modify  //
-// it under the terms of the GNU General Public License as published by  //
-// the Free Software Foundation; either version 2 of the License, or     //
-// (at your option) any later version.                                   //
-//                                                                       //
-// This program is distributed in the hope that it will be useful,       //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
-// GNU General Public License for more details:                          //
-//                                                                       //
-//          http://www.gnu.org/copyleft/gpl.html                         //
-//                                                                       //
-///////////////////////////////////////////////////////////////////////////
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
  * Shows a screen where the user can choose a question type, before being
  * redirected to question.php
  *
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package questionbank
- *//** */
+ * @package    moodlecore
+ * @subpackage questionbank
+ * @copyright  2009 Tim Hunt
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 
 require_once(dirname(__FILE__) . '/../config.php');
 require_once(dirname(__FILE__) . '/editlib.php');
index 2f60034..03154dc 100644 (file)
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
- * Allows a teacher to create, edit and delete categories
+ * This script allows a teacher to create, edit and delete question categories.
  *
- * @author Martin Dougiamas and many others.
- *         {@link http://moodle.org}
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package questionbank
+ * @package    moodlecore
+ * @subpackage questionbank
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-    require_once("../config.php");
-    require_once($CFG->dirroot."/question/editlib.php");
-    require_once($CFG->dirroot."/question/category_class.php");
 
-    list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
-            question_edit_setup('categories', '/question/category.php');
+require_once("../config.php");
+require_once($CFG->dirroot."/question/editlib.php");
+require_once($CFG->dirroot."/question/category_class.php");
+
+list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
+        question_edit_setup('categories', '/question/category.php');
 
-    // get values from form for actions on this page
-    $param = new stdClass();
-    $param->moveup = optional_param('moveup', 0, PARAM_INT);
-    $param->movedown = optional_param('movedown', 0, PARAM_INT);
-    $param->moveupcontext = optional_param('moveupcontext', 0, PARAM_INT);
-    $param->movedowncontext = optional_param('movedowncontext', 0, PARAM_INT);
-    $param->tocontext = optional_param('tocontext', 0, PARAM_INT);
-    $param->left = optional_param('left', 0, PARAM_INT);
-    $param->right = optional_param('right', 0, PARAM_INT);
-    $param->delete = optional_param('delete', 0, PARAM_INT);
-    $param->confirm = optional_param('confirm', 0, PARAM_INT);
-    $param->cancel = optional_param('cancel', '', PARAM_ALPHA);
-    $param->move = optional_param('move', 0, PARAM_INT);
-    $param->moveto = optional_param('moveto', 0, PARAM_INT);
-    $param->edit = optional_param('edit', 0, PARAM_INT);
+// get values from form for actions on this page
+$param = new stdClass();
+$param->moveup = optional_param('moveup', 0, PARAM_INT);
+$param->movedown = optional_param('movedown', 0, PARAM_INT);
+$param->moveupcontext = optional_param('moveupcontext', 0, PARAM_INT);
+$param->movedowncontext = optional_param('movedowncontext', 0, PARAM_INT);
+$param->tocontext = optional_param('tocontext', 0, PARAM_INT);
+$param->left = optional_param('left', 0, PARAM_INT);
+$param->right = optional_param('right', 0, PARAM_INT);
+$param->delete = optional_param('delete', 0, PARAM_INT);
+$param->confirm = optional_param('confirm', 0, PARAM_INT);
+$param->cancel = optional_param('cancel', '', PARAM_ALPHA);
+$param->move = optional_param('move', 0, PARAM_INT);
+$param->moveto = optional_param('moveto', 0, PARAM_INT);
+$param->edit = optional_param('edit', 0, PARAM_INT);
 
-    $url = new moodle_url($thispageurl);
-    foreach ((array)$param as $key=>$value) {
-        if (($key !== 'cancel' && $value !== 0) || ($key === 'cancel' && $value !== '')) {
-            $url->param($key, $value);
-        }
+$url = new moodle_url($thispageurl);
+foreach ((array)$param as $key=>$value) {
+    if (($key !== 'cancel' && $value !== 0) || ($key === 'cancel' && $value !== '')) {
+        $url->param($key, $value);
     }
-    $PAGE->set_url($url);
-    $PAGE->set_pagelayout('standard');
+}
+$PAGE->set_url($url);
+$PAGE->set_pagelayout('standard');
 
-    $qcobject = new question_category_object($pagevars['cpage'], $thispageurl, $contexts->having_one_edit_tab_cap('categories'), $param->edit, $pagevars['cat'], $param->delete,
-                                $contexts->having_cap('moodle/question:add'));
+$qcobject = new question_category_object($pagevars['cpage'], $thispageurl, $contexts->having_one_edit_tab_cap('categories'), $param->edit, $pagevars['cat'], $param->delete,
+                            $contexts->having_cap('moodle/question:add'));
 
-    $streditingcategories = get_string('editcategories', 'quiz');
-    if ($param->left || $param->right || $param->moveup || $param->movedown|| $param->moveupcontext || $param->movedowncontext){
-        require_sesskey();
-        foreach ($qcobject->editlists as $list){
-            //processing of these actions is handled in the method where appropriate and page redirects.
-            $list->process_actions($param->left, $param->right, $param->moveup, $param->movedown,
-                                    $param->moveupcontext, $param->movedowncontext, $param->tocontext);
-        }
+$streditingcategories = get_string('editcategories', 'quiz');
+if ($param->left || $param->right || $param->moveup || $param->movedown|| $param->moveupcontext || $param->movedowncontext){
+    require_sesskey();
+    foreach ($qcobject->editlists as $list){
+        //processing of these actions is handled in the method where appropriate and page redirects.
+        $list->process_actions($param->left, $param->right, $param->moveup, $param->movedown,
+                                $param->moveupcontext, $param->movedowncontext, $param->tocontext);
     }
-    if ($param->delete && ($questionstomove = $DB->count_records("question", array("category" => $param->delete)))){
-        if (!$category = $DB->get_record("question_categories", array("id" => $param->delete))) {  // security
-            print_error('nocate', 'question', $thispageurl->out(), $param->delete);
-        }
-        $categorycontext = get_context_instance_by_id($category->contextid);
-        $qcobject->moveform = new question_move_form($thispageurl,
-                    array('contexts'=>array($categorycontext), 'currentcat'=>$param->delete));
-        if ($qcobject->moveform->is_cancelled()){
-            redirect($thispageurl);
-        }  elseif ($formdata = $qcobject->moveform->get_data()) {
-            /// 'confirm' is the category to move existing questions to
-            list($tocategoryid, $tocontextid) = explode(',', $formdata->category);
-            $qcobject->move_questions_and_delete_category($formdata->delete, $tocategoryid);
-            $thispageurl->remove_params('cat', 'category');
-            redirect($thispageurl);
-        }
-    } else {
-        $questionstomove = 0;
+}
+if ($param->delete && ($questionstomove = $DB->count_records("question", array("category" => $param->delete)))){
+    if (!$category = $DB->get_record("question_categories", array("id" => $param->delete))) {  // security
+        print_error('nocate', 'question', $thispageurl->out(), $param->delete);
     }
-    if ($qcobject->catform->is_cancelled()) {
-        redirect($thispageurl);
-    } else if ($catformdata = $qcobject->catform->get_data()) {
-        if (!$catformdata->id) {//new category
-            $qcobject->add_category($catformdata->parent, $catformdata->name, $catformdata->info);
-        } else {
-            $qcobject->update_category($catformdata->id, $catformdata->parent, $catformdata->name, $catformdata->info);
-        }
+    $categorycontext = get_context_instance_by_id($category->contextid);
+    $qcobject->moveform = new question_move_form($thispageurl,
+                array('contexts'=>array($categorycontext), 'currentcat'=>$param->delete));
+    if ($qcobject->moveform->is_cancelled()){
         redirect($thispageurl);
-    } else if ((!empty($param->delete) and (!$questionstomove) and confirm_sesskey())) {
-        $qcobject->delete_category($param->delete);//delete the category now no questions to move
+    }  elseif ($formdata = $qcobject->moveform->get_data()) {
+        /// 'confirm' is the category to move existing questions to
+        list($tocategoryid, $tocontextid) = explode(',', $formdata->category);
+        $qcobject->move_questions_and_delete_category($formdata->delete, $tocategoryid);
         $thispageurl->remove_params('cat', 'category');
         redirect($thispageurl);
     }
-
-    if ($param->edit){
-        $PAGE->navbar->add(get_string('editingcategory', 'question'));
+} else {
+    $questionstomove = 0;
+}
+if ($qcobject->catform->is_cancelled()) {
+    redirect($thispageurl);
+} else if ($catformdata = $qcobject->catform->get_data()) {
+    if (!$catformdata->id) {//new category
+        $qcobject->add_category($catformdata->parent, $catformdata->name, $catformdata->info);
+    } else {
+        $qcobject->update_category($catformdata->id, $catformdata->parent, $catformdata->name, $catformdata->info);
     }
+    redirect($thispageurl);
+} else if ((!empty($param->delete) and (!$questionstomove) and confirm_sesskey())) {
+    $qcobject->delete_category($param->delete);//delete the category now no questions to move
+    $thispageurl->remove_params('cat', 'category');
+    redirect($thispageurl);
+}
 
-    $PAGE->set_title($streditingcategories);
-    $PAGE->set_heading($COURSE->fullname);
-    echo $OUTPUT->header();
+if ($param->edit){
+    $PAGE->navbar->add(get_string('editingcategory', 'question'));
+}
 
-    // display UI
-    if (!empty($param->edit)) {
-        $qcobject->edit_single_category($param->edit);
-    } else if ($questionstomove){
-        $qcobject->display_move_form($questionstomove, $category);
-    } else {
-        // display the user interface
-        $qcobject->display_user_interface();
-    }
-    echo $OUTPUT->footer();
+$PAGE->set_title($streditingcategories);
+$PAGE->set_heading($COURSE->fullname);
+echo $OUTPUT->header();
 
+// display UI
+if (!empty($param->edit)) {
+    $qcobject->edit_single_category($param->edit);
+} else if ($questionstomove){
+    $qcobject->display_move_form($questionstomove, $category);
+} else {
+    // display the user interface
+    $qcobject->display_user_interface();
+}
+echo $OUTPUT->footer();
index e40a7d5..08ad7c8 100644 (file)
@@ -1,14 +1,38 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * A class for representing question categories.
+ *
+ * @package    moodlecore
+ * @subpackage questionbank
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 /**
  * Class representing question categories
  *
- * @author Martin Dougiamas and many others. {@link http://moodle.org}
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package questionbank
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
 // number of categories to display on page
-define("QUESTION_PAGE_LENGTH", 25);
+define('QUESTION_PAGE_LENGTH', 25);
 
 require_once($CFG->libdir . '/listlib.php');
 require_once($CFG->dirroot . '/question/category_form.php');
index f19bb1c..ecb3438 100644 (file)
@@ -1,81 +1,75 @@
 <?php
 
-///////////////////////////////////////////////////////////////////////////
-//                                                                       //
-// NOTICE OF COPYRIGHT                                                   //
-//                                                                       //
-// Moodle - Modular Object-Oriented Dynamic Learning Environment         //
-//          http://moodle.org                                            //
-//                                                                       //
-// Copyright (C) 1999 onwards Martin Dougiamas and others                //
-//                                                                       //
-// This program is free software; you can redistribute it and/or modify  //
-// it under the terms of the GNU General Public License as published by  //
-// the Free Software Foundation; either version 2 of the License, or     //
-// (at your option) any later version.                                   //
-//                                                                       //
-// This program is distributed in the hope that it will be useful,       //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
-// GNU General Public License for more details:                          //
-//                                                                       //
-//          http://www.gnu.org/copyleft/gpl.html                         //
-//                                                                       //
-///////////////////////////////////////////////////////////////////////////
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
  * Page to edit the question bank
  *
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package questionbank
+ * @package    moodlecore
+ * @subpackage questionbank
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-    require_once("../config.php");
-    require_once("editlib.php");
 
-    $url = new moodle_url('/question/edit.php');
-    if (($lastchanged = optional_param('lastchanged', 0, PARAM_INT)) !== 0) {
-        $url->param('lastchanged', $lastchanged);
-    }
-    if (($category = optional_param('category', 0, PARAM_TEXT)) !== 0) {
-        $url->param('category', $category);
-    }
-    if (($qpage = optional_param('qpage', 0, PARAM_INT)) !== 0) {
-        $url->param('qpage', $qpage);
-    }
-    if (($cat = optional_param('cat', 0, PARAM_TEXT)) !== 0) {
-        $url->param('cat', $cat);
-    }
-    if (($courseid = optional_param('courseid', 0, PARAM_INT)) !== 0) {
-        $url->param('courseid', $courseid);
-    }
-    if (($returnurl = optional_param('returnurl', 0, PARAM_INT)) !== 0) {
-        $url->param('returnurl', $returnurl);
-    }
-    if (($cmid = optional_param('cmid', 0, PARAM_INT)) !== 0) {
-        $url->param('cmid', $cmid);
-    }
-    $PAGE->set_url($url);
-    $PAGE->set_pagelayout('standard');
+require_once(dirname(__FILE__) . '/../config.php');
+require_once($CFG->dirroot . '/question/editlib.php');
 
-    list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
-            question_edit_setup('questions', '/question/edit.php');
-    $questionbank = new question_bank_view($contexts, $thispageurl, $COURSE, $cm);
-    $questionbank->process_actions();
+$url = new moodle_url('/question/edit.php');
+if (($lastchanged = optional_param('lastchanged', 0, PARAM_INT)) !== 0) {
+    $url->param('lastchanged', $lastchanged);
+}
+if (($category = optional_param('category', 0, PARAM_TEXT)) !== 0) {
+    $url->param('category', $category);
+}
+if (($qpage = optional_param('qpage', 0, PARAM_INT)) !== 0) {
+    $url->param('qpage', $qpage);
+}
+if (($cat = optional_param('cat', 0, PARAM_TEXT)) !== 0) {
+    $url->param('cat', $cat);
+}
+if (($courseid = optional_param('courseid', 0, PARAM_INT)) !== 0) {
+    $url->param('courseid', $courseid);
+}
+if (($returnurl = optional_param('returnurl', 0, PARAM_INT)) !== 0) {
+    $url->param('returnurl', $returnurl);
+}
+if (($cmid = optional_param('cmid', 0, PARAM_INT)) !== 0) {
+    $url->param('cmid', $cmid);
+}
+$PAGE->set_url($url);
+$PAGE->set_pagelayout('standard');
 
-    // TODO log this page view.
+list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
+        question_edit_setup('questions', '/question/edit.php');
+$questionbank = new question_bank_view($contexts, $thispageurl, $COURSE, $cm);
+$questionbank->process_actions();
 
-    $context = $contexts->lowest();
-    $streditingquestions = get_string('editquestions', "quiz");
-    $PAGE->set_title($streditingquestions);
-    $PAGE->set_heading($COURSE->fullname);
-    echo $OUTPUT->header();
+// TODO log this page view.
 
-    echo '<div class="questionbankwindow boxwidthwide boxaligncenter">';
-    $questionbank->display('questions', $pagevars['qpage'],
-            $pagevars['qperpage'], $pagevars['qsortorder'], $pagevars['qsortorderdecoded'],
-            $pagevars['cat'], $pagevars['recurse'], $pagevars['showhidden'], $pagevars['showquestiontext']);
-    echo "</div>\n";
+$context = $contexts->lowest();
+$streditingquestions = get_string('editquestions', "quiz");
+$PAGE->set_title($streditingquestions);
+$PAGE->set_heading($COURSE->fullname);
+echo $OUTPUT->header();
 
-    echo $OUTPUT->footer();
+echo '<div class="questionbankwindow boxwidthwide boxaligncenter">';
+$questionbank->display('questions', $pagevars['qpage'],
+        $pagevars['qperpage'], $pagevars['qsortorder'], $pagevars['qsortorderdecoded'],
+        $pagevars['cat'], $pagevars['recurse'], $pagevars['showhidden'], $pagevars['showquestiontext']);
+echo "</div>\n";
 
+echo $OUTPUT->footer();
index 79f1152..fa97d13 100644 (file)
@@ -1,80 +1,96 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
- * Export quiz questions into the given category
+ * Script for importing questions into the question bank.
  *
- * @author Martin Dougiamas, Howard Miller, and many others.
- *         {@link http://moodle.org}
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package questionbank
- * @subpackage importexport
+ * @package    moodlecore
+ * @subpackage questionbank
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-    require_once("../config.php");
-    require_once("editlib.php");
-    require_once("export_form.php");
 
-    $PAGE->set_pagelayout('standard');
+require_once(dirname(__FILE__) . '/../config.php');
+require_once($CFG->dirroot . '/question/editlib.php');
+require_once($CFG->dirroot . '/question/export_form.php');
 
-    list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
-            question_edit_setup('export', '/question/export.php');
+$PAGE->set_pagelayout('standard');
 
-    // get display strings
-    $strexportquestions = get_string('exportquestions', 'question');
+list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
+        question_edit_setup('export', '/question/export.php');
 
-    // make sure we are using the user's most recent category choice
-    if (empty($categoryid)) {
-        $categoryid = $pagevars['cat'];
-    }
+// get display strings
+$strexportquestions = get_string('exportquestions', 'question');
 
-    list($catid, $catcontext) = explode(',', $pagevars['cat']);
-    if (!$category = $DB->get_record("question_categories", array("id" => $catid, 'contextid' => $catcontext))) {
-        print_error('nocategory','quiz');
-    }
+// make sure we are using the user's most recent category choice
+if (empty($categoryid)) {
+    $categoryid = $pagevars['cat'];
+}
+
+list($catid, $catcontext) = explode(',', $pagevars['cat']);
+if (!$category = $DB->get_record("question_categories", array("id" => $catid, 'contextid' => $catcontext))) {
+    print_error('nocategory','quiz');
+}
+
+/// Header
+$PAGE->set_url($thispageurl->out());
+$PAGE->set_title($strexportquestions);
+$PAGE->set_heading($COURSE->fullname);
+echo $OUTPUT->header();
+
+$export_form = new question_export_form($thispageurl, array('contexts'=>$contexts->having_one_edit_tab_cap('export'), 'defaultcategory'=>$pagevars['cat']));
 
-    /// Header
-    $PAGE->set_url($thispageurl->out());
-    $PAGE->set_title($strexportquestions);
-    $PAGE->set_heading($COURSE->fullname);
-    echo $OUTPUT->header();
-
-    $export_form = new question_export_form($thispageurl, array('contexts'=>$contexts->having_one_edit_tab_cap('export'), 'defaultcategory'=>$pagevars['cat']));
-
-
-    if ($from_form = $export_form->get_data()) {
-        $thiscontext = $contexts->lowest();
-        if (!is_readable("format/$from_form->format/format.php")) {
-            print_error('unknowformat', '', '', $from_form->format);
-        }
-        $withcategories = 'nocategories';
-        if (!empty($from_form->cattofile)) {
-            $withcategories = 'withcategories';
-        }
-        $withcontexts = 'nocontexts';
-        if (!empty($from_form->contexttofile)) {
-            $withcontexts = 'withcontexts';
-        }
-
-        $classname = 'qformat_' . $from_form->format;
-        $qformat = new $classname();
-        $filename = question_default_export_filename($COURSE, $category) .
-                $qformat->export_file_extension();
-        $export_url = question_make_export_url($thiscontext->id, $category->id,
-                $from_form->format, $withcategories, $withcontexts, $filename);
-
-        echo $OUTPUT->box_start();
-        echo get_string('yourfileshoulddownload', 'question', $export_url->out());
-        echo $OUTPUT->box_end();
-
-        $PAGE->requires->js_function_call('document.location.replace', array($export_url->out()), false, 1);
-
-        echo $OUTPUT->continue_button(new moodle_url('edit.php', $thispageurl->params()));
-        echo $OUTPUT->footer();
-        exit;
+
+if ($from_form = $export_form->get_data()) {
+    $thiscontext = $contexts->lowest();
+    if (!is_readable("format/$from_form->format/format.php")) {
+        print_error('unknowformat', '', '', $from_form->format);
+    }
+    $withcategories = 'nocategories';
+    if (!empty($from_form->cattofile)) {
+        $withcategories = 'withcategories';
     }
+    $withcontexts = 'nocontexts';
+    if (!empty($from_form->contexttofile)) {
+        $withcontexts = 'withcontexts';
+    }
+
+    $classname = 'qformat_' . $from_form->format;
+    $qformat = new $classname();
+    $filename = question_default_export_filename($COURSE, $category) .
+            $qformat->export_file_extension();
+    $export_url = question_make_export_url($thiscontext->id, $category->id,
+            $from_form->format, $withcategories, $withcontexts, $filename);
 
-    /// Display export form
-    echo $OUTPUT->heading_with_help($strexportquestions, 'exportquestions', 'question');
+    echo $OUTPUT->box_start();
+    echo get_string('yourfileshoulddownload', 'question', $export_url->out());
+    echo $OUTPUT->box_end();
 
-    $export_form->display();
+    $PAGE->requires->js_function_call('document.location.replace', array($export_url->out()), false, 1);
 
+    echo $OUTPUT->continue_button(new moodle_url('edit.php', $thispageurl->params()));
     echo $OUTPUT->footer();
+    exit;
+}
+
+/// Display export form
+echo $OUTPUT->heading_with_help($strexportquestions, 'exportquestions', 'question');
+
+$export_form->display();
+
+echo $OUTPUT->footer();
index f810c18..494023d 100644 (file)
@@ -1,12 +1,35 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Defines the base class for question import and export formats.
+ *
+ * @package    moodlecore
+ * @subpackage questionbank
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
 /**
  * Base class for question import and export formats.
  *
- * @author Martin Dougiamas, Howard Miller, and many others.
- *         {@link http://moodle.org}
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package questionbank
- * @subpackage importexport
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class qformat_default {
 
index f738938..da9c6ad 100644 (file)
@@ -1,27 +1,29 @@
 <?php
 
-///////////////////////////////////////////////////////////////////////////
-//                                                                       //
-// NOTICE OF COPYRIGHT                                                   //
-//                                                                       //
-// Moodle - Modular Object-Oriented Dynamic Learning Environment         //
-//          http://moodle.org                                            //
-//                                                                       //
-// Copyright (C) 1999 onwards Martin Dougiamas  http://dougiamas.com     //
-//                                                                       //
-// This program is free software; you can redistribute it and/or modify  //
-// it under the terms of the GNU General Public License as published by  //
-// the Free Software Foundation; either version 2 of the License, or     //
-// (at your option) any later version.                                   //
-//                                                                       //
-// This program is distributed in the hope that it will be useful,       //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
-// GNU General Public License for more details:                          //
-//                                                                       //
-//          http://www.gnu.org/copyleft/gpl.html                         //
-//                                                                       //
-///////////////////////////////////////////////////////////////////////////
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Aiken format question importer.
+ *
+ * @package    qformat
+ * @subpackage aiken
+ * @copyright  2003 Tom Robb <tom@robb.net>
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 
 /**
  * Aiken format - a simple format for creating multiple choice questions (with
@@ -44,6 +46,9 @@
  *
  * Be sure to word "All of the above" type choices like "All of these" in
  * case choices are being shuffled.
+ *
+ * @copyright  2003 Tom Robb <tom@robb.net>
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class qformat_aiken extends qformat_default {
 
index 238e179..911cc01 100644 (file)
@@ -1,28 +1,45 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-////////////////////////////////////////////////////////////////////////////
-/// Blackboard 6.0 Format
-///
-/// This Moodle class provides all functions necessary to import and export
-///
-///
-////////////////////////////////////////////////////////////////////////////
-
-// Based on default.php, included by ../import.php
 /**
- * @package questionbank
- * @subpackage importexport
+ * Blackboard question importer.
+ *
+ * @package    qformat
+ * @subpackage blackboard
+ * @copyright  2003 Scott Elliott
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-require_once ("$CFG->libdir/xmlize.php");
 
+
+require_once ($CFG->libdir . '/xmlize.php');
+
+
+/**
+ * Blackboard question importer.
+ *
+ * @copyright  2003 Scott Elliott
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class qformat_blackboard extends qformat_default {
 
     function provide_import() {
         return true;
     }
 
-
   function readquestions ($lines) {
     /// Parses an array of lines into an array of questions,
     /// where each item is a question object as defined by
index 3754d30..ae5070d 100644 (file)
@@ -1,20 +1,39 @@
 <?php
 
-////////////////////////////////////////////////////////////////////////////
-/// Blackboard 6.x Format
-///
-/// This Moodle class provides all functions necessary to import and export
-///
-///
-////////////////////////////////////////////////////////////////////////////
-
-// Based on default.php, included by ../import.php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
- * @package questionbank
- * @subpackage importexport
+ * Blackboard 6.0 question importer.
+ *
+ * @package    qformat
+ * @subpackage blackboard_six
+ * @copyright  2005 Michael Penney
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-require_once ("$CFG->libdir/xmlize.php");
 
+
+require_once ($CFG->libdir . '/xmlize.php');
+
+
+/**
+ * Blackboard 6.0 question importer.
+ *
+ * @copyright  2005 Michael Penney
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class qformat_blackboard_six extends qformat_default {
     function provide_import() {
         return true;
index 29b4644..54aba84 100644 (file)
@@ -1,13 +1,39 @@
 <?php
 
-// Based on default.php, included by ../import.php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
- * @package questionbank
- * @subpackage importexport
+ * Examview question importer.
+ *
+ * @package    qformat
+ * @subpackage examview
+ * @copyright  2005 Howard Miller
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once("$CFG->libdir/xmlize.php");
 
+require_once ($CFG->libdir . '/xmlize.php');
+
+
+/**
+ * Examview question importer.
+ *
+ * @copyright  2005 Howard Miller
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class qformat_examview extends qformat_default {
 
     public $qtypes = array(
index 6d3e4c4..0b31fb6 100644 (file)
@@ -1,39 +1,62 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
 //
-///////////////////////////////////////////////////////////////
-// The GIFT import filter was designed as an easy to use method
-// for teachers writing questions as a text file. It supports most
-// question types and the missing word format.
-//
-// Multiple Choice / Missing Word
-//     Who's buried in Grant's tomb?{~Grant ~Jefferson =no one}
-//     Grant is {~buried =entombed ~living} in Grant's tomb.
-// True-False:
-//     Grant is buried in Grant's tomb.{FALSE}
-// Short-Answer.
-//     Who's buried in Grant's tomb?{=no one =nobody}
-// Numerical
-//     When was Ulysses S. Grant born?{#1822:5}
-// Matching
-//     Match the following countries with their corresponding
-//     capitals.{=Canada->Ottawa =Italy->Rome =Japan->Tokyo}
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
 //
-// Comment lines start with a double backslash (//).
-// Optional question names are enclosed in double colon(::).
-// Answer feedback is indicated with hash mark (#).
-// Percentage answer weights immediately follow the tilde (for
-// multiple choice) or equal sign (for short answer and numerical),
-// and are enclosed in percent signs (% %). See docs and examples.txt for more.
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
 //
-// This filter was written through the collaboration of numerous
-// members of the Moodle community. It was originally based on
-// the missingword format, which included code from Thomas Robb
-// and others. Paul Tsuchido Shew wrote this filter in December 2003.
-//////////////////////////////////////////////////////////////////////////
-// Based on default.php, included by ../import.php
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * GIFT format question importer/exporter.
+ *
+ * @package    qformat
+ * @subpackage gift
+ * @copyright  2003 Paul Tsuchido Shew
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
 /**
- * @package questionbank
- * @subpackage importexport
+ * The GIFT import filter was designed as an easy to use method
+ * for teachers writing questions as a text file. It supports most
+ * question types and the missing word format.
+ *
+ * Multiple Choice / Missing Word
+ *     Who's buried in Grant's tomb?{~Grant ~Jefferson =no one}
+ *     Grant is {~buried =entombed ~living} in Grant's tomb.
+ * True-False:
+ *     Grant is buried in Grant's tomb.{FALSE}
+ * Short-Answer.
+ *     Who's buried in Grant's tomb?{=no one =nobody}
+ * Numerical
+ *     When was Ulysses S. Grant born?{#1822:5}
+ * Matching
+ *     Match the following countries with their corresponding
+ *     capitals.{=Canada->Ottawa =Italy->Rome =Japan->Tokyo}
+ *
+ * Comment lines start with a double backslash (//).
+ * Optional question names are enclosed in double colon(::).
+ * Answer feedback is indicated with hash mark (#).
+ * Percentage answer weights immediately follow the tilde (for
+ * multiple choice) or equal sign (for short answer and numerical),
+ * and are enclosed in percent signs (% %). See docs and examples.txt for more.
+ *
+ * This filter was written through the collaboration of numerous
+ * members of the Moodle community. It was originally based on
+ * the missingword format, which included code from Thomas Robb
+ * and others. Paul Tsuchido Shew wrote this filter in December 2003.
+ *
+ * @copyright  2003 Paul Tsuchido Shew
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class qformat_gift extends qformat_default {
 
index 88b4dd0..039382d 100644 (file)
@@ -1,19 +1,47 @@
 <?php
-// Alton College, Hampshire, UK - Tom Flannaghan, Andrew Walker
-// Imports learnwise multiple choice quizzes (single and multiple answers)
-// currently ignores the deduct attribute for multiple answer questions
-// deductions are currently simply found by dividing the award for the incorrect
-// answer by the total number of options
-// Based on format.php, included by ../../import.php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
- * @package questionbank
- * @subpackage importexport
+ * Examview question importer.
+ *
+ * @package    qformat
+ * @subpackage learnwise
+ * @copyright  2005 Alton College, Hampshire, UK
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+
+/**
+ * Examview question importer.
+ *
+ * Alton College, Hampshire, UK - Tom Flannaghan, Andrew Walker
+ *
+ * Imports learnwise multiple choice quizzes (single and multiple answers)
+ * currently ignores the deduct attribute for multiple answer questions
+ * deductions are currently simply found by dividing the award for the incorrect
+ * answer by the total number of options
+ *
+ * @copyright  2005 Alton College, Hampshire, UK
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class qformat_learnwise extends qformat_default {
 
     function provide_import() {
-      return true;
+        return true;
     }
 
     function readquestions($lines) {
index ce0fd90..a8f09e2 100644 (file)
@@ -1,33 +1,52 @@
 <?php
-/// Modified by Tom Robb 12 June 2003 to include percentage and comment insertion
-/// facility.
-
-////////////////////////////////////////////////////////////////////////////
-/// MISSING WORD FORMAT
-///
-/// This Moodle class provides all functions necessary to import and export
-/// one-correct-answer multiple choice questions in this format:
-///
-///    As soon as we begin to explore our body parts as infants
-///    we become students of {=anatomy and physiology ~reflexology
-///    ~science ~experiment}, and in a sense we remain students for life.
-///
-/// Each answer is separated with a tilde ~, and the correct answer is
-/// prefixed with an equals sign =
-///
-/// Percentage weights can be included by following the tilde with the
-/// desired percent.  Comments can be included for each choice by following
-/// the comment with a hash mark ("#") and the comment.  Example:
-///
-///    This is {=the best answer#comment on the best answer ~75%a good
-///    answer#comment on the good answer ~a wrong one#comment on the bad answer}
-///
-////////////////////////////////////////////////////////////////////////////
-
-// Based on format.php, included by ../../import.php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Missing word question importer.
+ *
+ * @package    qformat
+ * @subpackage missingword
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
 /**
- * @package questionbank
- * @subpackage importexport
+ * Missing word question importer.
+ *
+ * This Moodle class provides all functions necessary to import and export
+ * one-correct-answer multiple choice questions in this format:
+ *
+ *    As soon as we begin to explore our body parts as infants
+ *    we become students of {=anatomy and physiology ~reflexology
+ *    ~science ~experiment}, and in a sense we remain students for life.
+ *
+ * Each answer is separated with a tilde ~, and the correct answer is
+ * prefixed with an equals sign =
+ *
+ * Percentage weights can be included by following the tilde with the
+ * desired percent.  Comments can be included for each choice by following
+ * the comment with a hash mark ("#") and the comment.  Example:
+ *
+ *    This is {=the best answer#comment on the best answer ~75%a good
+ *    answer#comment on the good answer ~a wrong one#comment on the bad answer}
+ *
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class qformat_missingword extends qformat_default {
 
index 5cbdc4b..a6f2202 100644 (file)
@@ -1,11 +1,32 @@
 <?php
 
-// note: modified from the original filter/mediaplugin/filter.php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-// given a href for a movie or sound file, it returns an appropriate tag
 /**
- * @package questionbank
- * @subpackage importexport
+ * Modified from the original filter/mediaplugin/filter.php
+ *
+ * @package    qformat
+ * @subpackage qti_two
+ * @copyright  2005 brian@mediagonal.ch
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Modified from the original filter/mediaplugin/filter.php
  */
 function custom_mediaplugin_filter($text, $width = null, $height = null) {
     global $CFG;
@@ -144,7 +165,3 @@ function custom_mediaplugin_filter($text, $width = null, $height = null) {
     }
     return $text;
 }
-
-
-
-
index eee76a3..a5ae7d1 100644 (file)
@@ -1,19 +1,43 @@
 <?php
 
-require_once("$CFG->dirroot/question/format/qti_two/qt_common.php");
-////////////////////////////////////////////////////////////////////////////
-/// IMS QTI 2.0 FORMAT
-///
-/// HISTORY: created 28.01.2005      brian@mediagonal.ch
-////////////////////////////////////////////////////////////////////////////
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-// Based on format.php, included by ../../import.php
 /**
- * @package questionbank
- * @subpackage importexport
+ * Attempt at a QTI 2 question exporter.
+ *
+ * @package    qformat
+ * @subpackage qti_two
+ * @copyright  2005 brian@mediagonal.ch
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
+
+
+require_once("$CFG->dirroot/question/format/qti_two/qt_common.php");
+
 define('CLOZE_TRAILING_TEXT_ID', 9999999);
 
+
+/**
+ * Attempt at a QTI 2 question exporter.
+ *
+ * Sadly, not very well maintained.
+ *
+ * @copyright  2005 brian@mediagonal.ch
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class qformat_qti_two extends qformat_default {
 
     var $lang;
index 70bef6c..8060bd2 100644 (file)
@@ -1,10 +1,29 @@
 <?php
 
-//***********************************
-// qt_common.php
-//***********************************
-// This contains code common to mediagonal-modified questions
+// This file is part of Moodle - http://moodle.org/
 //
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * This contains code common to mediagonal-modified questions.
+ *
+ * @package    qformat
+ * @subpackage qti_two
+ * @copyright  2005 brian@mediagonal.ch
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 
 /**
  * gets a list of all the media files for the given course
index 3f99ed6..d41859b 100644 (file)
@@ -1,37 +1,36 @@
 <?php
-///////////////////////////////////////////////////////////////////////////
-//                                                                       //
-// WebCT FORMAT                                                          //
-//                                                                       //
-///////////////////////////////////////////////////////////////////////////
-//                                                                       //
-// NOTICE OF COPYRIGHT                                                   //
-//                                                                       //
-// Part of Moodle - Modular Object-Oriented Dynamic Learning Environment //
-//                  http://moodle.com                                    //
-//                                                                       //
-// Copyright (C) 2004 ASP Consulting   http://www.asp-consulting.net     //
-//                                                                       //
-// This program is free software; you can redistribute it and/or modify  //
-// it under the terms of the GNU General Public License as published by  //
-// the Free Software Foundation; either version 2 of the License, or     //
-// (at your option) any later version.                                   //
-//                                                                       //
-// This program is distributed in the hope that it will be useful,       //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
-// GNU General Public License for more details:                          //
-//                                                                       //
-//          http://www.gnu.org/copyleft/gpl.html                         //
-//                                                                       //
-///////////////////////////////////////////////////////////////////////////
-
-// Based on format.php, included by ../../import.php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
- * @package questionbank
- * @subpackage importexport
+ * Web CT question importer.
+ *
+ * @package    qformat
+ * @subpackage webct
+ * @copyright  2004 ASP Consulting http://www.asp-consulting.net
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+
+/**
+ * Web CT question importer.
+ *
+ * @copyright  2004 ASP Consulting http://www.asp-consulting.net
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 function unhtmlentities($string){
     $search = array ("'<script[?>]*?>.*?</script>'si",  // remove javascript
                  "'<[\/\!]*?[^<?>]*?>'si",  // remove HTML tags
index cfa47b9..a085e6b 100644 (file)
@@ -1,8 +1,37 @@
 <?php
-// Based on default.php, included by ../import.php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * XHTML question exporter.
+ *
+ * @package    qformat
+ * @subpackage xhtml
+ * @copyright  2005 Howard Miller
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
 /**
- * @package questionbank
- * @subpackage importexport
+ * XHTML question exporter.
+ *
+ * Exports questions as static HTML.
+ *
+ * @copyright  2005 Howard Miller
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class qformat_xhtml extends qformat_default {
 
index b12ff6c..03d4afc 100644 (file)
@@ -1,13 +1,30 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
- * Page for editing questions using the new form library.
+ * Page for editing questions.
  *
- * @author T.J.Hunt@open.ac.uk
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package questionbank
- *//** */
+ * @package    moodlecore
+ * @subpackage questionbank
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 
-// Includes.
 require_once(dirname(__FILE__) . '/../config.php');
 require_once(dirname(__FILE__) . '/editlib.php');
 require_once($CFG->libdir . '/filelib.php');
index 85110eb..81b2543 100644 (file)
@@ -483,47 +483,63 @@ DONE question/behaviour/opaque/lang/en/qbehaviour_opaque.php
 DONE question/category_form.php
 DONE question/export_form.php
 DONE question/flags.js
-question/format/aiken/format.php
-question/format/gift/examples.txt
-question/format/qti_two/templates/choice.tpl
-question/format/qti_two/templates/choiceMultiple.tpl
-question/format/qti_two/templates/composite.tpl
-question/format/qti_two/templates/extendedText.tpl
-question/format/qti_two/templates/extendedText_simpleEssay.tpl
-question/format/qti_two/templates/graphicGapMatch.tpl
-question/format/qti_two/templates/imsmanifest.tpl
-question/format/qti_two/templates/match.tpl
-question/format/qti_two/templates/mmchoiceMultiple.tpl
-question/format/qti_two/templates/notimplemented.tpl
-question/format/qti_two/templates/numerical.tpl
-question/format/qti_two/templates/textEntry.tpl
-DONE question/format/README.txt
-DONE question/format/webct/TODO.txt
+DONE question/format/aiken/format.php
 DONE question/import_form.php
 DONE question/qbank.js
 DONE question/qengine.js
-question/type/calculated/datasetitems_form.php
-question/type/calculated/db/upgrade.php
-question/type/calculated/questiontype.php
-question/type/calculated/version.php
-question/type/calculatedmulti/questiontype.php
-question/type/calculatedsimple/questiontype.php
-question/type/ddwtos/version.php
+DONE question/type/calculated/datasetitems_form.php
+DONE question/type/calculated/db/upgrade.php
+DONE question/type/calculated/questiontype.php
+DONE question/type/calculated/version.php
+DONE question/type/calculatedmulti/questiontype.php
+DONE question/type/calculatedsimple/questiontype.php
+DONE question/type/ddwtos/version.php
 DONE question/type/description/question.html
 DONE question/type/essay/display.html
-question/type/essay/version.php
-question/type/gapselect/edit_form_base.php
-question/type/gapselect/rendererbase.php
-question/type/match/db/upgrade.php
-question/type/match/version.php
-question/type/multianswer/db/upgrade.php
-question/type/multianswer/version.php
-question/type/multichoice/db/upgrade.php
-question/type/multichoice/version.php
-question/type/numerical/db/upgrade.php
-question/type/numerical/display.html
-question/type/numerical/version.php
-question/type/opaque/lang/en/qtype_opaque.php
-question/type/opaque/settings.php
-question/type/randomsamatch/version.php
-question/type/truefalse/version.php
+DONE question/type/essay/version.php
+DONE question/type/gapselect/edit_form_base.php
+DONE question/type/gapselect/rendererbase.php
+DONE question/type/match/db/upgrade.php
+DONE question/type/match/version.php
+DONE question/type/multianswer/db/upgrade.php
+DONE question/type/multianswer/version.php
+DONE question/type/multichoice/db/upgrade.php
+DONE question/type/multichoice/version.php
+DONE question/type/numerical/db/upgrade.php
+DONE question/type/numerical/display.html
+DONE question/type/numerical/version.php
+DONE question/type/opaque/lang/en/qtype_opaque.php
+DONE question/type/opaque/settings.php
+DONE question/type/randomsamatch/version.php
+DONE question/type/truefalse/version.php
+
+Missing boiler-plate
+====================
+
+DONE question/addquestion.php
+DONE question/category.php
+DONE question/category_class.php
+DONE question/edit.php
+DONE question/export.php
+DONE question/format/blackboard/format.php
+DONE question/format/blackboard_six/format.php
+DONE question/format/examview/format.php
+DONE question/format/learnwise/format.php
+DONE question/format/missingword/format.php
+DONE question/format/qti_two/custommediafilter.php
+DONE question/format/qti_two/format.php
+DONE question/format/qti_two/qt_common.php
+DONE question/format/webct/format.php
+DONE question/format/xhtml/format.php
+DONE question/format.php
+DONE question/question.php
+DONE question/type/calculated/datasetdefinitions_form.php
+DONE question/type/calculatedmulti/edit_calculatedmulti_form.php
+DONE question/type/ddwtos/script.js
+DONE question/type/multianswer/edit_multianswer_form.php
+DONE question/type/multianswer/questiontype.php
+DONE question/type/numerical/display.html
+DONE question/type/randomsamatch/edit_randomsamatch_form.php
+DONE question/type/randomsamatch/questiontype.php
+DONE question/upgrade.php
+
index 0af45d3..f2a17bf 100644 (file)
@@ -1,9 +1,36 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
- * @package questionbank
- * @subpackage questiontypes
+ * Defines the editing form for the calculated question data set definitions.
+ *
+ * @package    qtype
+ * @subpackage calculated
+ * @copyright  2007 Jamie Pratt me@jamiep.org
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+
+/**
+ * Calculated question data set definitions editing form definition.
+ *
+ * @copyright  2007 Jamie Pratt me@jamiep.org
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class question_dataset_dependent_definitions_form extends moodleform {
     /**
      * Question object with options and answers already loaded by get_question_options
index 201cc28..dba34b7 100644 (file)
@@ -1,4 +1,36 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Defines the editing form for the calculated question data set items.
+ *
+ * @package    qtype
+ * @subpackage calculated
+ * @copyright  2007 Jamie Pratt me@jamiep.org
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Calculated question data set items editing form definition.
+ *
+ * @copyright  2007 Jamie Pratt me@jamiep.org
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class question_dataset_dependent_items_form extends moodleform {
     /**
      * Question object with options and answers already loaded by get_question_options
index d736073..2144d47 100644 (file)
@@ -1,25 +1,34 @@
 <?php
 
-// This file keeps track of upgrades to
-// the calculated qtype plugin
+// This file is part of Moodle - http://moodle.org/
 //
-// Sometimes, changes between versions involve
-// alterations to database structures and other
-// major things that may break installations.
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
 //
-// The upgrade function in this file will attempt
-// to perform all the necessary actions to upgrade
-// your older installation to the current version.
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
 //
-// If there's something it cannot do itself, it
-// will tell you what you need to do.
-//
-// The commands in here will all be database-neutral,
-// using the methods of database_manager class
-//
-// Please do not forget to use upgrade_set_timeout()
-// before any action that may take longer time to finish.
-
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Calculated question type upgrade code.
+ *
+ * @package    qtype
+ * @subpackage calculated
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Upgrade code for the calculated question type.
+ * @param int $oldversion the version we are upgrading from.
+ */
 function xmldb_qtype_calculated_upgrade($oldversion) {
     global $CFG, $DB;
 
index 4663243..6ef8165 100644 (file)
@@ -26,7 +26,7 @@
 
 
 /**
- * Calculated editing form definition.
+ * Calculated question type editing form definition.
  *
  * @copyright  2007 Jamie Pratt me@jamiep.org
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index aa9e65c..42ede28 100644 (file)
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-
-/////////////////
-// CALCULATED ///
-/////////////////
-
-/// QUESTION TYPE CLASS //////////////////
-
+/**
+ * Question type class for the calculated question type.
+ *
+ * @package    qtype
+ * @subpackage calculated
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * The calculated question type.
+ *
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class question_calculated_qtype extends default_questiontype {
 
     public $fileoptionsa = array(
index 1356e95..074212e 100644 (file)
@@ -1,5 +1,28 @@
-<?PHP
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Version information for the calculated question type.
+ *
+ * @package    qtype
+ * @subpackage calculated
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 
 $plugin->version  = 2010090501;
 $plugin->requires = 2010090501;
-
index 3d7b320..e25905a 100644 (file)
@@ -1,15 +1,32 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
- * Defines the editing form for the calculated question type.
+ * Defines the editing form for calculated multiple-choice questions.
  *
  * @package    qtype
- * @subpackage calculatedmult
+ * @subpackage calculatedmulti
  * @copyright  2007 Jamie Pratt me@jamiep.org
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+
 /**
- * calculated editing form definition.
+ * Calculated multiple-choice question editing form.
  *
  * @copyright  2007 Jamie Pratt me@jamiep.org
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
index ac0b0cd..724c219 100644 (file)
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-/////////////////
-// CALCULATED ///
-/////////////////
-
-/// QUESTION TYPE CLASS //////////////////
-
+/**
+ * Question type class for the calculated multiple-choice question type.
+ *
+ * @package    qtype
+ * @subpackage calculatedmulti
+ * @copyright  2009 Pierre Pichet
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * The calculated multiple-choice question type.
+ *
+ * @copyright  2009 Pierre Pichet
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class question_calculatedmulti_qtype extends question_calculated_qtype {
 
 
index 216b814..7a04cfb 100644 (file)
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-/////////////////
-// CALCULATED ///
-/////////////////
-
-/// QUESTION TYPE CLASS //////////////////
-
+/**
+ * Question type class for the simple calculated question type.
+ *
+ * @package    qtype
+ * @subpackage calculatedsimple
+ * @copyright  2009 Pierre Pichet
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * The simple calculated question type.
+ *
+ * @copyright  2009 Pierre Pichet
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class question_calculatedsimple_qtype extends question_calculated_qtype {
 
-
-
     // Used by the function custom_generator_tools:
     public $calcgenerateidhasbeenadded = false;
     public $virtualqtype = false;
index 0f0a480..f2c47e5 100644 (file)
@@ -1,11 +1,27 @@
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * JavaScript objects, functions as well as usage of some YUI library for
  * enabling drag and drop interaction for dran-anddrop words into sentences
  * (ddwtos)
  *
- * @package qtype_ddwtos
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package    qtype
+ * @subpackage ddwtos
+ * @copyright  2009 The Open University
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
 //global variables
index ad42b28..19bbecd 100644 (file)
@@ -1,4 +1,28 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Version information for the drag-and-drop words into sentences question type.
+ *
+ * @package    qtype
+ * @subpackage ddwtos
+ * @copyright  2011 The Open University
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 $plugin->version  = 2011020100;
 $plugin->requires = 2011011200;
index 9ccfe90..34a8826 100644 (file)
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-
 /**
  * Question type class for the essay question type.
  *
- * @package qtype
+ * @package    qtype
  * @subpackage essay
- * @copyright 2005 Mark Nielsen
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright  2005 Mark Nielsen
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
 
 /**
  * The essay question type.
  *
- * @copyright 2005 Mark Nielsen
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright  2005 Mark Nielsen
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class qtype_essay extends question_type {
     public function is_manual_graded() {
index 4d9fe58..33c5615 100644 (file)
@@ -1,4 +1,28 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Version information for the essay question type.
+ *
+ * @package    qtype
+ * @subpackage essay
+ * @copyright  2005 Mark Nielsen
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 $plugin->version  = 2010090501;
 $plugin->requires = 2010090501;
index a9ea332..e9304d0 100644 (file)
@@ -1,5 +1,29 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Base class for editing question types like this one.
+ *
+ * @package qtype
+ * @subpackage gapselect
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 
 /**
  * Elements embedded in question text editing form definition.
index 9d9170d..957af39 100644 (file)
@@ -1,4 +1,30 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Base class for rendering question types like this one.
+ *
+ * @package qtype
+ * @subpackage gapselect
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
 /**
  * Generates the output for question types where the question includes embedded interactive elements in the
  * question text.
index 8b9c238..8dd65bc 100644 (file)
@@ -15,7 +15,6 @@
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-
 /**
  * Version information for the select missing words question type.
  *
@@ -25,6 +24,5 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-
 $plugin->version  = 2011020100;
 $plugin->requires = 2011011200;
index 4ffa61c..83d6554 100644 (file)
@@ -1,25 +1,34 @@
 <?php
 
-// This file keeps track of upgrades to
-// the match qtype plugin
+// This file is part of Moodle - http://moodle.org/
 //
-// Sometimes, changes between versions involve
-// alterations to database structures and other
-// major things that may break installations.
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
 //
-// The upgrade function in this file will attempt
-// to perform all the necessary actions to upgrade
-// your older installation to the current version.
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
 //
-// If there's something it cannot do itself, it
-// will tell you what you need to do.
-//
-// The commands in here will all be database-neutral,
-// using the methods of database_manager class
-//
-// Please do not forget to use upgrade_set_timeout()
-// before any action that may take longer time to finish.
-
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Matching question type upgrade code.
+ *
+ * @package    qtype
+ * @subpackage match
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Upgrade code for the matching question type.
+ * @param int $oldversion the version we are upgrading from.
+ */
 function xmldb_qtype_match_upgrade($oldversion) {
     global $CFG, $DB;
 
index ea881f2..04baf4e 100644 (file)
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-
 /**
- * True-false question definition class.
+ * Matching question definition class.
  *
- * @package qtype_match
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package    qtype
+ * @subpackage match
+ * @copyright  2009 The Open University
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
 
 /**
  * Represents a matching question.
  *
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright  2009 The Open University
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class qtype_match_question extends question_graded_automatically_with_countback {
     /** @var boolean Whether the question stems should be shuffled. */
index 0df96e4..325fe58 100644 (file)
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-
 /**
  * Question type class for the matching question type.
  *
- * @package qtype
+ * @package    qtype
  * @subpackage match
- * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+
 require_once($CFG->libdir . '/questionlib.php');
 require_once($CFG->dirroot . '/question/engine/lib.php');
 
+
 /**
  * The matching question type class.
  *
- * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class qtype_match extends question_type {
 
index ad7641d..2ee71a6 100644 (file)
@@ -1,4 +1,28 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Version information for the matching question type.
+ *
+ * @package    qtype
+ * @subpackage match
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 $plugin->version  = 2011011306;
 $plugin->requires = 2010090501;
index f41037d..17548e5 100644 (file)
@@ -1,25 +1,34 @@
 <?php
 
-// This file keeps track of upgrades to
-// the multianswer qtype plugin
+// This file is part of Moodle - http://moodle.org/
 //
-// Sometimes, changes between versions involve
-// alterations to database structures and other
-// major things that may break installations.
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
 //
-// The upgrade function in this file will attempt
-// to perform all the necessary actions to upgrade
-// your older installation to the current version.
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
 //
-// If there's something it cannot do itself, it
-// will tell you what you need to do.
-//
-// The commands in here will all be database-neutral,
-// using the methods of database_manager class
-//
-// Please do not forget to use upgrade_set_timeout()
-// before any action that may take longer time to finish.
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Multi-answer question type upgrade code.
+ *
+ * @package    qtype
+ * @subpackage multianswer
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 
+/**
+ * Upgrade code for the multi-answer question type.
+ * @param int $oldversion the version we are upgrading from.
+ */
 function xmldb_qtype_multianswer_upgrade($oldversion) {
     global $CFG, $DB;
 
index 471fc0e..31d8c64 100644 (file)
@@ -1,6 +1,22 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
- * Defines the editing form for the multianswer question type.
+ * Defines the editing form for the multi-answer question type.
  *
  * @package    qtype
  * @subpackage multianswer
@@ -8,8 +24,9 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
+
 /**
- * multianswer editing form definition.
+ * Form for editing multi-answer questions.
  *
  * @copyright  2007 Jamie Pratt me@jamiep.org
  * @license    http://www.gnu.org/copyleft/gpl.html GNU Public License
index 996e657..aa89d0b 100644 (file)
@@ -1,21 +1,35 @@
 <?php
 
-///////////////////
-/// MULTIANSWER /// (Embedded - cloze)
-///////////////////
-
-///
-/// The multianswer question type is special in that it
-/// depends on a few other question types, i.e.
-/// 'multichoice', 'shortanswer' and 'numerical'.
-/// These question types have got a few special features that
-/// makes them useable by the 'multianswer' question type
-///
-
-/// QUESTION TYPE CLASS //////////////////
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Question type class for the multi-answer question type.
+ *
+ * @package    qtype
+ * @subpackage multianswer
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
 /**
- * @package questionbank
- * @subpackage questiontypes
+ * The multi-answer question type class.
+ *
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class embedded_cloze_qtype extends default_questiontype {
 
index 9061bb2..5c1ab29 100644 (file)
@@ -1,6 +1,28 @@
 <?php
 
-$plugin->version  = 2010090501;
-$plugin->requires = 2010090501;
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
+/**
+ * Version information for the multi-answer question type.
+ *
+ * @package    qtype
+ * @subpackage multianswer
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 
+$plugin->version  = 2010090501;
+$plugin->requires = 2010090501;
index b3ce830..99d040e 100644 (file)
@@ -1,25 +1,34 @@
 <?php
 
-// This file keeps track of upgrades to
-// the multichoice qtype plugin
+// This file is part of Moodle - http://moodle.org/
 //
-// Sometimes, changes between versions involve
-// alterations to database structures and other
-// major things that may break installations.
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
 //
-// The upgrade function in this file will attempt
-// to perform all the necessary actions to upgrade
-// your older installation to the current version.
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
 //
-// If there's something it cannot do itself, it
-// will tell you what you need to do.
-//
-// The commands in here will all be database-neutral,
-// using the methods of database_manager class
-//
-// Please do not forget to use upgrade_set_timeout()
-// before any action that may take longer time to finish.
-
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Multiple choice question type upgrade code.
+ *
+ * @package    qtype
+ * @subpackage multichoice
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Upgrade code for the multiple choice question type.
+ * @param int $oldversion the version we are upgrading from.
+ */
 function xmldb_qtype_multichoice_upgrade($oldversion) {
     global $CFG, $DB, $QTYPES;
 
index f1ff61d..b571bab 100644 (file)
 /**
  * The questiontype class for the multiple choice question type.
  *
- * @package qtype
+ * @package    qtype
  * @subpackage multichoice
- * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
 /**
index f5abde6..77cb8cc 100644 (file)
@@ -1,4 +1,28 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Version information for the multiple choice question type.
+ *
+ * @package    qtype
+ * @subpackage multichoice
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 $plugin->version  = 2011011200;
 $plugin->requires = 2010090501;
index 96c8014..bc9522f 100644 (file)
@@ -1,25 +1,34 @@
 <?php
 
-// This file keeps track of upgrades to
-// the numerical qtype plugin
+// This file is part of Moodle - http://moodle.org/
 //
-// Sometimes, changes between versions involve
-// alterations to database structures and other
-// major things that may break installations.
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
 //
-// The upgrade function in this file will attempt
-// to perform all the necessary actions to upgrade
-// your older installation to the current version.
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
 //
-// If there's something it cannot do itself, it
-// will tell you what you need to do.
-//
-// The commands in here will all be database-neutral,
-// using the methods of database_manager class
-//
-// Please do not forget to use upgrade_set_timeout()
-// before any action that may take longer time to finish.
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Numerical question type upgrade code.
+ *
+ * @package    qtype
+ * @subpackage numerical
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 
+/**
+ * Upgrade code for the numerical question type.
+ * @param int $oldversion the version we are upgrading from.
+ */
 function xmldb_qtype_numerical_upgrade($oldversion) {
     global $CFG, $DB;
 
index 9061bb2..51cbedc 100644 (file)
@@ -1,6 +1,28 @@
 <?php
 
-$plugin->version  = 2010090501;
-$plugin->requires = 2010090501;
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
+/**
+ * Version information for the numerical question type.
+ *
+ * @package    qtype
+ * @subpackage numerical
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 
+$plugin->version  = 2010090501;
+$plugin->requires = 2010090501;
index e450115..5ba7587 100644 (file)
@@ -1,5 +1,28 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Strings for component 'qtype_opaque', language 'en', branch 'MOODLE_20_STABLE'
+ *
+ * @package    qtype
+ * @subpackage opaque
+ * @copyright  2006 The Open University
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 
 $string['accessoutofsequence'] = 'You have accessed this page out of sequence. Please do not use the Back button when attempting quizzes.';
 $string['addengine'] = 'Add another engine';
index b4e3fbb..734fb17 100644 (file)
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+
 require_once(dirname(__FILE__) . '/locallib.php');
 
+
 /**
  * The Opaque question type.
  *
index 6d9e2e8..a681ff8 100644 (file)
@@ -1,5 +1,29 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Admin settings for the Opaque question type.
+ *
+ * @package    qtype
+ * @subpackage opaque
+ * @copyright  2011 The Open University
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 $settings = new admin_externalpage('qtypesettingopaque',
         get_string('pluginname', 'qtype_opaque'),
         new moodle_url('/question/type/opaque/engines.php'),
index bf58977..a04a898 100644 (file)
@@ -1,4 +1,20 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * Defines the editing form for the randomsamatch question type.
  *
@@ -8,6 +24,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
 
+
 /**
  * randomsamatch editing form definition.
  *
index 6f08a1f..f591b77 100644 (file)
@@ -1,17 +1,39 @@
 <?php
 
-/////////////////////
-/// RANDOMSAMATCH ///
-/////////////////////
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Question type class for the randomsamatch question type.
+ *
+ * @package    qtype
+ * @subpackage randomsamatch
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 
-/// TODO: Make sure short answer questions chosen by a randomsamatch question
-/// can not also be used by a random question
 
-/// QUESTION TYPE CLASS //////////////////
 /**
- * @package questionbank
- * @subpackage questiontypes
-*/
+ * The randomsamatch question type class.
+ *
+ * TODO: Make sure short answer questions chosen by a randomsamatch question
+ * can not also be used by a random question
+ *
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class question_randomsamatch_qtype extends qtype_match {
 /// Extends 'match' as there are quite a few simularities...
 
index 9061bb2..d6daf6c 100644 (file)
@@ -1,6 +1,28 @@
 <?php
 
-$plugin->version  = 2010090501;
-$plugin->requires = 2010090501;
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
+/**
+ * Version information for the randomsamatch question type.
+ *
+ * @package    qtype
+ * @subpackage randomsamatch
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 
+$plugin->version  = 2010090501;
+$plugin->requires = 2010090501;
index e0b3cd2..b853504 100644 (file)
@@ -19,7 +19,7 @@
  *
  * @package    qtype
  * @subpackage shortanswer
- * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @copyright  1999 onwards Martin Dougiamas {@link http://moodle.com}
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
index 9061bb2..7491905 100644 (file)
@@ -1,6 +1,28 @@
 <?php
 
-$plugin->version  = 2010090501;
-$plugin->requires = 2010090501;
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
+/**
+ * Version information for the true/fales question type.
+ *
+ * @package    qtype
+ * @subpackage truefalse
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 
+$plugin->version  = 2010090501;
+$plugin->requires = 2010090501;
index 7e53ab1..6e77250 100644 (file)
@@ -1,15 +1,32 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * This file contains datbase upgrade code that is called from lib/db/upgrade.php,
  * and also check methods that can be used for pre-install checks via
  * admin/environment.php and lib/environmentlib.php.
  *
- * @copyright 2007 The Open University
- * @author T.J.Hunt@open.ac.uk
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package questionbank
+ * @package    moodlecore
+ * @subpackage questionbank
+ * @copyright  2007 The Open University
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+
 /**
  * In Moodle, all random questions should have question.parent set to be the same
  * as question.id. One effect of MDL-5482 is that this will not be true for questions that
@@ -23,5 +40,3 @@ function question_fix_random_question_parents() {
     $DB->execute("UPDATE {question} SET parent = id WHERE qtype = 'random' AND parent <> id");
     return true;
 }
-
-