Random assignment of one file

Random assignment of one file

by Miroslav Fikar -
Number of replies: 35
If anybody is interested, we have created a plugin to assignment derived from a single file type: random assignment. It is an attempt to handle larger classes of students.
For this purpose, we usually generate using an external application a series of html or pdf files with the same structure but different numbers. In addition, we generate corresponding files with hints to solutions for teachers. All these files are copied to the course area.
Each student then gets one random file and teacher can see both the file for student and the corresponding solution. In addition, if the file for student is html, it is shown inline.
We plan to use the code on the production server in winter semester and would be glad for any feedback or improvement.
Average of ratings: -
In reply to Miroslav Fikar

Re: Random assignment of one file

by Art Lader -

How is this working out, Miroslav? It sounds like a good mod.

-- Art
In reply to Art Lader

Re: Random assignment of one file

by Miroslav Fikar -
Dear Art,
sorry for not responding sooner, I have overlooked it.

The principle of random assignment is quite simple. Teacher specifies a directory containing files with assignments. If there are less or equal students than files, each student gets a different file. In the opposite case, further files are chosen randomly for remaining students.

If there is another directory with the same file names containing solutions to assignments, teacher can specify it. It this case, marking window shows both files - assignment and solution.

Miroslav

In reply to Miroslav Fikar

Re: Random assignment of one file

by Oksana Delgado -
Hi Miroslav,

Athabasca University will be switching from Moodle 1.7.2 to Moodle 1.9 some time at the end of this year and we are interested to use your assignment type with the new version.

What are you plans regarding integration of your Random assignment type and Moodle 1.9?
Is it something you have on your road map ?
If yes, when would you plan to do it?

Regards,
Oksana


In reply to Oksana Delgado

Re: Random assignment of one file

by Miroslav Fikar -
Dear Oksana,
We plan to change for Moodle 1.9 as well and we will support the development of random assignment for it. Our plans are to test the module when 1.9 is out and to switch university Moodle with version 1.9.1. I hope that by September (start of winter semester) we will use the new version in production servers (depends on Moodle development).
Best
Miroslav

In reply to Miroslav Fikar

Re: Random assignment of one file

by Oksana Delgado -
Hi Miroslav,
thank you very much for the information.
this sounds perfect!smile

Oksana
In reply to Miroslav Fikar

Re: Random assignment of one file

by Otakar Sprdlik -
Dear Miroslav,
I have tried your module and found it very usefull. May be, we will use it on our production server at CTU Prague in the summer semester. Do you have any new updates, comment, or recommendations based on your experience using in on a production server for large classes during the finished semester?

Ota
In reply to Otakar Sprdlik

Re: Random assignment of one file

by Miroslav Fikar -
Dear Ota,
we have used the module in production last semester and it just worked - no problems were encountered. We are very happy with it and will continue to support it as it adresses some of our needs.
There are some minor issues:
  • Moodle updates. One has to take care that MDL/file.php has not been changed so that it is not overwritten. Also, updates destroy language file assignment.php. Therefore, we moved the strings to local language packs and they are safe from updates.
  • Course restore. If a course is restored from a backup without user data, directories with assignments are not restored and have to be copied again to the course manually.
Miroslav
In reply to Miroslav Fikar

Re: Random assignment of one file

by Otakar Sprdlik -
Miroslav,
Thank you for your reply.
I will take care of this on our server.
Ota
In reply to Miroslav Fikar

Re: Random assignment of one file

by Otakar Sprdlik -
I have found a minor strange feature/bug:
Teachers may assess accidentally an assignment before the student opens the activity and gets his random file. The student will never receive the random file from Moodle in such case.
Of course, the teacher may choose some file and send it to the student by email.
Ota
In reply to Otakar Sprdlik

Re: Random assignment of one file

by Miroslav Fikar -
Thanks for the report, it has been fixed in the latest version.
Miroslav
In reply to Miroslav Fikar

Re: Random assignment of one file

by Stefan Gössler -
Great mod!

Is it possible to give several random files to the same student?

Background: the student should get a random audio file, work out an answer, get the next random audio file, work out an answer, and so on.
In reply to Stefan Gössler

Re: Random assignment of one file

