Issue Details (XML | Word | Printable)

Key: MDL-4004
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Tim Hunt
Reporter: Mark Nielsen
Votes: 24
Watchers: 15
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Make the manual grading report work with random questions that pick manually graded questions

Created: 01/Sep/05 07:32 AM   Updated: 18/Feb/09 02:35 AM
Return to search
Component/s: Quiz
Affects Version/s: 1.6.4, 1.7.1
Fix Version/s: 1.9.4

File Attachments: 1. Text File MDL-4004-essay_questions_in_random.patch (2 kB)
2. Text File moodle-1.6.4plus-MDL4004-essay_questions_in_random.patch (2 kB)

Environment: All
Issue Links:
Blockers
 
Dependency
 
Duplicate
 

Participants: A. T. Wyatt, Ashley Holman, Mark Nielsen, Martin Dougiamas, Matt Oquist, Paulo Matos and Tim Hunt
Security Level: None
Resolved date: 28/Nov/08
Affected Branches: MOODLE_16_STABLE, MOODLE_17_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
Encountered a problem for grading Essay Questions.

To reproduce the problem:
0. Edit the essay question type so that the method is_usable_by_random returns true.
1. Add a random question to a quiz and select category X for the random question.
2. In category X only have Essay Question(s)
3. Take the quiz as a student.
4. Go to the Manual Grading Tab as a Teacher and you will find that there are no essay questions to grade.

This is because of how the code checks for essay questions in the quiz. Go to line 256 in grading.php to see how it does this.

The random question type causes a lot of problems for grading Essay Questions because if the random question is pulling from Essays and non-essays then not every student will answer the question.

So, the method for how the grading code looks for essay questions in a quiz and the interface for grading essay questions need to be altered. I'm not entirely sure how random questions work so I am stuck on this problem at the present time.

Another solution is to add ESSAY to the excludedtypes array in random question type.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
tjhunt committed 6 files to 'Moodle CVS' - 28/Nov/08 03:07 PM
random essay questions: MDL-8648 Allow essay questions to be selected by random question.

In the 1.9 branch this is controlled by a new option under Admin -> Experimental. In Moodle 2.0 dev it is not optional, it just works.

The main change is letting the manual grading report know which random questions might need manual grading. MDL-4004 - this depends on the random question under consideration, which requires a new questiontype method.

I also changed the random question code so that I could remove some global variables.
MODIFY question/type/random/questiontype.php   Rev. 1.26    (+64 -6 lines)
ADD lang/en_utf8/qtype_random.php   Rev. 1.1    (+0 -0 lines)
MODIFY question/type/questiontype.php   Rev. 1.108    (+11 -2 lines)
MODIFY mod/quiz/report/grading/report.php   Rev. 1.50    (+4 -3 lines)
MODIFY lib/questionlib.php   Rev. 1.177    (+6 -18 lines)
MODIFY question/type/essay/questiontype.php   Rev. 1.30    (+1 -5 lines)
tjhunt committed 6 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 28/Nov/08 03:07 PM
random essay questions: MDL-8648 Allow essay questions to be selected by random question.

In the 1.9 branch this is controlled by a new option under Admin -> Experimental. In Moodle 2.0 dev it is not optional, it just works.

The main change is letting the manual grading report know which random questions might need manual grading. MDL-4004 - this depends on the random question under consideration, which requires a new questiontype method.

I also changed the random question code so that I could remove some global variables.
MODIFY lang/en_utf8/qtype_random.php   Rev. 1.1.2.2    (+4 -0 lines)
MODIFY question/type/essay/questiontype.php   Rev. 1.20.2.8    (+7 -2 lines)
MODIFY question/type/random/questiontype.php   Rev. 1.12.2.7    (+68 -8 lines)
MODIFY mod/quiz/report/grading/report.php   Rev. 1.25.2.14    (+4 -3 lines)
MODIFY question/type/questiontype.php   Rev. 1.74.2.14    (+11 -2 lines)
MODIFY admin/settings/Attic/misc.php   Rev. 1.14.2.4    (+4 -1 lines)