Commit 017bc1d9 authored by Tim Hunt's avatar Tim Hunt
Browse files

MDL-20636 Fix @package names in question/behaviour, question/engine and question top level.

parent d3603157
......@@ -15,16 +15,24 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Renderer for outputting parts of a question belonging to the legacy
* adaptive behaviour.
*
* @package qbehaviour_adaptive
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage adaptive
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Renderer for outputting parts of a question belonging to the legacy
* adaptive behaviour.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_adaptive_renderer extends qbehaviour_renderer {
protected function get_graded_step(question_attempt $qa) {
foreach ($qa->get_reverse_step_iterator() as $step) {
......
......@@ -20,15 +20,23 @@
* This file contains tests that walks a question through the adaptive
* behaviour.
*
* @package qbehaviour_adaptive
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage adaptive
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../../engine/lib.php');
require_once(dirname(__FILE__) . '/../../../engine/simpletest/helpers.php');
/**
* Unit tests for the adaptive behaviour.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_adaptive_walkthrough_test extends qbehaviour_walkthrough_test_base {
public function test_adaptive_multichoice() {
......
......@@ -15,15 +15,16 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Question behaviour for the old adaptive mode, with no penalties.
*
* @package qbehaviour_adaptivenopenalty
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage adaptivenopenalty
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../adaptive/behaviour.php');
/**
......@@ -31,8 +32,8 @@ require_once(dirname(__FILE__) . '/../adaptive/behaviour.php');
*
* This is the old version of interactive mode, without penalties.
*
* @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 qbehaviour_adaptivenopenalty extends qbehaviour_adaptive {
const IS_ARCHETYPAL = true;
......
......@@ -15,18 +15,27 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Renderer for outputting parts of a question belonging to the legacy
* adaptive (no penalties) behaviour.
*
* @package qbehaviour_adaptivenopenalty
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage adaptivenopenalty
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../adaptive/renderer.php');
/**
* Renderer for outputting parts of a question belonging to the legacy
* adaptive (no penalties) behaviour.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_adaptivenopenalty_renderer extends qbehaviour_adaptive_renderer {
protected function penalty_info($qa, $mark) {
return '';
......
......@@ -15,20 +15,27 @@
// 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 tests that walks a question through the adaptive (no penalties)k
* behaviour.
*
* @package qbehaviour_adaptivenopenalty
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage adaptivenopenalty
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../../engine/lib.php');
require_once(dirname(__FILE__) . '/../../../engine/simpletest/helpers.php');
/**
* Unit tests for the adaptive (no penalties) behaviour.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_adaptivenopenalty_walkthrough_test extends qbehaviour_walkthrough_test_base {
public function test_multichoice() {
......
......@@ -15,14 +15,13 @@
// 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 quetsion behaviour base class
*
* @package moodlecore
* @package moodlecore
* @subpackage questionbehaviours
* @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
*/
......@@ -35,8 +34,8 @@
* In turn, the behaviour will delegate certain processing to the
* relevant {@link question_definition}.
*
* @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
*/
abstract class question_behaviour {
/**
......
......@@ -15,20 +15,21 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Question behaviour that is like the deferred feedback model, but with
* certainly based marking. That is, in addition to the other controls, there are
* where the student can indicate how certain they are that their answer is right.
*
* @package qbehaviour_deferredcbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage deferredcbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../deferredfeedback/behaviour.php');
/**
* Question behaviour for deferred feedback with certainty based marking.
*
......@@ -37,8 +38,8 @@ require_once(dirname(__FILE__) . '/../deferredfeedback/behaviour.php');
* when the whole attempt is finished, their answer is graded. Their degree
* of certainty affects their score.
*
* @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 qbehaviour_deferredcbm extends qbehaviour_deferredfeedback {
const IS_ARCHETYPAL = true;
......
......@@ -15,17 +15,24 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Renderer for outputting parts of a question belonging to the deferred
* feedback behaviour.
* Defines the renderer for the deferred feedback with certainty based marking
* behaviour.
*
* @package qbehaviour_deferredcbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage deferredcbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Renderer for outputting parts of a question belonging to the deferred
* feedback with certainty based marking behaviour.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_deferredcbm_renderer extends qbehaviour_renderer {
protected function certainly_choices($controlname, $selected, $readonly) {
$attributes = array(
......
......@@ -15,20 +15,27 @@
// 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 tests that walks a question through the deferred feedback
* behaviour.
* with certainty base marking behaviour.
*
* @package qbehaviour_deferredcbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage deferredcbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../../engine/lib.php');
require_once(dirname(__FILE__) . '/../../../engine/simpletest/helpers.php');
/**
* Unit tests for the deferred feedback with certainty base marking behaviour.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_deferredcbm_walkthrough_test extends qbehaviour_walkthrough_test_base {
public function test_deferred_cbm_truefalse_high_certainty() {
......
......@@ -20,9 +20,10 @@
* Question behaviour for the case when the student's answer is just
* saved until they submit the whole attempt, and then it is graded.
*
* @package qbehaviour_deferredfeedback
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage deferredfeedback
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
......@@ -32,8 +33,8 @@
* The student enters their response during the attempt, and it is saved. Later,
* when the whole attempt is finished, their answer is graded.
*
* @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 qbehaviour_deferredfeedback extends question_behaviour_with_save {
const IS_ARCHETYPAL = true;
......
......@@ -15,16 +15,22 @@
// 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 renderer for the deferred feedback behaviour.
*
* @package qbehaviour
* @subpackage deferredfeedback
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Renderer for outputting parts of a question belonging to the deferred
* feedback behaviour.
*
* @package qbehaviour_deferredfeedback
* @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 qbehaviour_deferredfeedback_renderer extends qbehaviour_renderer {
}
......@@ -15,20 +15,27 @@
// 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 tests that walks a question through the deferred feedback
* behaviour.
*
* @package qbehaviour_deferredfeedback
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage deferredfeedback
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../../engine/lib.php');
require_once(dirname(__FILE__) . '/../../../engine/simpletest/helpers.php');
/**
* Unit tests for the deferred feedback behaviour.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_deferredfeedback_walkthrough_test extends qbehaviour_walkthrough_test_base {
public function test_deferredfeedback_feedback_truefalse() {
......
......@@ -20,9 +20,10 @@
* Question behaviour where the student can submit questions one at a
* time for immediate feedback, with certainty based marking.
*
* @package qbehaviour_immediatecbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage immediatecbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
......@@ -37,8 +38,8 @@ require_once(dirname(__FILE__) . '/../immediatefeedback/behaviour.php');
* Once the qustion is submitted, it is not possible for the student to change
* their answer any more. The student's degree of certainly affects their score.
*
* @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 qbehaviour_immediatecbm extends qbehaviour_immediatefeedback {
const IS_ARCHETYPAL = true;
......
......@@ -15,20 +15,26 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Renderer for outputting parts of a question belonging to the immediate
* feedback with CBM behaviour.
* Defines the renderer for the immediate feedback with CBM behaviour.
*
* @package qbehaviour_immediatecbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage immediatecbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../deferredcbm/renderer.php');
/**
* Renderer for outputting parts of a question belonging to the immediate
* feedback with CBM behaviour.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_immediatecbm_renderer extends qbehaviour_deferredcbm_renderer {
public function controls(question_attempt $qa, question_display_options $options) {
$output = parent::controls($qa, $options);
......
......@@ -15,20 +15,27 @@
// 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 tests that walks a question through the immediate cbm
* behaviour.
*
* @package qbehaviour_immediatecbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage immediatecbm
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../../engine/lib.php');
require_once(dirname(__FILE__) . '/../../../engine/simpletest/helpers.php');
/**
* Unit tests for the immediate cbm behaviour.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_immediatecbm_walkthrough_test extends qbehaviour_walkthrough_test_base {
public function test_immediatecbm_feedback_multichoice_right() {
......
......@@ -15,14 +15,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Question behaviour where the student can submit questions one at a
* time for immediate feedback.
*
* @package qbehaviour_immediatefeedback
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage immediatefeedback
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
......@@ -34,8 +34,8 @@
* student to change their answer any more, but the student gets full feedback
* straight away.
*
* @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 qbehaviour_immediatefeedback extends question_behaviour_with_save {
const IS_ARCHETYPAL = true;
......
......@@ -15,17 +15,23 @@
// 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 renderer for the immediate feedback behaviour.
*
* @package qbehaviour
* @subpackage immediatefeedback
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Renderer for outputting parts of a question belonging to the immediate
* feedback behaviour.
*
* @package qbehaviour_immediatefeedback
* @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 qbehaviour_immediatefeedback_renderer extends qbehaviour_renderer {
public function controls(question_attempt $qa, question_display_options $options) {
return $this->submit_button($qa, $options);
......
......@@ -20,15 +20,23 @@
* This file contains tests that walks a question through the immediate feedback
* behaviour.
*
* @package qbehaviour_immediatefeedback
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage immediatefeedback
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../../engine/lib.php');
require_once(dirname(__FILE__) . '/../../../engine/simpletest/helpers.php');
/**
* Unit tests for the immediate feedback behaviour.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_immediatefeedback_walkthrough_test extends qbehaviour_walkthrough_test_base {
public function test_immediatefeedback_feedback_multichoice_right() {
......
......@@ -15,13 +15,13 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This behaviour is for informaiton items.
*
* @package qbehaviour_informationitem
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qbehaviour
* @subpackage informationitem
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
......@@ -32,8 +32,8 @@
* and the question type is marked complete the first time the user navigates
* away from a page that contains that 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 qbehaviour_informationitem extends question_behaviour {
......
......@@ -15,17 +15,23 @@
// 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 renderer the information item behaviour.
*
* @package qbehaviour
* @subpackage informationitem
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Renderer for outputting parts of a question belonging to the information
* item behaviour.
*
* @package qbehaviour_deferredfeedback
* @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 qbehaviour_informationitem_renderer extends qbehaviour_renderer {
public function controls(question_attempt $qa, question_display_options $options) {
if ($qa->get_state() != question_state::$todo) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment