Moodle Plugins directory: Random activity | Moodle.org

Random activity
Random activity
Version: 1.5 (July 2022)
Author: Astor Bizard
This software is part of the Caseine project.
This software was developped with the support of the following organizations:
- Université Grenoble Alpes
- Institut Polytechnique de Grenoble
Introduction
The "Random activity" activity type is a module that allows teachers
to randomly split students among other activities within a course.
Typically, suppose we have two versions of an exercise: a Quiz (named
Quiz 1) and an Assignment (named TP 1), along with documentation for
each activity.
Now suppose we want to split students randomly among these activities.
We can come up with this:
... which will give one of the following results for each student:
Create and setup one or more Random activities
Prepare your activities pool
You first need to create a pool activities, among which students will be split.
It is recommended to place them in a hidden section of your course, and
make them available (this can be done from the course page, or from the
settings page of each activity in the "Common module settings" section).
This can also be done by using stealth activities (see https://docs.moodle.org/311/en/Stealth_activities). However, please be aware of an issue with stealth activities appearing on the calendar: https://tracker.moodle.org/browse/MDL-73535.
Create the Random activity
To create a Random activity in your course, simply proceed the same way as other activity types.
To set up the activities pool for your Random activity, click "Save and
display" at the end of the editing form, as the activities pool is set
up on the view page.
Activity view page
From here, you can view the current activities pool, and edit it by clicking the "Edit" and "Add activities" buttons.
When you are done editing the activities pool, click "Apply changes and re-assign" to apply the changes.
You should then see students enrolled in your course assigned to the activities you added.
Note: Students will not see this page when accessing the Random activity. They will be automatically redirected to the activity they are assigned to.
Seed
Notice the "Seed" field on the bottom right of the view page. This is
the seed for the random splitting of students among activities.
This means that a different seed will lead to a different distribution,
and an identical seed will lead to an identical distribution*.
You can thus use an identical seed in several Random activities** to
split students among several pool of activities while preserving
consistency (eg. our example in Introduction: we had one Random activity
"Documentation for exercise 1" and one Random activity "Exercise 1",
both with the same seed to ensure a student will always get the correct
documentation for his exercise).
* This is only true if the activities pool has the same size (an
activities pool of a different size with the same seed will lead to a
different distribution).
** This will only work for Random activities with the same seed and the same number of activities in their pools.
Activities pool / seed changes consequences
The Random activity acts as a redirection on students side. Please be aware that if you change a seed or the activities pool after students have accessed it may lead to students being assigned to a new activity, thus leading to them losing some of their work / grades.
Grades
Random activities support grades. If a Random activity is graded, the
grades are automatically retrieved from the activities the students are
assigned to.
To make a graded assignment with a Random activity, a nice way to proceed is:
- Set up grading methods for every activity in the pool,
- Set up a grading method for the Random activity,
- Head to the gradebook and set the weights for activities in the pool to 0.
That way, only the Random activity grade will be accounted in the
gradebook, and every student will have exactly one grade for the graded
assignment.
Completion tracking
Random activities support completion tracking.
You can set automatic completion tracking of Random activities, by selecting "Students must complete their assigned activity".
That way, when a user completes its assigned activity, the Random activity will automatically be set as complete.
Future Developments
These features are not currently supported but will be added in future releases:
- CSV export of student affectation on activities
Groups are not supported yet. However, this will be possible with the next update I am working on. It should be released during this week - worst case next week.
Best regards,
Astor
This great plugin is installed in our university and helps professors to have assign for exams with random statements while correcting each statement in a separate assign.
We suggested the professors to configure their assign as [stealth activities|https://docs.moodle.org/311/en/Stealth_activities] so that they may be coupled with the random activity. But we noticed a problem : stealth activities are shown in the timeline dashboard block. It is therefore important to configure each assign with access restrictions. In your documentation, you tell to put assigns in an hidden section but when assigns are hidden they may not be accessed by students, so assigns must be made visible at the exam moment manually or using a restriction.
We find it to be a bug that stealth activities appear in the timeline block and we declared this bug here :
https://tracker.moodle.org/browse/MDL-73535
Wathever happens, it would be important to have a remark on the use of stealth activities in your plugin documentation.
Kisses
Zabelle
Thank you for pointing out this problem. I will add a note.
Best regards,
Astor
I just tested it on Moodle 4.1 and everything seems fine, as expected. I updated the version information to include Moodle 4.1 as supported.
thank you very much for this great plugin.
Is an update planned soon?
Or have you even stopped further development?
Kind regards,
Stephan
About supporting newer Moodle versions, I updated version status as compatible with currently available Moodle versions.
About another update, what would you want the update to bring?
Best regards,
Astor
I was unsure whether I could update to moodle 4.3.3.
After your reply, I was able to successfully update to the current version.
Thank you very much for your support - and this useful plugin.
Yours sincerely,
Stephan
I have a doubt, if a student A performs activity 1 of the set of activities {1,2,3,...} if he re-enters the Random Activity he will perform the same activity 1. right?
Would it be possible for him to perform another random activity, that is to say, that each time he enters Random Activity he performs a different one?
Thanks in advance
Baltasar
If a student clicks on the Random activity, they will be redirected to the same activity every time (as long as you don't change the pool of activities or the seed).
The usage you are describing is not achievable via random activities, and I'm afraid will never be because of this plugin core behaviour (sorry about that).
Best regards,
Astor
Thank you for your quick response.
I wanted the learner to be shown a scorm activity done with ExeLearning on each attempt but I see that this plugin doesn't do exactly that.
However, I think it is a fabulous plugin that I will use for something else in my Moodle.
Thanks for your work
As a moodle admin I am always under pressure from our general IT host to keep moodle up to date. Therefore I was wondering if you have already tested the radom activity plugin with moodle 4.4 (or even 4.5)? Thanks in advance for your response.
Kind regards,
Stephan
Thank you for your interest.
I am testing the plugin on Moodle 4.4 and everything seems fine.
I'll test with Moodle 4.5 but it should go smooth as well.
I'll update the plugin record.
Thank you,
Astor
If it is possible I'd like to ask for feature. I'm using it to assign subjects to students in classes, I defined significant number of subjects (n=25) and I have around 24 students. However, when tried to randomize subject selection, some of subjects were not assigned while some of them where assigned several times. Is is possible to add feature to avoid assigning the same task if some from the pool are not yet assigned?
Thank you,
Dominik
You have an option in edition mode to try and find a seed to balance users among activities.
However, there is no way to force this balancing to be really even.
For your use case, and if the goal is to have one subject per student, maybe Random Activity is not suitable. I would recommend using any other tool to draw randomly following constraints you define, and put access restrictions to your activities.
Best regards,
Astor