Skip to content

Commit 97fe90c

Browse files
committed
Document bulk test of questions in a quiz. (#5121)
1 parent b9e524d commit 97fe90c

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

doc/en/Developer/Development_track.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Changes and new features.
2121
4. Editing of question XML within STACK from link in STACK dashboard. STACK now requires the importasversion plugin to make this possible.
2222
5. Much code tidying to comply with updated to Moodle Code Checker.
2323
6. Add in suppport for `style` in Parsons blocks. E.g. you can now use `style="compact"` to get smaller, tighter items.
24+
7. Facilitate bulk test for questions in a particular quiz. (Issue #1521) Follow the link from the question dashboard to see quizzes in which that question is used.
2425

2526
Issues with [github milestone 4.12.0](https://github.com/maths/moodle-qtype_stack/issues?q=is%3Aissue+milestone%3A4.12.0) include
2627

doc/en/STACK_question_admin/Bulk_testing.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Bulk testing STACK questions on your site
22

3-
You can bulk test all question tests on all variants of all STACK questions by using the bulk-test script. Access this functionality from STACK's "adminui" page (or the plugin setting page)
3+
You can bulk test all question tests on all variants of all STACK questions by using the bulk-test script. There are two ways to bulk test.
44

5-
[...]/question/type/stack/adminui/index.php
5+
1. Bulk test all questions in a course or category. To do this, access STACK's "adminui" page (or the plugin setting page) `[...]/question/type/stack/adminui/index.php`
6+
2. Bulk test all questions in a particular quiz. Follow the link from the question dashboard to see quizzes in which that question is used.
67

78
To make use of the bulk test users require the capability `qtype/stack:usediagnostictools` via Moodle's capability system.
89

9-
The bulk-test index page lists all Moodle contexts which contain STACK questions. You can bulk-test by context.
10-
1110
Bulk testing does the following.
1211

1312
1. Validate the STACK question against it's `stackversion` number. STACK questions store the version of the STACK plug-in _last used_ to edit the question. The bulk tester checks for changes with the current STACK plug-in version.

stack/cas/castext2/blocks/parsons.block.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,10 @@ public function validate(
568568
) {
569569
$valid = false;
570570
$err[] = stack_string('stackBlock_parsons_unknown_style', ['style' => $stylename]);
571-
} else if (!file_exists($CFG->dirroot . '/question/type/stack/corsscripts/parsonsstyles/' .
572-
$stylename . '.min.css')) {
571+
} else if (
572+
!file_exists($CFG->dirroot . '/question/type/stack/corsscripts/parsonsstyles/' .
573+
$stylename . '.min.css')
574+
) {
573575
$valid = false;
574576
$err[] = stack_string('stackBlock_parsons_unknown_style', ['style' => $stylename]);
575577
}

tests/parsons_block_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ public function test_parsons_validate_stylename(): void {
348348
'"3":"\\[ n^2 = (2m+1)^2 = 2(2m^2+2m)+1.\\]", ' .
349349
'"4":"Define \\(M=2m^2+2m\\in\\mathbb{Z}\\) then \\(n^2=2M+1\\).", ' .
350350
'} [[/parsons]]';
351-
351+
352352
$at1 = castext2_evaluatable::make_from_source($raw, 'test-case');
353353
$session = new stack_cas_session2([$at1]);
354354
$this->assertFalse($at1->get_valid());

0 commit comments

Comments
 (0)