Note: You are currently viewing documentation for Moodle 4.0. Up-to-date documentation for the latest stable version of Moodle may be available here: Random assignment.

Random assignment: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__


'''Random assignment''' is an attempt to handle larger classes of students. For this purpose, we generate a series of html or pdf files with the
'''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.  
same structure but different numbers. In addition, we generate corresponding files with hints to solutions for teachers.  


[[Random_assignment19 | Random assignment for Moodle 1.9 or 1.8]]
[[Random_assignment19 | Random assignment for Moodle 1.9 or 1.8]]
== Basic functionality of the module ==
== Basic functionality of the module ==


=== Students ===
=== Students ===


* Each student gets one file from a given directory randomly.
* Each student gets one file randomly.
* If the file has extension htm or html, it will be shown directly at the assignment page. Otherwise, only a link to file will be shown.
* 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.


=== Teachers ===
=== Teachers ===


* Teacher specifies a directory containing one or more files for assignments and (optionally) a directory with solutions
* 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.
* 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.
=== Directory structure ===
The following structure of directories must be created in the course area
  /moddata/random
  /moddata/random/assignment
  /moddata/random/solution
The assignments and solutions are then stored in subdirectories of these directories with numerical names (that need not be the same), for example
  /moddata/random/assignment/10
  /moddata/random/solution/20
We can for example have
  /moddata/random/assignment/10/file1.html
  /moddata/random/assignment/10/otherfile.html
  /moddata/random/assignment/10/file2.pdf
  /moddata/random/assignment/10/file-without-solution.doc
and (if needed)
  /moddata/random/solution/20/file1.html
  /moddata/random/solution/20/otherfile.html
  /moddata/random/solution/20/file2.pdf 


==Installation==
==Installation==


* Copy directory random/ to moodle/mod/assignment/type/.
* Copy directory random/ to moodle/mod/assignment/type/.
* Copy directory lang/ to moodledata/. Language files are stored in _local directories and thus do not interfere with standard assignment.php language files.
* If needed, add your language. Language files are located in moodle/mod/assignment/type/random/lang
* Optionally, for better security, add the content in file.php (file.part.php) regarding random assignment to the corresponding place in moodle/file.php (otherwise, students can guess the solution directory name and then they can read the solution directly from server). Only if there are solutions.
 
==Preparation for assignments==
 
* In the files area check whether directory 'moddata' exists. If not, create it.
* In the directory moddata, create directory 'random'.
* In the directory random, create two directories: 'assignment' and 'solution'.


==Creation of an assignment==
==Creation of an assignment==


* Create a directory with numerical name in directory 'assignment'. Numerical name can be for example 1, 2, 10, 300, ...
* Create activity: Assignment: random assignment and specify files for assignments and solutions.
* Copy files with assignments to this directory.
* Optionally, create a directory in directory 'solution' with numerical name and copy the files with the same names as before. These contain solutions or hints to solutions for teachers.
* Create activity: random assignment and specify directories for assignments and solutions.


==Credits==
==Credits==
Line 68: Line 33:
* Lubos Cirka - Slovak Technical University in Bratislava > development
* Lubos Cirka - Slovak Technical University in Bratislava > development
* Miroslav Fikar - Slovak Technical University in Bratislava > design concept
* Miroslav Fikar - Slovak Technical University in Bratislava > design concept
==Links==
* [http://www.kirp.chtf.stuba.sk/moodle/file.php/1/random_assignment.zip Download]


==Issues==
==Issues==


* Course restore without user data does not restore assignment and solution files: The random assignment files are stored in userdata area of backups. In the case that the course is backupped or restored without user data, the files are not preserved. Therefore, it is always advisable to zip the whole moddata/random directory at the server outside moddata directory and not accessible to students. If the course is restored without used data (for example in preparation for a new semester), it will afterwards be very easy to restore the directory structure from the zip file.
* Version for M2 is in development. Please DO NOT use it in production server. It can contain serious bugs.  


* Assignments provided in HTML files should be UTF-8 encoded. As inline display strips HTML file to its body, it is assumed that the file is in UTF-8 encoding and can cause the file to be shown incorrectly.
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.


[[Category:Contributed code]]
[[Category:Contributed code]]

Revision as of 15:37, 26 March 2011


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

Students

  • 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.

Teachers

  • 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.

Installation

  • 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.

Credits

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

Issues

  • 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.