Using a learner's variable value in the MATLAB grader reference solution

I would like to use MATLAB grader for questions where each student in a cohort uses their own numerical values for named variables. I would then like to access their specific value in the reference solution so as to mark their individualised submission. For example:
Question: calculate and provide your unique value of u (using some algorithm that is provided offline), and give the value of m = 1/u
Learner Template:
u =
m=
Reference template
user_u = ????
m = 1/user_u
I am looking for what to put into ???? above. Can anybody help with this? Note that randomized data is not sufficient for my need unless the seed in rng(seed) can be provided by the offline algorithm and shared across the learner and reference spaces (but this is pretty much equivalent to the question above).

1 Comment

What I do is parse, in th reference solution, the `solution.m` file, that it's the name of the file that contains the script of the student.

Sign in to comment.

Answers (2)

In MATLAB Grader, the reference and learner solutions share the same seed. Therefore, it is possible to create a problem that will generate a new number every time it is run, but the same number for the reference and learner solutions. For more details, see my post here.

6 Comments

Thanks but as I said, randomization isn't of use to me unless I can trol each student's individual seed. Basically, I want each student to take a version of the test that is formed from data that I impose on them. I would like to be able to re-create the correct answers given that data outside of grader so that I can check that the imposed values were in fact used.
The technique I shared describes what built-in capability exists in MATLAB Grader today. MALTAB Grader does not have access to user information, which seems to be a prerequisite to implementing a student-specific approach.
Thanks Cris but your collleague Sheila Scialanga gave me a pointer which at least allows me to get halfway there. I can specify an algorithm that gives each student their own set of integers, u,v,w,... say, and then uses these in the question so that everyone solves a numerically different problem. Grader then assesses using their data providing that the correct formulae are encoded as the answer, this prevents simple cut and paste (which randomization doesn't always prevent) or numerical answer sharing, but I now need to figure out a second non-Grader step which automates verification of the fact that each student used their own individualised data. I think this can be done by dual submission through a digital platform, bulk download and automated parsing and comparison of that answer script with the one in Grader. I will need to bulk download the answer scripts from grader to do this and I haven't got that far yet - this has been very slow.
It's a pain though. It would be so much easier if you guys could configure Grader for us to give each participant individualised data. Is this ever likely to be possible? Only then can it really seriously be used in COVID times where remote high stakes quality controlled assessment is going to be in huge demand.
By design, MATLAB Grader solutions do not have access to personally identifiable information about students.
If you were to provide a P-coded function that accepts an input in the form of a Student ID that the learner provides in their solution, you could use that ID as an index to look up data from another P-coded file and return any variable you wish. You could reuse such a function in multiple problems, and include a note in your problem description that the student must provide their own Student ID as an input to your custom function at the start of their solution.
There may be another MATLAB Answers article that demonstrates this, and I will link back to it when I can find it.
Otherwise, I will take a note of the enhancement request to provide individualized data for learners.
Was there any progress on this within Grader? I'm looking to do similar and want to make sure i have most upto date info on what's possible. many thanks

Sign in to comment.

By design, MATLAB Grader solutions do not have access to personally identifiable information about students.
If you were to provide a P-coded function that accepts an input in the form of a Student ID that the learner provides in their solution, you could use that ID as an index to look up data from another P-coded file and return any variable you wish. You could reuse such a function in multiple problems, and include a note in your problem description that the student must provide their own Student ID as an input to your custom function at the start of their solution.

Communities

More Answers in the  Distance Learning Community

Asked:

on 21 May 2020

Commented:

on 3 Mar 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!