From 096b04058b9f5ff43e55bfb70a487e05ed1fa0df Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Sun, 5 Apr 2015 20:37:27 +0100 Subject: [PATCH] MDL-47494 questions: clean up unnecessary stuff now these are not plugins * Remove extra stuff from version.php files. * Remove README.txt files * Remove OU-specific test annotations. --- question/type/ddimageortext/README.txt | 22 --- .../ddimageortext/tests/behat/add.feature | 2 +- .../tests/behat/backup_and_restore.feature | 2 +- .../ddimageortext/tests/behat/edit.feature | 2 +- .../ddimageortext/tests/behat/export.feature | 2 +- .../ddimageortext/tests/behat/import.feature | 2 +- .../ddimageortext/tests/behat/preview.feature | 2 +- question/type/ddimageortext/version.php | 9 +- question/type/ddmarker/README.md | 140 ------------------ .../type/ddmarker/tests/behat/add.feature | 2 +- .../tests/behat/backup_and_restore.feature | 2 +- .../type/ddmarker/tests/behat/edit.feature | 2 +- .../type/ddmarker/tests/behat/export.feature | 2 +- .../type/ddmarker/tests/behat/import.feature | 2 +- .../type/ddmarker/tests/behat/preview.feature | 2 +- question/type/ddmarker/version.php | 13 +- question/type/ddwtos/README.txt | 22 --- question/type/ddwtos/version.php | 11 +- question/type/gapselect/README.txt | 21 --- .../gapselect/tests/behat/basic_test.feature | 2 +- .../gapselect/tests/behat/import_test.feature | 2 +- question/type/gapselect/version.php | 9 +- 22 files changed, 29 insertions(+), 246 deletions(-) delete mode 100644 question/type/ddimageortext/README.txt delete mode 100644 question/type/ddmarker/README.md delete mode 100644 question/type/ddwtos/README.txt delete mode 100644 question/type/gapselect/README.txt diff --git a/question/type/ddimageortext/README.txt b/question/type/ddimageortext/README.txt deleted file mode 100644 index 1532a2a799c..00000000000 --- a/question/type/ddimageortext/README.txt +++ /dev/null @@ -1,22 +0,0 @@ -A drag-and-drop question type - -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/ -to be installed in order to work. - -This question type was written by Jamie Pratt (http://jamiep.org/). - -This version of this question type is compatible with Moodle 2.5+. There are -other versions available for Moodle 2.3+. - -To install using git, type this command in the root of your Moodle install - git clone git@github.com:moodleou/moodle-qtype_ddimageortext.git question/type/ddimageortext -Then add question/type/ddimageortext to your git ignore. - - -Alternatively, download the zip from - https://github.com/moodleou/moodle-qtype_ddimageortext/zipball/master -unzip it into the question/type folder, and then rename the new folder to ddimageortext. diff --git a/question/type/ddimageortext/tests/behat/add.feature b/question/type/ddimageortext/tests/behat/add.feature index f1aa2dc3bfb..60e8edece2f 100644 --- a/question/type/ddimageortext/tests/behat/add.feature +++ b/question/type/ddimageortext/tests/behat/add.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddimageortext +@qtype @qtype_ddimageortext Feature: Test creating a drag and drop onto image question As a teacher In order to test my students diff --git a/question/type/ddimageortext/tests/behat/backup_and_restore.feature b/question/type/ddimageortext/tests/behat/backup_and_restore.feature index f1115688e0d..afe922a3885 100644 --- a/question/type/ddimageortext/tests/behat/backup_and_restore.feature +++ b/question/type/ddimageortext/tests/behat/backup_and_restore.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddimageortext +@qtype @qtype_ddimageortext Feature: Test duplicating a quiz containing a drag and drop onto image question As a teacher In order re-use my courses containing drag and drop onto image questions diff --git a/question/type/ddimageortext/tests/behat/edit.feature b/question/type/ddimageortext/tests/behat/edit.feature index ca18b7ea220..b0cc864d0e7 100644 --- a/question/type/ddimageortext/tests/behat/edit.feature +++ b/question/type/ddimageortext/tests/behat/edit.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddimageortext +@qtype @qtype_ddimageortext Feature: Test editing a drag and drop onto image questions As a teacher In order to be able to update my drag and drop onto image questions diff --git a/question/type/ddimageortext/tests/behat/export.feature b/question/type/ddimageortext/tests/behat/export.feature index ee2d80b9333..e41a8983a47 100644 --- a/question/type/ddimageortext/tests/behat/export.feature +++ b/question/type/ddimageortext/tests/behat/export.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddimageortext +@qtype @qtype_ddimageortext Feature: Test exporting drag and drop onto image questions As a teacher In order to be able to reuse my drag and drop onto image questions diff --git a/question/type/ddimageortext/tests/behat/import.feature b/question/type/ddimageortext/tests/behat/import.feature index 58079b9653b..9178b216ca7 100644 --- a/question/type/ddimageortext/tests/behat/import.feature +++ b/question/type/ddimageortext/tests/behat/import.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddimageortext +@qtype @qtype_ddimageortext Feature: Test importing drag and drop onto image questions As a teacher In order to reuse drag and drop onto image questions diff --git a/question/type/ddimageortext/tests/behat/preview.feature b/question/type/ddimageortext/tests/behat/preview.feature index 70061d224ee..014cb540b1d 100644 --- a/question/type/ddimageortext/tests/behat/preview.feature +++ b/question/type/ddimageortext/tests/behat/preview.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddimageortext +@qtype @qtype_ddimageortext Feature: Preview a drag-drop onto image question As a teacher In order to check my drag-drop onto image questions will work for students diff --git a/question/type/ddimageortext/version.php b/question/type/ddimageortext/version.php index 8ea598a72af..5d4c73cf1aa 100644 --- a/question/type/ddimageortext/version.php +++ b/question/type/ddimageortext/version.php @@ -25,14 +25,11 @@ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2015051000; -$plugin->requires = 2013101800; -$plugin->cron = 0; +$plugin->requires = 2014110400; + $plugin->component = 'qtype_ddimageortext'; $plugin->maturity = MATURITY_STABLE; -$plugin->release = '1.8 for Moodle 2.6+'; $plugin->dependencies = array( - 'qtype_gapselect' => 2014111200, + 'qtype_gapselect' => 2015040500, ); - -$plugin->outestssufficient = true; diff --git a/question/type/ddmarker/README.md b/question/type/ddmarker/README.md deleted file mode 100644 index db9d5e75f09..00000000000 --- a/question/type/ddmarker/README.md +++ /dev/null @@ -1,140 +0,0 @@ -Drag-and-drop markers question type ------------------------------------ - -You can use markers with text labels as drag items onto rectangular, circular or -polygon drop zones on a background image. - -This question type requires that gapselect question type -https://github.com/moodleou/moodle-qtype_ddimageortext/ and -https://github.com/moodleou/moodle-qtype_gapselect/ -to be installed in order to work. - -This question type was written by Jamie Pratt (http://jamiep.org/) for the Open -University. - -This version of this question type is compatible with Moodle 2.5+. There are -other versions available for Moodle 2.3+. - -###Installation - -####Installation Using Git - -To install using git for a 2.3+ Moodle installation, type this command in the -root of your Moodle install: - git clone git://github.com/moodleou/moodle-qtype_ddmarker.git question/type/ddmarker -Then add question/type/ddmarker to your git ignore. - -####Installation From Downloaded zip file - -Alternatively, download the zip from: - https://github.com/moodleou/moodle-qtype_ddmarker/zipball/master -unzip it into the question/type folder, and then rename the new folder to ddmarker. - -###Converting 'image target' type questions to this type - -The imagetarget question type question type will not be upgraded to use with Moodle beyond version 1.9 it seems. - -But you can convert your existing image target questions and question attempt data to be drag and drop marker questions and they -will work as the image target previously worked. - -There are two ways to convert your imagetarget questions to ddmarker question types. - -####Automatic Conversion (recommended) - -Conversion will happen automatically when you upgrade for Moodle 2.0. - -It is recommended you follow the following steps: - -Upgrade your site to Moodle 2.0. This involves: - -* Upgrade the code base to Moodle 2.0 -* Remove the imagetarget question type code from question/type/imagetarget/ -* Go to your http://{moodleroot}/admin/ to trigger the upgrade of the db - -At this point your imagetarget questions won't work and will show up as -'missing type' but once that upgrade is done change your Moodle code to Moodle 2.2+ - -* install the ddmarker question type code in question type ddmarker. -* then go to your http://{moodleroot}/admin/ to trigger the upgrade of the db - -This will convert all your imagetarget questions to ddmarker automatically. - -####Manual Conversion - -You can also use a manual script to convert imagetarget questions to ddmarker -after upgrading to Moodle 2.1 or greater. - -* Log in as admin. -* You will find a script in the admin menu under plugins/question types/ to -convert your imagetarget questions to ddmarker. -(This just converts your questions themselves.) -* In order to convert your question attempt data to be used with the ddmarker -question type and Moodle 2.1 or greater you need to find the 'question engine -upgrade helper' which will appear at the root of the admin menu. Use this script to: -* _Reset the upgrade of all attempt data._ -* _Run the attempt data upgrade again._ - -###Issues with converting image target question type questions - -####Background image shrinkage - -The ddmarker question type will shrink the background image of your questions to -be within a maximum size and width while at the time preserving aspect ratio of -the image. The default max width is 600 pixels and height 400 pixels. - -The ddmarker question type does this whenever you edit a question and save it again. - -Unfortunately when you open up a question to edit it this means that if the -image is to big it will be shrunk but at present the position of your drop zones -are not moved to compensate for this shrinkage. There won't be a problem until -you try to edit and save a question but when you open it in the editor the drop -zones will not be in the correct position. If you save the question they -they will then be saved in the wrong position. - -####Work around for background image shrinkage - -Either: - -* do not edit questions which have sizes above the allowed max. -* or you can change the allowed maximum size of images there are two constant at -the top of question/type/ddmarker/questiontype.php that define the size limits. - -The limit is just there to shrink outrageously large images down to a reasonable -size automatically. You could set the value of the constants defining the max -size to a very large value to effectively disable the image size constraints all -together. - -####Lack of drag label in imagetarget questions - -Normally each draggable marker in the ddmarker question type has a text label. -There are no labels for the imagetarget markers though, I needed to pick -something that will work in any language as the label for the single imagetarget -draggable marker so I picked 'X'. - -####Work around for lack of drag label in imagetarget questions - -Your teachers can edit this label after the question has been created. And they -might also like to take advantage of the ability in the ddmarker question type -to be able to specify the correct drop zones for more than one drag marker onto -the same image, giving each drag marker a different label. - -You can change the default drag marker label which you can find defined in a -constant at the top of question/type/ddmarker/lib.php - -####No automatic feedback telling the user whether they got the question right, partially right or wrong. - -In the imagetarget question you get a text message telling the user whether they -got the question correct, partially correct or wrong. In many of the new -question types in Moodle 2.1 onwards the teacher is expected to enter the -message that the user will see in the question definition. This is called -'combined feedback' and by default it is blank. So questions that have been -converted from per 2.1 Moodle, from imagetarget question types that used to -give some feedback to the user will no longer do so. - -####Work around for lack of automatic feedback telling the user whether they got - -the question right, partially right or wrong. - -You can use this plug in -https://github.com/jamiepratt/moodle-admin_tool_questionaddfeedback to bulk add -feedback to questions. diff --git a/question/type/ddmarker/tests/behat/add.feature b/question/type/ddmarker/tests/behat/add.feature index 3fe66c7e1e7..4f55af6c364 100644 --- a/question/type/ddmarker/tests/behat/add.feature +++ b/question/type/ddmarker/tests/behat/add.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddmarker +@qtype @qtype_ddmarker Feature: Test creating a drag and drop markers question As a teacher In order to test my students diff --git a/question/type/ddmarker/tests/behat/backup_and_restore.feature b/question/type/ddmarker/tests/behat/backup_and_restore.feature index 9915c633126..bff18e20a62 100644 --- a/question/type/ddmarker/tests/behat/backup_and_restore.feature +++ b/question/type/ddmarker/tests/behat/backup_and_restore.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddmarker +@qtype @qtype_ddmarker Feature: Test duplicating a quiz containing a drag and drop markers question As a teacher In order re-use my courses containing drag and drop markers questions diff --git a/question/type/ddmarker/tests/behat/edit.feature b/question/type/ddmarker/tests/behat/edit.feature index e46d32c0bec..728e8c98550 100644 --- a/question/type/ddmarker/tests/behat/edit.feature +++ b/question/type/ddmarker/tests/behat/edit.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddmarker +@qtype @qtype_ddmarker Feature: Test editing a drag and drop markers questions As a teacher In order to be able to update my drag and drop markers questions diff --git a/question/type/ddmarker/tests/behat/export.feature b/question/type/ddmarker/tests/behat/export.feature index fa2005bc7bd..c836c4e210c 100644 --- a/question/type/ddmarker/tests/behat/export.feature +++ b/question/type/ddmarker/tests/behat/export.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddmarker +@qtype @qtype_ddmarker Feature: Test exporting drag and drop markers questions As a teacher In order to be able to reuse my drag and drop markers questions diff --git a/question/type/ddmarker/tests/behat/import.feature b/question/type/ddmarker/tests/behat/import.feature index eb2591149fa..2ce47c47450 100644 --- a/question/type/ddmarker/tests/behat/import.feature +++ b/question/type/ddmarker/tests/behat/import.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddmarker +@qtype @qtype_ddmarker Feature: Test importing drag and drop markers questions As a teacher In order to reuse drag and drop markers questions diff --git a/question/type/ddmarker/tests/behat/preview.feature b/question/type/ddmarker/tests/behat/preview.feature index a46d14b19da..48b71b59288 100644 --- a/question/type/ddmarker/tests/behat/preview.feature +++ b/question/type/ddmarker/tests/behat/preview.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_ddmarker +@qtype @qtype_ddmarker Feature: Preview a drag-drop onto image question As a teacher In order to check my drag-drop onto image questions will work for students diff --git a/question/type/ddmarker/version.php b/question/type/ddmarker/version.php index 07723dbac6b..04ab482e81b 100644 --- a/question/type/ddmarker/version.php +++ b/question/type/ddmarker/version.php @@ -24,16 +24,13 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2015031800; -$plugin->requires = 2013101800; -$plugin->cron = 0; +$plugin->version = 2015040500; +$plugin->requires = 2014110400; + $plugin->component = 'qtype_ddmarker'; $plugin->maturity = MATURITY_STABLE; -$plugin->release = '1.8 for Moodle 2.5+'; $plugin->dependencies = array( - 'qtype_gapselect' => 2014111200, - 'qtype_ddimageortext' => 2014111200, + 'qtype_gapselect' => 2015040500, + 'qtype_ddimageortext' => 2015040500, ); - -$plugin->outestssufficient = true; diff --git a/question/type/ddwtos/README.txt b/question/type/ddwtos/README.txt deleted file mode 100644 index 38aef8b2739..00000000000 --- a/question/type/ddwtos/README.txt +++ /dev/null @@ -1,22 +0,0 @@ -Drag-and-drop, words to sentences question type - -This question type requires that gapselect question type -https://github.com/moodleou/moodle-qtype_gapselect/ -to be installed in order to work. - -This question type was originally the work of Mahmoud Kassaei at the Open -University (http://www.open.ac.uk/). It was updated to work with the Moodle 2.1 -question engine by Tim Hunt. It was then refactored extenstively by Jamie Pratt -(http://jamiep.org/) as part of creating the gapselect question type. - - -This version of this question type is compatible with Moodle 2.5+. There are -other versions available for Moodle 2.1+. - -To install using git, type this command in the root of your Moodle install - git clone git://github.com/moodleou/moodle-qtype_ddwtos.git question/type/ddwtos -Then add question/type/ddwtos to your git ignore. - -Alternatively, download the zip from - https://github.com/moodleou/moodle-qtype_ddwtos/zipball/master -unzip it into the question/type folder, and then rename the new folder to ddwtos. diff --git a/question/type/ddwtos/version.php b/question/type/ddwtos/version.php index 86a9e89ce5e..b0d0a4c7731 100644 --- a/question/type/ddwtos/version.php +++ b/question/type/ddwtos/version.php @@ -24,15 +24,12 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2015031800; -$plugin->requires = 2013101800; -$plugin->cron = 0; +$plugin->version = 2015040500; +$plugin->requires = 2014110400; + $plugin->component = 'qtype_ddwtos'; $plugin->maturity = MATURITY_STABLE; -$plugin->release = '1.5 for Moodle 2.6+'; $plugin->dependencies = array( - 'qtype_gapselect' => 2014111200, + 'qtype_gapselect' => 2015040500, ); - -$plugin->outestssufficient = true; diff --git a/question/type/gapselect/README.txt b/question/type/gapselect/README.txt deleted file mode 100644 index 140a7764ebd..00000000000 --- a/question/type/gapselect/README.txt +++ /dev/null @@ -1,21 +0,0 @@ -Gap-select question type - -This question type allows students to complete a paragraph of text by selecting the -missing words using drop-down menus. You can make questions like this using the -Cloze question type, but this question type is easier for teachers to get up, and -presents the feedback in a more accessible way. - -The question type was created by Jamie Pratt (http://jamiep.org/) paid for by -the Open University (http://www.open.ac.uk/). - - -This version of this question type is compatible with Moodle 2.5+. There are -other versions available for Moodle 2.3+. - -To install using git, type this command in the root of your Moodle install - git clone git@github.com:moodleou/moodle-qtype_gapselect.git question/type/gapselect -Then add question/type/gapselect to your git ignore. - -Alternatively, download the zip from - https://github.com/moodleou/moodle-qtype_gapselect/zipball/master -unzip it into the question/type folder, and then rename the new folder to gapselect. diff --git a/question/type/gapselect/tests/behat/basic_test.feature b/question/type/gapselect/tests/behat/basic_test.feature index 3e0b67bfeaa..bd32c95650d 100644 --- a/question/type/gapselect/tests/behat/basic_test.feature +++ b/question/type/gapselect/tests/behat/basic_test.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_gapselect +@qtype @qtype_gapselect Feature: Test all the basic functionality of this question type In order to evaluate students responses, As a teacher I need to create and preview gapselect (Select missing words) questions. diff --git a/question/type/gapselect/tests/behat/import_test.feature b/question/type/gapselect/tests/behat/import_test.feature index a35a7d67001..7c3e3f917ec 100644 --- a/question/type/gapselect/tests/behat/import_test.feature +++ b/question/type/gapselect/tests/behat/import_test.feature @@ -1,4 +1,4 @@ -@ou @ou_vle @qtype @qtype_gapselect +@qtype @qtype_gapselect Feature: Import and export select missing words questions As a teacher In order to reuse my select missing words questions diff --git a/question/type/gapselect/version.php b/question/type/gapselect/version.php index 0b5c87d54a7..cee892cd5c7 100644 --- a/question/type/gapselect/version.php +++ b/question/type/gapselect/version.php @@ -24,11 +24,8 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2015031800; -$plugin->requires = 2013101800; -$plugin->cron = 0; +$plugin->version = 2015040500; +$plugin->requires = 2014110400; + $plugin->component = 'qtype_gapselect'; $plugin->maturity = MATURITY_STABLE; -$plugin->release = '1.7 for Moodle 2.6+'; - -$plugin->outestssufficient = true;