User and group overrides for the lesson activities.

User and group overrides for the lesson activities.

av Jean-Michel Védrine -
Antall svar: 15

Hello,

I want to collect impressions, ideas and comments about a new lesson feature that I plan to add for Moodle 2.9.

The idea is to permit to teachers to override some lesson settings for an individual user or for a group of users

  • lesson availability date and lesson deadline
  • lesson time limit
  • lesson password
  • lesson maximum number of attempts to each question
  • lesson option to retake the lesson (and in that case option to use mean or maximum grade)
To do that I reuse much of the code written by Tim Hunt for the quiz overrides, so the interface and working will sound familiar to users that have already used quiz overrides.
For me of course this has the advantage to start for a well tested code, so that I only need to adapt it to lesson.
Here is how it works:
There are 2 new lines in the lesson administration menu:
When you click on "User overrides", you get a list of existing overrides and buttons to edit, clone, delete each one overrides list

You also get a button to create a new override

When you create a new override (or edit an existing one), you get a screen like this

override edition

In fact most of the work is already done, and all this interface is already working. So there is a reasonable chance to get this integrated in Moodle 2.9 (if of course Moodle HQ agree this is a good feature)

But as I said I am interested in comments and suggestions.

Work is done in the MDL-7315 tracker issue.

Gjennomsnittlig vurdering:Useful (3)
Som svar til Jean-Michel Védrine

Re: User and group overrides for the lesson activities.

av Mary Cooch -
Bilde av Documentation writers Bilde av Moodle HQ Bilde av Particularly helpful Moodlers Bilde av Testers Bilde av Translators

This sounds perfectly sensible to me, especially at is is making  use of the already existing overrides feature for the quiz. I am off to vote on the trackersmiler

Som svar til Jean-Michel Védrine

Re: User and group overrides for the lesson activities.

av Itamar Tzadok -

It seems to me that this should be generalized into a common module feature with core API that could be implemented by any activity module. smiler

Som svar til Itamar Tzadok

Re: User and group overrides for the lesson activities.

av Jean-Michel Védrine -
Hello Itamar,
Yes I know that a lot of people are thinking like you and I was expecting one of the first comment would be about this with a .2 probability it would be from you  smiler . But
  • people keep thinking and speaking about a general feature like since at least 2008 (and yes, I think I have read all those discussions) but apart quiz and assign modules that already have such a feature available, nobody as shown any code having a reasonable chance of being integrated ... My career as a teacher will end in 2016 and I need this now, so as I need it for my own Moodle why not send this to integration and see what Moodle HQ think of it ?
  • Apart quiz and lesson for most activity modules only open and close times are worth overriding but quiz and lesson are really special cases
  • When you work on this feature (I have done work on this for both mod_lesson and mod_qcreate as I need this for my Chinese students) you realise that there are big chucks of code it would be difficult to abstract for all activities.
  • having quiz, assign and lesson overrides would certainly not preclude any further work on a general feature. Even more, having override code for different modules would certainly help designing a general API.
  • This was only a 2 days work s even if it is not integrated I will not consider my time has been wasted blunker
Gjennomsnittlig vurdering:Useful (1)
Som svar til Jean-Michel Védrine

Re: User and group overrides for the lesson activities.

av Itamar Tzadok -

But

  • HQ has developed/integrated/improved quite a few common module features since 2008, e.g grading, completion, restricted access. User/group overrides should now get some serious consideration and should be added to the roadmap as a required common module feature. While we can patch individual Moodle sites with your enhancement, I'm inclined to think that we should not hack core as this may only push a common API down the priority list.
  • There are far more add-on modules than core modules. So while it may seem that the quiz and lesson are special cases, they are really not that special in the larger context of activity plugins. 

smiler

Som svar til Itamar Tzadok

Re: User and group overrides for the lesson activities.

av Jean-Michel Védrine -

I don't understand why you consider this as a hack (for me, maybe because English is not my native language hack is a pejorative word). The only hacky thing in this code is that I don't want to modify lesson structure so I had to accept some hacky code for maxtime and password.

Also I fail to see why  hack core as this may only push a common API down the priority list

Note that I have not seen any sign it is already on the priority list blunker and you will not find it in the roadmap.

Don't forget Moodle HQ development force is limited and there are a lot of very important things to do in Moodle.

Last thing: future general user/group override feature will have to work with quiz so will easily work with lesson if my code is accepted.

Som svar til Jean-Michel Védrine

Re: User and group overrides for the lesson activities.

av Itamar Tzadok -

By hack I'm referring here to the implementation of an unsystematic local solution for a particular instance of a general problem type. I consider the Quiz solution to be a hack in the same sense. Definitely not pejorative as hacks are inevitable in what we do here even if for the most part undesirable.

To the extent that open issues in the tracker constitue a wish list and then a priority list, this requirement is in the priority list, albeit in that area of the priority list called Dev backlog which is irrelevant for any practical purpose. The requirement can easily be made relevant by changing Dev backlog to some future release.

I do not forget for a moment that HQ development resources are limited and this is precisely the reason why I object to such a hack.

I've only skimmed through your code but it seems that it can be wrapped as a local plugin. Then you would only need a minimal hook in the lesson object constructor to apply the overrides to the user or group. Such a hook would be easy to apply as a patch. The rest would be installable as a plugin.

smiler


Som svar til Itamar Tzadok

Re: User and group overrides for the lesson activities.

av Jean-Michel Védrine -

Yes you have only skimmed through my code smiler

