MDL-47494 ddimageortext: Merge branch 'master' of git://github.com/moodleou/moodle-qtype_ddimageortext

This commit is contained in:
Jamie Pratt
2012-05-08 12:42:39 +07:00
12 changed files with 56 additions and 56 deletions
+10 -7
View File
@@ -1,5 +1,7 @@
A drag-and-drop question type.
You can use text and / or images as drag items onto defined drop zones on a background image.
You can use text and / or images as drag items onto defined drop zones on a
background image.
This question type requires that gapselect question type
https://github.com/moodleou/moodle-qtype_gapselect/
@@ -7,17 +9,18 @@ to be installed in order to work.
This question type was written by Jamie Pratt (http://jamiep.org/).
This question type is compatible with Moodle 2.1+ (MOODLE_21_STABLE branch) or 2.2+ (master branch).
This question type is compatible with Moodle 2.1+ (MOODLE_21_STABLE branch) or
2.2+ (master branch).
To install using git for a 2.2+ Moodle installation, type this command in the root of your Moodle
install :
To install using git for a 2.2+ Moodle installation, type this command in the
root of your Moodle install:
git clone git://github.com/moodleou/moodle-qtype_ddimageortext.git question/type/ddimageortext
To install using git for a 2.1+ Moodle installation, type this command in the root of your Moodle
install :
To install using git for a 2.1+ Moodle installation, type this command in the
root of your Moodle install:
git clone -b MOODLE_21_STABLE git://github.com/moodleou/moodle-qtype_ddimageortext.git question/type/ddimageortext
git clone -b MOODLE_21_STABLE git://github.com/moodleou/moodle-qtype_ddimageortext.git question/type/ddimageortext
Then add question/type/ddimageortext to your git ignore.
+3 -4
View File
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Drag-and-drop words into sentences question definition class.
* Drag-and-drop onto image question definition class.
*
* @package qtype
* @subpackage ddimageortext
* @package qtype_ddimageortext
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -30,7 +29,7 @@ require_once($CFG->dirroot . '/question/type/ddimageortext/questionbase.php');
/**
* Represents a drag-and-drop images to image question.
* Represents a drag-and-drop onto image question.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+3 -4
View File
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Drag-and-drop words into sentences question definition class.
* Drag-and-drop onto image question definition class.
*
* @package qtype
* @subpackage ddimageortext
* @package qtype_ddimageortext
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -30,7 +29,7 @@ require_once($CFG->dirroot . '/question/type/gapselect/questionbase.php');
/**
* Represents a drag-and-drop images to image question.
* Represents a drag-and-drop onto image question.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+7 -6
View File
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Question type class for the drag-and-drop images onto images question type.
* Question type class for the drag-and-drop onto image question type.
*
* @package qtype
* @subpackage ddimageortext
* @package qtype_ddimageortext
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -34,7 +33,7 @@ define('QTYPE_DDIMAGEORTEXT_DRAGIMAGE_MAXWIDTH', 150);
define('QTYPE_DDIMAGEORTEXT_DRAGIMAGE_MAXHEIGHT', 100);
/**
* The drag-and-drop words into sentences question type class.
* The drag-and-drop onto image question type class.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -158,6 +157,7 @@ class qtype_ddimageortext extends qtype_ddtoimage_base {
}
$this->move_files_in_combined_feedback($questionid, $oldcontextid, $newcontextid);
$this->move_files_in_hints($questionid, $oldcontextid, $newcontextid);
}
/**
@@ -179,10 +179,11 @@ class qtype_ddimageortext extends qtype_ddtoimage_base {
}
$this->delete_files_in_combined_feedback($questionid, $contextid);
$this->delete_files_in_hints($questionid, $contextid);
}
public function export_to_xml($question, $format, $extra = null) {
public function export_to_xml($question, qformat_xml $format, $extra = null) {
$fs = get_file_storage();
$contextid = $question->contextid;
$output = '';
@@ -222,7 +223,7 @@ class qtype_ddimageortext extends qtype_ddtoimage_base {
return $output;
}
public function import_from_xml($data, $question, $format, $extra=null) {
public function import_from_xml($data, $question, qformat_xml $format, $extra=null) {
if (!isset($data['@']['type']) || $data['@']['type'] != 'ddimageortext') {
return false;
}
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Question type class for the drag-and-drop images onto images question type.
* Question type class for the drag-and-drop onto image question type.
*
* @package qtype
* @subpackage ddimageortext
* @package qtype_ddimageortext
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -32,7 +31,7 @@ require_once($CFG->dirroot . '/question/format/xml/format.php');
require_once($CFG->dirroot . '/question/type/gapselect/questiontypebase.php');
/**
* The drag-and-drop words into sentences question type class.
* The drag-and-drop onto image question type class.
*
* @copyright 2009 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+3 -4
View File
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Drag-and-drop words into sentences question renderer class.
* Drag-and-drop onto image question renderer class.
*
* @package qtype
* @subpackage ddimageortext
* @package qtype_ddimageortext
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -29,7 +28,7 @@ defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/question/type/ddimageortext/rendererbase.php');
/**
* Generates the output for drag-and-drop words into sentences questions.
* Generates the output for drag-and-drop onto image questions.
*
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+3 -4
View File
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Drag-and-drop words into sentences question renderer class.
* Drag-and-drop onto image question renderer class.
*
* @package qtype
* @subpackage ddimageortext
* @package qtype_ddimageortext
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -27,7 +26,7 @@
defined('MOODLE_INTERNAL') || die();
/**
* Generates the output for drag-and-drop words into sentences questions.
* Generates the output for drag-and-drop onto image questions.
*
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Test helpers for the drag-and-drop words into sentences question type.
* Test helpers for the drag-and-drop onto image question type.
*
* @package qtype
* @subpackage ddimageortext
* @package qtype_ddimageortext
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -28,7 +27,7 @@ defined('MOODLE_INTERNAL') || die();
/**
* Test helper class for the drag-and-drop words into sentences question type.
* Test helper class for the drag-and-drop onto image question type.
*
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -47,7 +46,7 @@ class qtype_ddimageortext_test_helper extends question_test_helper {
test_question_maker::initialise_a_question($dd);
$dd->name = 'Drag-and-drop words into sentences question';
$dd->name = 'Drag-and-drop onto image question';
$dd->questiontext = 'The quick brown fox jumped over the lazy dog.';
$dd->generalfeedback = 'This sentence uses each letter of the alphabet.';
$dd->qtype = question_bank::get_qtype('ddimageortext');
@@ -103,7 +102,7 @@ class qtype_ddimageortext_test_helper extends question_test_helper {
test_question_maker::initialise_a_question($dd);
$dd->name = 'Drag-and-drop words into sentences question';
$dd->name = 'Drag-and-drop onto image question';
$dd->questiontext = 'Fill in the operators to make this equation work: ' .
'7 [[1]] 11 [[2]] 13 [[1]] 17 [[2]] 19 = 3';
$dd->generalfeedback = 'This sentence uses each letter of the alphabet.';
@@ -15,10 +15,9 @@
// 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 onto image question definition class.
*
* @package qtype
* @subpackage ddimageortext
* @package qtype_ddimageortext
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -15,10 +15,9 @@
// 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 onto image question definition class.
*
* @package qtype
* @subpackage ddimageortext
* @package qtype_ddimageortext
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -31,7 +30,7 @@ require_once($CFG->dirroot . '/question/type/ddimageortext/simpletest/helper.php
/**
* Unit tests for the drag-and-drop words into sentences question definition class.
* Unit tests for the drag-and-drop onto image question definition class.
*
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for the drag-and-drop words into sentences question type.
* Unit tests for the drag-and-drop onto image question type.
*
* @package qtype
* @subpackage ddimageortext
* @package qtype_ddimageortext
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -31,7 +30,7 @@ require_once($CFG->dirroot . '/question/type/ddimageortext/simpletest/helper.php
/**
* Unit tests for the drag-and-drop words into sentences question type.
* Unit tests for the drag-and-drop onto image question type.
*
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+11 -6
View File
@@ -15,18 +15,23 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the drag-and-drop words into sentences question type.
* Version information for the drag-and-drop onto image question type.
*
* @package qtype
* @subpackage ddimageortext
* @package qtype_ddimageortext
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2011051200;
$plugin->requires = 2011051212;
$plugin->version = 2011051200;
$plugin->requires = 2011120500;
$plugin->cron = 0;
$plugin->component = 'qtype_ddimageortext';
$plugin->maturity = MATURITY_STABLE;
$plugin->release = '1.0';
$plugin->dependencies = array(
'qtype_gapselect' => 2011020100,
);
);