by Miroslav Fikar -
Not directly. But teacher can give them one zipped file containing all desired files. Or split the assignment into several ones.
In reply to Miroslav Fikar

Re: Random assignment of one file

by Vedran Mušica -
Hi.

I can't get it to work.
I have installed it, made moddata, random and assignment and solution folders, numeric subfolders for each (assignment and solution), created random assignment, uploaded 4 files for assignments and solutions.
As admin, I can see everything.
As student, I can see only upload file form, but no link for downloading assignment...

I use moodle 1.9.2+ and PostgreSQL database. I think the problem has occured beacuse of usage of Postgres, but I don't know how to find nor fix problem.

Any help regarding this problem would be appreciated as I find this module extremly usefull.

Best regards,
Vedran Mušica
In reply to Vedran Mušica

Re: Random assignment of one file

by Miroslav Fikar -
Dear Vedran,
I do not think that the issue is concerned with Postgres - the module uses standard assignment tables and does not create any new ones.
If you are logged as a teacher you should see a table with two columns with assignment and solution files.
If you are logged as a student you should see between assignment description and assignment dates the folowing text: You can get the assignment here.
Or, if the assignment file is HTML, its contents.
What do you see in your installation? Try both HTML and other (for example PDF) files as assignments.
Miroslav

In reply to Miroslav Fikar

Re: Random assignment of one file

by Oksana Delgado -
Hi Miroslav,

I do have the same issue (running Moodle 1.9.2 on Postgres)

As admin or teacher I can see both columns, but as a student I do not see text you are referring to on at all.

I've tried .pdf, html and jpeg files to test random assignment

Oksana
In reply to Oksana Delgado

Re: Random assignment of one file

by Oksana Delgado -
Ok, I found a problem, it's a NULL constrain on submissioncomment field in assignment_submisison table

Here is more info:
http://tracker.moodle.org/browse/MDL-14564

cheers,
Oksana

In reply to Oksana Delgado

Re: Random assignment of one file

by Miroslav Fikar -
Hi Oksana,
if you have any solution, please let me know, I will change the code accordingly.
Best,
Miroslav

In reply to Miroslav Fikar

Re: Random assignment of one file

by Maks Mokriev -
Hi, Miroslav.

