Skip to content

Commit

Permalink
MDL-20636 Fix @Package names in question/behaviour, question/engine a…
Browse files Browse the repository at this point in the history
…nd question top level.
  • Loading branch information
timhunt committed Feb 22, 2011
1 parent d360315 commit 017bc1d
Show file tree
Hide file tree
Showing 60 changed files with 598 additions and 447 deletions.
16 changes: 12 additions & 4 deletions question/behaviour/adaptive/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
14 changes: 11 additions & 3 deletions question/behaviour/adaptive/simpletest/testwalkthrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down
13 changes: 7 additions & 6 deletions question/behaviour/adaptivenopenalty/behaviour.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,25 @@
// 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');

/**
* Question behaviour for adaptive mode, with no penalties.
*
* 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;
Expand Down
17 changes: 13 additions & 4 deletions question/behaviour/adaptivenopenalty/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down
11 changes: 5 additions & 6 deletions question/behaviour/behaviourbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/


Expand All @@ -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 {
/**
Expand Down
13 changes: 7 additions & 6 deletions question/behaviour/deferredcbm/behaviour.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -37,8 +38,8 @@
* 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;
Expand Down
19 changes: 13 additions & 6 deletions question/behaviour/deferredcbm/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
17 changes: 12 additions & 5 deletions question/behaviour/deferredcbm/simpletest/testwalkthrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down
11 changes: 6 additions & 5 deletions question/behaviour/deferredfeedback/behaviour.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/


Expand All @@ -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;
Expand Down
16 changes: 11 additions & 5 deletions question/behaviour/deferredfeedback/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 11 additions & 4 deletions question/behaviour/deferredfeedback/simpletest/testwalkthrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down
11 changes: 6 additions & 5 deletions question/behaviour/immediatecbm/behaviour.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/


Expand All @@ -37,8 +38,8 @@
* 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;
Expand Down
Loading

0 comments on commit 017bc1d

Please sign in to comment.