Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
9df0480d
Commit
9df0480d
authored
Feb 23, 2011
by
Tim Hunt
Browse files
MDL-47494 gapselect: Fix @package names and PHPdoc layout.
parent
f7dd2d44
Changes
14
Hide whitespace changes
Inline
Side-by-side
question/type/gapselect/edit_form_base.php
View file @
9df0480d
...
...
@@ -18,18 +18,18 @@
/**
* Base class for editing question types like this one.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @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.
*
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
qtype_gapselect_edit_form_base
extends
question_edit_form
{
const
MAX_GROUPS
=
8
;
...
...
question/type/gapselect/edit_gapselect_form.php
View file @
9df0480d
...
...
@@ -15,24 +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/>.
/**
* Defines the editing form for the select missing words question type.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 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'
);
/**
* Select from drop down list question editing form definition.
*
* @copyright 20
09
The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
20
11
The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
qtype_gapselect_edit_form
extends
qtype_gapselect_edit_form_base
{
// HTML tags allowed in answers (choices).
...
...
question/type/gapselect/lang/en/qtype_gapselect.php
View file @
9df0480d
...
...
@@ -15,17 +15,15 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Language strings for the sdrag-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
* @package
qtype
* @subpackage
gapselect
* @copyright
2011 The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string
[
'addinggapselect'
]
=
'Adding a select missing words question'
;
$string
[
'addmorechoiceblanks'
]
=
'Blanks for {no} more choices'
;
$string
[
'answer'
]
=
'Answer'
;
...
...
question/type/gapselect/question.php
View file @
9df0480d
...
...
@@ -15,23 +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/>.
/**
* Select from drop down list question definition class.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 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'
);
/**
* Represents select missing words question.
*
* @copyright 20
09
The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
20
11
The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
qtype_gapselect_question
extends
qtype_gapselect_question_base
{
//is actually exactly the same.
...
...
question/type/gapselect/questionbase.php
View file @
9df0480d
...
...
@@ -15,15 +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/>.
/**
* Definition class for embedded element in question text question. Parent of
* gap-select, drag and drop and possibly others.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
@@ -31,8 +30,8 @@
* Represents embedded element in question text question. Parent of drag and drop and select from
* drop down list and ?others?
*
* @copyright 20
09
The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
20
11
The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract
class
qtype_gapselect_question_base
extends
question_graded_automatically_with_countback
{
/** @var boolean Whether the question stems should be shuffled. */
...
...
question/type/gapselect/questiontype.php
View file @
9df0480d
...
...
@@ -15,28 +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/>.
/**
* Question type class for the select missing words question type.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 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
->
dirroot
.
'/question/engine/lib.php'
);
require_once
(
$CFG
->
dirroot
.
'/question/format/xml/format.php'
);
require_once
(
$CFG
->
dirroot
.
'/question/type/gapselect/questiontypebase.php'
);
/**
* The select missing words question type class.
*
* @copyright 20
09
The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
20
11
The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
qtype_gapselect
extends
qtype_gapselect_base
{
protected
function
choice_options_to_feedback
(
$choice
)
{
...
...
question/type/gapselect/questiontypebase.php
View file @
9df0480d
...
...
@@ -19,10 +19,10 @@
/**
* Question type class for the embedded element in question text question types.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
@@ -34,8 +34,8 @@ require_once($CFG->dirroot . '/question/format/xml/format.php');
/**
* The embedded element in question text question type class.
*
* @copyright 20
09
The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
20
11
The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract
class
qtype_gapselect_base
extends
question_type
{
/**
...
...
question/type/gapselect/renderer.php
View file @
9df0480d
...
...
@@ -15,24 +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/>.
/**
* Select from drop down list question renderer class.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 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'
);
/**
* Generates the output for select missing words questions.
*
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
qtype_gapselect_renderer
extends
qtype_elements_embedded_in_question_text_renderer
{
protected
function
embedded_element
(
question_attempt
$qa
,
$place
,
question_display_options
$options
)
{
...
...
question/type/gapselect/rendererbase.php
View file @
9df0480d
...
...
@@ -18,10 +18,10 @@
/**
* Base class for rendering question types like this one.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
@@ -29,8 +29,8 @@
* Generates the output for question types where the question includes embedded interactive elements in the
* question text.
*
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract
class
qtype_elements_embedded_in_question_text_renderer
extends
qtype_with_combined_feedback_renderer
{
public
function
formulation_and_controls
(
question_attempt
$qa
,
...
...
question/type/gapselect/simpletest/helper.php
View file @
9df0480d
...
...
@@ -15,22 +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/>.
/**
* Contains the helper class for the select missing words question type tests.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Test helper class for the select missing words question type.
*
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
qtype_gapselect_test_helper
{
/**
...
...
question/type/gapselect/simpletest/testquestion.php
View file @
9df0480d
...
...
@@ -19,10 +19,10 @@
/**
* Unit tests for the select missing words question definition class.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 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'
);
...
...
@@ -30,10 +30,10 @@ require_once($CFG->dirroot . '/question/type/gapselect/simpletest/helper.php');
/**
* Unit tests for the
matching
question definition class.
* Unit tests for the
select missing words
question definition class.
*
* @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_gapselect_question_test
extends
UnitTestCase
{
...
...
question/type/gapselect/simpletest/testquestiontype.php
View file @
9df0480d
...
...
@@ -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/>.
/**
* Unit tests for the select missing words question question definition class.
*
* @package qtype_gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
@@ -32,10 +32,8 @@ require_once($CFG->dirroot . '/question/type/gapselect/simpletest/helper.php');
/**
* Unit tests for the select missing words question definition class.
*
* @package qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
qtype_gapselect_test
extends
UnitTestCase
{
/** @var qtype_gapselect instance of the question type class to test. */
...
...
question/type/gapselect/simpletest/testwalkthrough.php
View file @
9df0480d
...
...
@@ -15,15 +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/>.
/**
* This file contains tests that walks a question through the interactive
* behaviour.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
@@ -31,6 +30,12 @@ require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
require_once
(
$CFG
->
dirroot
.
'/question/type/gapselect/simpletest/helper.php'
);
/**
* Unit tests for the gap-select question type.
*
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
qtype_gapselect_walkthrough_test
extends
qbehaviour_walkthrough_test_base
{
public
function
test_interactive_behaviour
()
{
...
...
question/type/gapselect/version.php
View file @
9df0480d
...
...
@@ -18,10 +18,10 @@
/**
* Version information for the select missing words question type.
*
* @package qtype
* @package
qtype
* @subpackage gapselect
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright
2011 The Open University
* @license
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$plugin
->
version
=
2011020100
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment