Activities: Custom Lesson

Maintained by Picture of Allegre Guillaume Allegre Guillaume
Customlesson is a variant of the official module lesson, which allows the teacher to have a template lesson, customized for each student. The lesson template is completed by a csv file which provides all the variable fields (columns) for each of the students (rows).
10 sites
2 fans

Custom Lesson works exactly as a standard Lesson, except that all the content of the lesson can be filled with variable fields between square brackets, eg. :

Which is the length of the network for an [e:exclass] address?

Then, the individual data are imported in a new table, from a CSV file with students as rows and fields as columns, eg. :

  1. userid;e:exclass;q:ipnetwork;a:cidrnet
  2. 4;Classe B;;16
  3. 5;Classe C;;24

The first column must be either userid or ursername. The following columns are meant to be interpolated in the custom lesson contents (titles, questions, answers...).

A more detailed documentation is available in the package and on github (see below).


From an internal point of view, customlesson uses the same eight tables as lesson, duplicated as customlesson_*, plus one new : customlesson_keys. This table is populated from the CSV files and is used as a source for the interpolation process.


Screenshot #0


Picture of Allegre Guillaume
Allegre Guillaume (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Anthony Borrow
    Mon, 6 May 2013, 2:34 AM
    Allegre - OK, so I have tested on 2.4 and it works just fine. If we could get the version.php adjusted to avoid the validation error and provide the source control, tracker and documentation URLs I think we can get this approved. In the meantime, I am going to mark as needing more work. Peace - Anthony
  • Picture of Allegre Guillaume
    Mon, 6 May 2013, 4:37 PM
    Finally, we managed to migrate this code from mercurial to git, and to clone it into github. So, I uploaded a new version, with these URLs for github and doc.
  • MD shot of me from his iphone4
    Wed, 15 May 2013, 5:05 PM
    Thanks for working with us to get this shared here Allegre smile.
  • Picture of Allegre Guillaume
    Wed, 15 May 2013, 5:27 PM
    You are welcome. Thanks to both of you for your reviews.
  • Picture of Nick Edwards
    Mon, 10 Aug 2015, 8:49 AM
    Has anyone ever seen an error when creating an essay question within a lesson, where the default of your answer is cut off by the answer box??
  • Picture of J. Alves
    Tue, 5 Sep 2017, 5:34 AM
    Very interesting, I will see if the admins in my university will add this! Also, does anyone know of a "custom quiz"? Something like the custom lesson, but available as one of the quiz types available. I am looking for something that allows different answers for different students. For example:

    student_A answer_x
    student_B answer_y
    student_C answer_z

    Preferably it would be possible to also put variables in the text of the question, like done in the custom lesson.
  • Picture of J. Alves
    Tue, 5 Sep 2017, 5:49 AM
    Actually, since I am still a bit new to Moodle, I think I did not use the best terminology above... What I am thinking of is a "custom question" type, I guess, not custom quiz.
Please login to post comments