I have been pondering about how to switch Lesson to use the question classes for quite some time now. Although the process might seem rather straight forward, it is actually a very long and arduous journey. I believe that there are four top-level tasks: adding support for the question class, change the attempts logic, fix code breaks, and database migration. Each of these has several sub-tasks. Ill break these down best I can with the following:
Adding support for the question class: This is one of the easier tasks. Just implement the question code and the interfaces for adding them to a Lesson.
- Printing the question(s) for attempts.
- Grading the question(s).
- Provide a method for adding new questions to a Lesson.
- When adding a question, display questions in course question bank to select from.
- Provide links/tabs for creating new questions, importing, etc.
- After adding a question, define possible jumps.
- When adding a question, display questions in course question bank to select from.
Fixing code breaks: By switching to the question class, nearly all of the current Lesson code will be broken and must be replaced or fixed. Here is a quick breakdown of foreseeable code breaks along with relative difficulty in fixing the break:
- High scores (easy)
- Lesson statistics (hard - quiz reports might provide a jump start?)
- Essay Grading (medium - rewrite or migrate quiz's Manual Grading to the question code)
- Page Editing (easy)
- Jump type interpretation algorithms (medium)
- Ongoing score (easy)
- Progress bar (easy)
- Backup/restore (hard - rewrite for new table structures and add support for restoring Lessons pre question class support)
- migrate lesson_pages and lesson_answer content to question tables.
- migrate lesson_attempts to question_states.
- Re-organization of the lesson tables.
- Rebuild the Lesson.
- The jump system will need to be reworked to support the new code. Currently the jump code is scattered everywhere, hard to maintain and add new jump types and the code is confusing. A plug-in system with classes would be a nice fix. Have a directory called jumps with files inside defining different jump types with a class. This class class would have methods for using the jump like validating its use, interpreting the jump, etc. This would allow for the easy contribution to new jump type algorithms. Open to other ideas as well
- Lesson has a high mix of logic and presentation. In the rewrites, this can be improved by using HTML templates for the presentation.
- Single files handle too many tasks, example: view.php handles the attempts, editing, grading, essay grading and high scores.
Lastly, if you have more ideas, see a potential problem or completely disagree with me, then please post.
Cheers,
Mark
With all the 'reworking' of the Lesson module, is it possible that Lesson pages might one day be able to be shared between different courses like Quiz questions can?
For instance, if I have created a course and need several variations of that course, then as of now (1.5.3) I duplicate the original course by making a backup, change the course name, restore the backup, and then edit one of the courses. Then I repeat this for each variation that I need. (If there's already an easier way, please point that out.)
If there was a spelling mistake on a page of the original course that is now common to all of them, then I have to find the page in each course to fix it. Likewise, if I want to add a picture or edit a page in any way, then I have to do that in each course.
Is there any possibility that Lesson can be designed so that I can create a new course, and draw pages into it from an existing course, just like I can with Quiz questions? And if I edit that page, then each course that contains it would reflect the update?
I have no idea what this would involve as far as programming, so I'm just asking... (very hopefully...)
Thanks,
Dan
You bring up a good point. This migration would allow all of the question pages inside of a Lesson to behave just like Quiz's questions (be able to view/edit them in the course question bank and in other courses). There are four other types of Lesson pages though: Branch Table, End of Branch, End of Cluster and Cluster. The last three are not really pages at all. The new Lesson database structure (which exists only in my head at the moment ) would take care of that. But, branch tables are the one page that is not a question type but has a title, content, options and etc. Now, there is a question type that is very close to branch tables called Description. This question type could be modified to take the place of branch tables, or a new question type could be created. A new feature of the question types is the display.html templates, which would be needed for displaying branch tables with slide show on or off.
So, I guess the question is, would we want to get rid of Branch Tables all together as we know it? Then replace it by expanding Description or by creating a new question type. If branch tables are converted to a question type, then all Lesson pages would be stored in the course question bank and available to other courses or modules.
Cheers,
Mark
As a 1.5.3 newbie, I didn't get the difference between questions and branches from a teacher standpoint, with student directed learning in mind. Both function the same way. Some have buttons to push, others have radio button to check, some have blanks to fill in. All of them are navigation pages. In other words, question pages.
"Branch tables" are "Button (Question) pages" to me. Sounds like this is your "new" question type.
So are you also going to create a Start Branch (with only one jump) to go with end of branch, as we have with clusters? Don't know how this affects things with programming. It would make the special navigation tools uniform to the teacher and easier to explain. And I am not sure I really appreciate the differences between these two special navigation tools, except that clusters seem to nest inside branches.
FYI to the forum. I think I am a sophomore with Lessons, and have only glanced at Quiz feature. I will stop apologizing in a month or so. Thanks for all your help and efforts.
The name is sort of a holdover in search of a better term, the original idea was more like a cross-roads between question paths.\
Interestingly, I was just talking with a faculty member yesterday who found it very inefficient that Moodle quiz made you make the questions in a question bank and then move them into the quiz.
If this gets changed in lesson, expect more folks who will have such complaints.
This discussion has gotten me thinking... maybe I should be using 'Quiz' for my lessons! My courses are basically lessons (with questions included to keep users from clicking right through) followed by quizzes on the same material. I could probably use the Quiz module to accomplish both things though. I guess when I started out, I just got stuck on the names!
Dan
Well, I just tried this with a short 5-page lesson we have. I made Quiz questions for each Lesson page (which are all Multiple Choice pages) and created a Quiz that shows one question per page. There are definate downsides to this method; both in formatting and navigation.
I'm back to hoping for Lesson Module to allow pages to be shared among multiple lessons/courses!
Dan
The question authoring for the question types in Lesson would have one more step: a page for defining the jumps.
So, when selecting a question to add to the Lesson, one would be presented with the course question bank. One would then select a question to add to the Lesson. The next page would define the possible jumps from that question. This would keep Lesson's unique navigation intact. (Open to suggestions for streamlining this process!)
The question types display.html templates will allow for Lesson to customize the look of any or all of the questions, which upon reflection, I think is necessary. Lesson question pages tend to have more content and so the formatting needs to handle this gracefully.
So, both formatting and navigation will still be unique to Lesson (among other Lesson features ) and thus make it a viable alternative to Quiz.
Cheers,
Mark