Random assignment

From MoodleDocs
Revision as of 15:37, 26 March 2011 by Miroslav Fikar (talk | contribs)

Random assignment is an attempt to handle larger classes of students. For this purpose, we generate a series of html (txt, pdf, ...) files with the same structure but different numbers. In addition, we generate corresponding files with hints to solutions for teachers.

Random assignment for Moodle 1.9 or 1.8

Basic functionality of the module


  • Each student gets one file randomly.
  • If the file has extension htm, html, or txt, it will be shown directly at the assignment page. Otherwise, only a link to file will be shown.


  • Teacher specifies one or more files for assignments and (optionally) solution files with the same names
  • In the assignment feedback page, teacher sees the assignment file and optionally the solution file as well. However, assignments are assigned to students (and teacher sees links to them) only after they see them for the first time.


  • Copy directory random/ to moodle/mod/assignment/type/.
  • If needed, add your language. Language files are located in moodle/mod/assignment/type/random/lang

Creation of an assignment

  • Create activity: Assignment: random assignment and specify files for assignments and solutions.


The activity has been designed and built with the contributions of the following people:

  • Lubos Cirka - Slovak Technical University in Bratislava > development
  • Miroslav Fikar - Slovak Technical University in Bratislava > design concept


  • Version for M2 is in development. Please DO NOT use it in production server. It can contain serious bugs.

This version is fairly complete. What is still missing is upgrade from M1.9 version. After upgrade of M1.9 to M2.0, each random assignment does not contain its files. However, if these are copied into it, it should work as before.