When you begin to work on overrides you realise it interfere with a lot of places in the module's code: calendar events, backup/restore, logging events, ..., and quiz has the even more complicated problem of open attempts that lesson don't have (lesson don't have the real concept of lesson attempts despite the lesson_attempts table's name blunker ).

I bet it would be rather difficult to do this as a local plugin with just a hook in the lesson constructor, but I know you are a talented programmer so maybe you can do it, I am just a maths teacher with some days to spend during my Christmas holidays, alone with my cats, with nothing to do apart fixing lesson tracker issues that have not seen any movement for ages.

Som svar til Itamar Tzadok

Re: User and group overrides for the lesson activities.

av Jean-Michel Védrine -

I don't follow your reasoning for "this is precisely the reason why I object to such a hack".

Why do you think Moodle HQ priorities would be shifted by integrating this ? This is strange, I think exactly the opposite: if it prove useful it could accelerate Moodle HQ looking at a general solution and as the first step should be to design an API it would help to have implementations for several modules to design a good API!

Som svar til Jean-Michel Védrine

Re: User and group overrides for the lesson activities.

av Itamar Tzadok -

The feature is listed in the tracker since Moodle 1.7, has priority Critical, and 68 votes. It is clearly regarded useful by many and I'm sure by HQ as well. Why it's not in the roadmap I don't know. But resources have been well spent on improving important other APIs such as plugin support, events, backup/restore and logging. Creating a new plugin that can listen and respond to Moodle events and extend or change behavior in different areas is now easier than ever. Give it a try. It may require only a couple of more hours to put this functionality in a plugin and hook it to the core module by a minimal patch. smiler

Som svar til Itamar Tzadok

Re: User and group overrides for the lesson activities.

av Tim Hunt -
Bilde av Core developers Bilde av Documentation writers Bilde av Particularly helpful Moodlers Bilde av Peer reviewers Bilde av Plugin developers

Itamar, when you have a working patch, please show it to us for review.

Until then, stop telling other people you think it would be easy. My opinion, as an experienced Moodle developer, is that it would be bloody hard to implement this in a generic way.

Som svar til Jean-Michel Védrine

Re: User and group overrides for the lesson activities.

av Jean-Michel Védrine -

3 months later and only 3 people have commented on this feature. trist

The version I have on my production website (that version is slightly different from the one in the tracker because my production website is running 2.7, and the tracker version is for the master branch) seems to be running quite well, and my students seems to enjoy the fact I can allow then more time, more attempts and change the close date of lessons.

I began to doubt there is a great interest among lesson users for this feature.

This is sad because if my personal branch doesn't need a lot of work (I only update my production website 2 or 3 times a year and my teacher career will end in Summer 2016) I need to check frequently if changes introduced in lesson each week on master branch force this patch to be reworked or not. I can't guarantee I will have the time to do this for years until Moodle HQ finally look at the override problem... So most likely one day this patch will become outdated and this work will be lost.

So you may ask why I don't submit this to integration review ? Because it will most likely be rejected

  • because there doesn't seem to be an agreement on the usefulness of a solution limited to lesson
  • and more important because there is no test (either phpunit or behat ones) to prove that it is working and I don't have the needed time to do that for a feature that has a significant probability of being rejected.
Som svar til Jean-Michel Védrine

Re: User and group overrides for the lesson activities.

av AL Rachels -
Bilde av Core developers Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

Sorry I haven't commented earlier. I would just like to say thanks for all the work you have put into this and the Lesson module in general. By the way, I am going to beat you by a year on the teacher career ending. In fact, I am down to 2 months and a week. stort smil

I think one of the reasons that there have not been more people commenting is that the changes to forum subscriptions have made it so that many people opt out and just don't get new topics unless they go looking for them like I do. There is a good chance that many folks who would love this feature might not even know about it because of the subscription changes.

In my classes I just don't use the lesson module very much simply because I see my students on a daily basis and give face-to-face instruction. If I were facilitating an online class without seeing students on a daily basis, I think this capability would be great to have.

Som svar til AL Rachels

Re: User and group overrides for the lesson activities.

av Jean-Michel Védrine -

Thanks AL for your kind words,

Even if maybe you will not be able to enjoy it with your students (but I wish you an happy retirement) and even if I know it will not satisfied everybody, I am glad to report this feature is now part of Moodle and will be available in the 2.9 release in May 2015. You can already test it on http://qa.moodle.net

A big thank you to Stephen Bourget, David Monllaó and Tim Hunt for all their help, and also many thanks to all users who have voted for this feature and helped to get it considered and integrated.

Som svar til Jean-Michel Védrine

Re: User and group overrides for the lesson activities.

av Frank Leone -

Dear Jean-Michel,

Thanks for your great work on this extension of the lesson functionality! I have a small follow-up question.

I would like to add group-assignment functionality to the lesson module. That is, the option to submit a lesson as one member of a group and that then all members get the graded. Do you happen to have any idea how complex this would be to implement? And could you maybe give me some pointers how I could do that?

I hope so, thanks a lot in advance,  

    best,

           Frank

Som svar til AL Rachels

Re: User and group overrides for the lesson activities.

av Sharon Gray -

Thanks for all of the work on this! One of my faculty members just asked if they can create a time-limit override for a lesson like they can do for a quiz. I'm glad to see that it's available when we move beyond 2.8.  (I agree with Al Rachels that probably one of the reasons you're not seeing many comments is that people opt out of the forums and only opt in when they're trying to find a solution to a particular problem - like I am doing right now.)