Moodle 2.8: New offline exam module

Moodle 2.8: New offline exam module

by Yunior Hernandez -
Number of replies: 2

Hi, I'm a PHP programmer and recently I've been asked to create a module for Moodle 2.8 that allows the creation of offline exam activities to a course. These exams are to be printed by teachers on certain dates and offline applied to students in the form of written exams that students must answer in pen-and-paper mode in a controlled area and time. Then teachers grade these written exams (also offline) and then they upload the results into moodle for each student graded. I've been reading about moodle and learned that there is a module that has similar funcionality, the Quiz module. So I'm not sure wich aproach to follow:

  1. Create a new activity module and link it somehow to questions (that already exists) or...
  2. Modify the existing Quiz module to add functionality.
Can any of you point me to the best aproach?

Functionalities:

  • Keep a question bank. (wich already exists)
  • Provide some objetives to each question and set a dificulty level for each objetive in each question.
  • Create offline exams in courses with: planned date, date range of allow printing, etc.
  • Add new questions to the exam or add a question from question bank. (already in quiz)
  • Autoadd a specified number of questions to the exam from the question bank given the desired objetives and dificulty level for each one.
  • Search if there is a similar exam (offline or online quiz) in the course or in the moodle site.
  • Print the exam for application.
  • Manually set true application date and grades for each student.
  • Allow an already applied exam to be redefined for the next application (different questions) without loosing the old exam definition and student grades.
  • Disallow an already applied exam to be reused (same questions) for its next application or for a given time.
  • Allow the review of each exam application by teachers.
Average of ratings: -
In reply to Yunior Hernandez

Re: Moodle 2.8: New offline exam module

by Ray Morris -

I just now putting the finishing touches on updating module which does just this, by extending Quiz.  Teachers can grade manually, but mainly it's designed for use with Scantrons and automatic grading.  You might want to see if what we have will work for you.  I suspect it may meet your business requirements, though it might not match exactly the process you had in mind. Even if not, it would be a good base to start from and you could do your own modifications.  Here's our current code, which will be updated further in the next few weeks:

https://github.com/MorrisR2/moodle-quiz_papercopy/tree/wkhtml27

Ours is an updated fork of BU's older code:
https://github.com/bumoodle/moodle-quiz_papercopy


The Moodle Quiz module is very flexible, with many different submodules which extend it's functionality.  Using it with using a submodule like ours to add the functionality you need would probably be a very good idea.


This is another module which is similar, but it appears that it does NOT use the standard Quiz module as base.  Therefore it will probably be missing many features available in Quiz and features which will be added to Quiz in the future:

https://docs.moodle.org/28/en/mod/offlinequiz/mod


Writing a new module for Moodle from scratch is not easy, not at all.  Because Moodle is so flexible, both in terms of modularity and being able to use any RDMS, run on any platform, etc., programming within Moodle is quite a bit more disciplined than general PHP programming.  In many ways, learning to design and author software to run within Moodle is very similar to learning a new programming language altogether.   For example, you don't use any of the PHP database functions you might already be familiar with - Moodle provides platform-neutral database functions of it's own which you use.  You shouldn't generally use output functions like "echo" - Moodle has an entire output API or two for you to use.  For these reasons, I'd strongly suggest looking carefully if one of the existing modules covers the needs of what you actually need to accomplish, temporarily putting aside possible process you outlined in your post.  Using an existing module will save you a lot of time and aggravation compared to building, and then maintaining, your own separate module.


Average of ratings: Useful (2)
In reply to Ray Morris

Re: Moodle 2.8: New offline exam module

by Yunior Hernandez -
Thanks Ray, you're right... that seems like the exact starting point I need, yet I haven't been able to install your code in my testing moodle site. I get a warning about a "theme_pdf" plugin that I don't have and it's not in this site's plugin list. Can you point me to where can i get it?