MDL-79863 qtype_ordering: qtype_ordering modify markdown syntax for long help messages (for compatability with Moodle 3.11)

This commit is contained in:
Gordon Bateson
2024-04-04 10:59:30 +08:00
committed by Mathew May
parent 1ba7af3582
commit f56dc82e52
5 changed files with 26 additions and 23 deletions
+3
View File
@@ -2,6 +2,9 @@
Change log for qtype_ordering
========================================
2021-09-14 (04)
- modify markdown syntax for long help messages (for compatability with Moodle 3.11)
2021-06-13 (03)
- fix Issue #63. Restore missing method 'set_default_value()'
@@ -41,32 +41,32 @@ $string['gradedetails'] = 'Grade details';
$string['gradingtype'] = 'Grading type';
$string['gradingtype_help'] = 'Choose the type of grading calculation.
**All or nothing**
: If all items are in the correct position, then full marks are awarded. Otherwise, the score is zero.
**All or nothing**
  If all items are in the correct position, then full marks are awarded. Otherwise, the score is zero.
**Absolute position**
: An item is considered correct if it is in the same position as in the correct answer. The highest possible score for the question is **the same as** the number of items displayed to the student.
**Absolute position**
  An item is considered correct if it is in the same position as in the correct answer. The highest possible score for the question is **the same as** the number of items displayed to the student.
**Relative to correct position**
: An item is considered correct if it is in the same position as in the correct answer. Correct items receive a score equal to the number of items displayed minus one. Incorrect items receive a score equal to the number of items displayed minus one and minus the distance of the item from its correct position. Thus, if ***n*** items are displayed to the student, the number of marks available for each item is ***(n - 1)***, and the highest mark available for the question is ***n x (n - 1)***, which is the same as ***(n² - n)***.
**Relative to correct position**
  An item is considered correct if it is in the same position as in the correct answer. Correct items receive a score equal to the number of items displayed minus one. Incorrect items receive a score equal to the number of items displayed minus one and minus the distance of the item from its correct position. Thus, if ***n*** items are displayed to the student, the number of marks available for each item is ***(n - 1)***, and the highest mark available for the question is ***n x (n - 1)***, which is the same as ***(n² - n)***.
**Relative to the next item (excluding last)**
: An item is considered correct if it is followed by the same item as it is in the correct answer. The item in the last position is not checked. Thus, the highest possible score for the question is **one less than** the number of items displayed to the student.
**Relative to the next item (excluding last)**
  An item is considered correct if it is followed by the same item as it is in the correct answer. The item in the last position is not checked. Thus, the highest possible score for the question is **one less than** the number of items displayed to the student.
**Relative to the next item (including last)**
: An item is considered correct if it is followed by the same item as it is in the correct answer. This includes the last item which must have no item following it. Thus, the highest possible score for the question is **the same as** the number of items displayed to the student.
**Relative to the next item (including last)**
  An item is considered correct if it is followed by the same item as it is in the correct answer. This includes the last item which must have no item following it. Thus, the highest possible score for the question is **the same as** the number of items displayed to the student.
**Relative to both the previous and next items**
: An item is considered correct if both the previous and next items are the same as they are in the correct answer. The first item should have no previous item, and the last item should have no next item. Thus, there are two possible points for each item, and the highest possible score for the question is **twice** the number of items displayed to the student.
**Relative to both the previous and next items**
  An item is considered correct if both the previous and next items are the same as they are in the correct answer. The first item should have no previous item, and the last item should have no next item. Thus, there are two possible points for each item, and the highest possible score for the question is **twice** the number of items displayed to the student.
**Relative to ALL previous and next items**
: An item is considered correct if it is preceded by all the same items as it is in the correct answer, and it is followed by all the same items as it is in the correct answer. The order of the previous items does not matter, and nor does the order of the following items. Thus, if ***n*** items are displayed to the student, the number of marks available for each item is ***(n - 1)***, and the highest mark available for the question is ***n x (n - 1)***, which is the same as ***(n² - n)***.
**Relative to ALL previous and next items**
  An item is considered correct if it is preceded by all the same items as it is in the correct answer, and it is followed by all the same items as it is in the correct answer. The order of the previous items does not matter, and nor does the order of the following items. Thus, if ***n*** items are displayed to the student, the number of marks available for each item is ***(n - 1)***, and the highest mark available for the question is ***n x (n - 1)***, which is the same as ***(n² - n)***.
**Longest ordered subset**
: The grade is the number of items in the longest ordered subset of items. The highest possible grade is the same as the number of items displayed. A subset must have at least two items. Subsets do not need to start at the first item (but they can) and they do not need to be contiguous (but they can be). Where there are multiple subsets of equal length, items in the subset that is found first, when searching from left to right, will be displayed as correct. Other items will be marked as incorrect.
**Longest ordered subset**
  The grade is the number of items in the longest ordered subset of items. The highest possible grade is the same as the number of items displayed. A subset must have at least two items. Subsets do not need to start at the first item (but they can) and they do not need to be contiguous (but they can be). Where there are multiple subsets of equal length, items in the subset that is found first, when searching from left to right, will be displayed as correct. Other items will be marked as incorrect.
**Longest contiguous subset**
: The grade is the number of items in the longest contiguous subset of items. The highest possible grade is the same as the number of items displayed. A subset must have at least two items. Subsets do not need to start at the first item (but they can) and they MUST BE CONTIGUOUS. Where there are multiple subsets of equal length, items in the subset that is found first, when searching from left to right, will be displayed as correct. Other items will be marked as incorrect.';
**Longest contiguous subset**
  The grade is the number of items in the longest contiguous subset of items. The highest possible grade is the same as the number of items displayed. A subset must have at least two items. Subsets do not need to start at the first item (but they can) and they MUST BE CONTIGUOUS. Where there are multiple subsets of equal length, items in the subset that is found first, when searching from left to right, will be displayed as correct. Other items will be marked as incorrect.';
$string['horizontal'] = 'Horizontal';
+1 -1
View File
@@ -776,7 +776,7 @@ class qtype_ordering_question extends question_graded_automatically {
}
/**
* Returns availibe values and descriptions for field "selecttype"
* Returns available values and descriptions for field "selecttype"
*
* @param int $type
* @return array|string array if $type is not specified and single string if $type is specified
@@ -41,11 +41,11 @@ class qtype_ordering_test extends advanced_testcase {
/** @var qtype_ordering instance of the question type class to test. */
protected $qtype;
protected function setUp(): void {
protected function setUp() {
$this->qtype = new qtype_ordering();
}
protected function tearDown(): void {
protected function tearDown() {
$this->qtype = null;
}
+2 -2
View File
@@ -29,5 +29,5 @@ $plugin->cron = 0;
$plugin->component = 'qtype_ordering';
$plugin->maturity = MATURITY_STABLE;
$plugin->requires = 2015051100; // Moodle 2.9.
$plugin->version = 2021061303;
$plugin->release = '2021-06-13 (03)';
$plugin->version = 2021091404;
$plugin->release = '2021-09-14 (04)';