It`s a good type of assignment. But I have an idea. Add setting to hide the link to the file before date beginning.
In reply to Maks Mokriev

Re: Random assignment of one file

by Miroslav Fikar -
Maks, thanks for the idea.
In reply to Miroslav Fikar

Re: Random assignment of one file

by david freeman -
Hi Miroslav,
I have been trying to figure out where to put the /moddata folder. It says in the instructions to put it in the course area. I assumed this meant place it in /course directory under Moodle root, but nothing shows up in my listing for 'Directory with assignments' when I am inside of moodle. Am i dropping the folder in the right place?
Thanks,
Dave Freeman
In reply to david freeman

Re: Random assignment of one file

by Miroslav Fikar -
Hi Dave,
directories mentioned in the documentation refer to location from web interface of the course and not to moodle file directory. Thus, in your Moodle course, go to Administration block and click on Files. You will find the course files and directories and can create the required directories therein.
Best,
Miroslav

In reply to Miroslav Fikar

Re: Random assignment of one file

by david freeman -
Hi Miroslav,
Thanks for the assistance. Got it working just as you said.

Regards,
DCF
In reply to Miroslav Fikar

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Random assignment of one file

by Miroslav Fikar -
Thanks Matt,
it is corrected in the newest version.
Miroslav

In reply to Miroslav Fikar

Re: Random assignment of one file

by Alexandre Belousov -
thanks for the module!
Very useful even for small groups smile

p.s. I've translated the strings into Russian (ru_utf8) - see attach.
In reply to Alexandre Belousov

Re: Random assignment of one file

by Miroslav Fikar -
Thanks Alexandre,
I have added russian translation to the module. In addition, the newest version can hide description and file link as Maks proposed.

In reply to Miroslav Fikar

Re: Random assignment of one file

by Alexandre Belousov -
Thanks.
Btw, "random assignment" somehow disappeared from the list of available modules at moodle download section, so the link in the 1st post currently links to "123 flashcat module". =(
In reply to Miroslav Fikar

Re: Random assignment of one file

by Alexandre Belousov -
Hi, Miroslav!
I've been playing with the random assignment recently to integrate it in my courses and got some warnings (with php debug = ALL):

1.
Notice: Undefined index: random_assignment in /var/www/html_new/file.php on line 108
-- while trying to view files as teacher (no id is appended to the url), the file.php is a patched one - from the module archive

2.
I've also got warnings about undefined variable "icon" in lines 79/80 of assignment.class.php. (well, I changed that to icon1 and icon2 respectively and that seemed to solve the problem)

3.
There's a warning about "file_array_2" undeclared on line 151. I guess that happens if the if statement is wrong. Don't know if that's correct, but "else {$file_array_2[]="NUL";}" did the trick.


p.s. Thanks again for the extremely useful module.
In reply to Miroslav Fikar

Random assignment of one file - Moodle 2.0

by Miroslav Fikar -

We have developed a version of Random assignment that works with Moodle 2.0. It is still in development and should not be used in production servers but only for testing and for feedback from community. It is available at Modules and Plugins page.

From the readme: Random assignment is an attempt to handle larger classes of students. For this purpose, we assume a series of html (txt, pdf, ...) files with the same structure but different numbers. In addition, we can provide corresponding files with hints to solutions for teachers. Then, each student gets one of these files randomly and teacher can see corresponding solution.

What is new:

  • the plugin is based on advanced upload and not upload of single file as before. Thus, students can upload multiple fles, teacher can give feedback, notes, etc.
  • special directories for assignments and solutions are not anymore needed - each assignment hold its files automatically
  • backup/restore works normally
  • file protection of solution files is now automatic

What still does not work: upgrade from 1.9 version. This will be finished soon. You can create new random assignments in Moodle 2.0 that should work as before. Older random assignments from 1.9 will continue to work only if assignment files are again copied to their place in the assignment editing screen.

Please, have it tested and send comments/bugs/suggestions.

In reply to Miroslav Fikar

Re: Random assignment of one file - Moodle 2.0

by Maks Mokriev -

Hi, Miroslav.

Help me, please. I have a problem.

I can see all the html question files in admin mode, but when i click on it it says

Sorry, the requested file could not be found

More information about this error

The students gets a same problem.

In reply to Maks Mokriev

Re: Random assignment of one file - Moodle 2.0

by Miroslav Fikar -

Dear Maks,

I have never seen this error, thus only some directions:

- is it only in one assignment or in many?

- can you delete the assignment, create a new one with the same files - if the issue persists?

- are html files utf-8 encoded?

Miroslav

(you can write me directly to my mail, I do not read fora frequently.)

Average of ratings:Useful (1)
In reply to Miroslav Fikar

Re: Random assignment of one file - Moodle 2.0

by Patrick Terrematte -

Dear Miroslav,

I have the same error on the version of Moodle 2.2, that as been notified by Maks Mokriyev on :
http://moodle.org/mod/forum/discuss.php?d=79534#p755073

I have uploaded some files in a '.rar' extension, and when I click on someone of uploaded files, the module redirect to this url :
http://lolita.dimap.ufrn.br/mdl/pluginfile.php/286/mod_assignment/inputfiles/0/aluno1.rar

And shows this following error message:
*Sorry, the requested file could not be found*

* More information about this error*

Please, help to solve this enigma!

So on, I am deeply thankful to you!

Best regards,
Patrick Terrematte

My e-mail is patrickterrematte@yahoo.com.br .

In reply to Patrick Terrematte

Re: Random assignment of one file - Moodle 2.0

by Miroslav Fikar -

We have found that the issue is was caused by older version of random assignment. Upgrade to the latest version solved it.

Average of ratings:Useful (1)
In reply to Miroslav Fikar

Re: Random assignment of one file - Moodle 2.0

by Stephen Overall -

Hi, Miroslav:

Random Assignment looks like a very interesting module. However, I'm running Moodle 2.3.4+ with Assignment 2.2 disabled. The Random Assignment documentation indicates the mod should be installed in the Assignment 2.2 mod/assignment/types directory. So I'm assuming I couldn't run RA on Moodle 2.3.x without enabling Assignment 2.2. Is that correct?

Are there any plans to develop and release a Random Assignment version for Moodle 2.3+?