MDL-47494 ddwtos: Fix @package names and PHPdoc layout.

This commit is contained in:
Tim Hunt 2011-02-23 13:38:16 +00:00
parent cb30b30f97
commit 3a4ac328c5
9 changed files with 69 additions and 55 deletions

View file

@ -15,23 +15,24 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Defines the editing form for the drag-and-drop words into sentences question type. * Defines the editing form for the drag-and-drop words into sentences question type.
* *
* @package qtype_ddwtos * @package qtype
* @copyright 2009 The Open University * @subpackage ddwtos
* @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
*/ */
require_once($CFG->dirroot . '/question/type/gapselect/edit_form_base.php'); require_once($CFG->dirroot . '/question/type/gapselect/edit_form_base.php');
/** /**
* Drag-and-drop words into sentences editing form definition. * Drag-and-drop words into sentences editing form definition.
* *
* @copyright 2009 The Open University * @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class qtype_ddwtos_edit_form extends qtype_gapselect_edit_form_base { class qtype_ddwtos_edit_form extends qtype_gapselect_edit_form_base {
function qtype() { function qtype() {

View file

@ -15,17 +15,14 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Language strings for the select missing words question type.
* *
* @package qtype * @package qtype
* @subpackage gapselect * @subpackage ddwtos
* @copyright 2011 The Open University * @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
$string['addingddwtos'] = 'Adding drag and drop: words in text'; $string['addingddwtos'] = 'Adding drag and drop: words in text';
$string['addmorechoiceblanks'] = 'Blanks for {no} More Choices'; $string['addmorechoiceblanks'] = 'Blanks for {no} More Choices';
$string['answer'] = 'Answer'; $string['answer'] = 'Answer';

View file

@ -19,9 +19,10 @@
/** /**
* Drag-and-drop words into sentences question definition class. * Drag-and-drop words into sentences question definition class.
* *
* @package qtype_ddwtos * @package qtype
* @copyright 2009 The Open University * @subpackage ddwtos
* @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
*/ */
require_once($CFG->dirroot . '/question/type/gapselect/questionbase.php'); require_once($CFG->dirroot . '/question/type/gapselect/questionbase.php');
@ -29,19 +30,19 @@ require_once($CFG->dirroot . '/question/type/gapselect/questionbase.php');
/** /**
* Represents a drag-and-drop words into sentences question. * Represents a drag-and-drop words into sentences question.
* *
* @copyright 2009 The Open University * @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class qtype_ddwtos_question extends qtype_gapselect_question_base { class qtype_ddwtos_question extends qtype_gapselect_question_base {
//is actually exactly the same. // Is actually exactly the same.
} }
/** /**
* Represents one of the choices (draggable boxes). * Represents one of the choices (draggable boxes).
* *
* @copyright 2009 The Open University * @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class qtype_ddwtos_choice { class qtype_ddwtos_choice {
public $text; public $text;

View file

@ -15,27 +15,27 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Question type class for the drag-and-drop words into sentences question type. * Question type class for the drag-and-drop words into sentences question type.
* *
* @package qtype_ddwtos * @package qtype
* @copyright 2009 The Open University * @subpackage ddwtos
* @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
*/ */
require_once($CFG->libdir . '/questionlib.php'); require_once($CFG->libdir . '/questionlib.php');
require_once($CFG->dirroot . '/question/engine/lib.php'); require_once($CFG->dirroot . '/question/engine/lib.php');
require_once($CFG->dirroot . '/question/format/xml/format.php'); require_once($CFG->dirroot . '/question/format/xml/format.php');
require_once($CFG->dirroot . '/question/type/gapselect/questiontypebase.php'); require_once($CFG->dirroot . '/question/type/gapselect/questiontypebase.php');
/** /**
* The drag-and-drop words into sentences question type class. * The drag-and-drop words into sentences question type class.
* *
* @copyright 2009 The Open University * @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class qtype_ddwtos extends qtype_gapselect_base { class qtype_ddwtos extends qtype_gapselect_base {
protected function choice_group_key(){ protected function choice_group_key(){

View file

@ -15,23 +15,24 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Drag-and-drop words into sentences question renderer class. * Drag-and-drop words into sentences question renderer class.
* *
* @package qtype_ddwtos * @package qtype
* @copyright 2010 The Open University * @subpackage ddwtos
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
require_once($CFG->dirroot . '/question/type/gapselect/rendererbase.php'); require_once($CFG->dirroot . '/question/type/gapselect/rendererbase.php');
/** /**
* Generates the output for drag-and-drop words into sentences questions. * Generates the output for drag-and-drop words into sentences questions.
* *
* @copyright 2010 The Open University * @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class qtype_ddwtos_renderer extends qtype_elements_embedded_in_question_text_renderer { class qtype_ddwtos_renderer extends qtype_elements_embedded_in_question_text_renderer {

View file

@ -15,13 +15,21 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Test helpers for the drag-and-drop words into sentences question type.
*
* @package qtype
* @subpackage ddwtos
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/** /**
* Test helper class for the drag-and-drop words into sentences question type. * Test helper class for the drag-and-drop words into sentences question type.
* *
* @package qtype_ddwtos * @copyright 2010 The Open University
* @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class qtype_ddwtos_test_helper { class qtype_ddwtos_test_helper {
/** /**

View file

@ -15,15 +15,16 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Unit tests for the drag-and-drop words into sentences question definition class. * Unit tests for the drag-and-drop words into sentences question definition class.
* *
* @package qtype_ddwtos * @package qtype
* @copyright 2010 The Open University * @subpackage ddwtos
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php'); require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
require_once($CFG->dirroot . '/question/type/ddwtos/simpletest/helper.php'); require_once($CFG->dirroot . '/question/type/ddwtos/simpletest/helper.php');
@ -31,8 +32,8 @@ require_once($CFG->dirroot . '/question/type/ddwtos/simpletest/helper.php');
/** /**
* Unit tests for the matching question definition class. * Unit tests for the matching question definition class.
* *
* @copyright 2009 The Open University * @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class qtype_ddwtos_question_test extends UnitTestCase { class qtype_ddwtos_question_test extends UnitTestCase {

View file

@ -15,13 +15,13 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Unit tests for the drag-and-drop words into sentences question definition class. * Unit tests for the drag-and-drop words into sentences question definition class.
* *
* @package qtype_ddwtos * @package qtype
* @copyright 2010 The Open University * @subpackage ddwtos
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -32,8 +32,8 @@ require_once($CFG->dirroot . '/question/type/ddwtos/simpletest/helper.php');
/** /**
* Unit tests for the drag-and-drop words into sentences question definition class. * Unit tests for the drag-and-drop words into sentences question definition class.
* *
* @copyright 2010 The Open University * @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class qtype_ddwtos_test extends UnitTestCase { class qtype_ddwtos_test extends UnitTestCase {
/** @var qtype_ddwtos instance of the question type class to test. */ /** @var qtype_ddwtos instance of the question type class to test. */

View file

@ -15,14 +15,13 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* This file contains tests that walks a question through the interactive * Unit tests for the drag-and-drop words into sentences question type.
* behaviour.
* *
* @package qtype_ddwtos * @package qtype
* @copyright 2010 The Open University * @subpackage ddwtos
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -30,6 +29,12 @@ require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
require_once($CFG->dirroot . '/question/type/ddwtos/simpletest/helper.php'); require_once($CFG->dirroot . '/question/type/ddwtos/simpletest/helper.php');
/**
* Unit tests for the drag-and-drop words into sentences question type.
*
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_ddwtos_walkthrough_test extends qbehaviour_walkthrough_test_base { class qtype_ddwtos_walkthrough_test extends qbehaviour_walkthrough_test_base {
protected function get_contains_drop_box_expectation($place, $group, $readonly, $stateclass = '0') { protected function get_contains_drop_box_expectation($place, $group, $readonly, $stateclass = '0') {