MDL-47494 ddimageortext: Merge branch 'MOODLE_21_STABLE'

Conflicts:
	README.txt
	lang/en/qtype_ddimageortext.php
	version.php
This commit is contained in:
Tim Hunt 2012-02-10 16:00:47 +00:00
commit eeb58297a6
13 changed files with 58 additions and 55 deletions

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.

View file

@ -32,6 +32,7 @@ $string['draggableitem'] = 'Draggable item';
$string['draggableitemheader'] = 'Draggable item {$a}';
$string['draggableitemtype'] = 'Type';
$string['draggableword'] = 'Draggable text';
$string['dropbackground'] = 'Background image for dragging markers onto';
$string['dropzone'] = 'Drop zone {$a}';
$string['dropzoneheader'] = 'Drop zones';
$string['formerror_disallowedtags'] = 'You have used html tags here that are not allowed in a draggable text drag item type.';

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

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

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

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
*/
@ -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

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

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
@ -64,7 +63,11 @@ class qtype_ddtoimage_renderer_base extends qtype_with_combined_feedback_rendere
$bgimage = self::get_url_for_image($qa, 'bgimage');
$img = html_writer::empty_tag('img', array('src'=>$bgimage, 'class'=>'dropbackground'));
$img = html_writer::empty_tag('img',
array('src'=>$bgimage,
'class'=>'dropbackground',
'alt' => get_string('dropbackground', 'qtype_ddimageortext')));
$droparea = html_writer::tag('div', $img, array('class'=>'droparea'));
$dragimagehomes = '';

View file

@ -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.';

View file

@ -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
*/

View file

@ -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

View file

@ -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

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,
);
);