UVACollab HelpUVACollab DocumentationSite ToolsLessonsHow do I add a MATLAB Grader assignment to a page in Lessons?

How do I add a MATLAB Grader assignment to a page in Lessons?

MATLAB Grader allows you to leverage the strength and versatility of the MATLAB platform in your coursework.

Within Lessons, instructors can create their own assignments or browse and select from an extensive library of template courses and activities utilizing MATLAB code. Assignments can be automatically graded with custom rubrics and learners will receive immediate feedback. Instructors can also track progress for each solution with detailed individual and aggregate analytics, and export scores directly to their gradebook.

Go to Lessons.

Select the Title of the page (e.g., Lessons, Activities, Week: 1) from the tool menu in your site.

Select Add External Tool.

In the window that pops up, select Add External Tool

A Configure External Tool window will pop up.

  1. Enter a Tool Title. This is the text of the link that will appear on the lesson page. For accessibility, you should use meaningful text to describe your link.
  2. Add Button Text. Use the same text from the Tool Title field.
  3. Enable Launch in Popup. Check this box if you would like the tool to launch in a new browser tab. This is recommended.
  4. Select Save.

You will be returned to the lesson page with your new link added. Select the link to access the MATLAB Grader assignment setup options.

Create an assignment from scratch or choose from sample problems.

MATLAB Grader provides an extensive library of sample problems to help you get started on building your assignment. Select a blank problem or a sample problem as a starting point.

Edit the assignment details.

Tip: If you start from a sample problem, it will load as a published problem. You will need to select Set to Draft to edit the assignment.

Enter a title for the assignment.

Add or revise the problem description and instructions.

Use the rich-text editor to enter text and code into the Problem Description and Instructions field.

Add reference files (optional).

Add data and code files that the reference solution, learner solution, and assessment tests can use.

Choose a problem type.

Select whether you want the learner to implement the solution as a script or function.

Learn more about how to create script-based problems (opens new window) and how to create function-based problems (opens new window) on MATLAB Grader's website.

Enter Code for Reference Solution.

Add your Reference Solution to the problem. Learners cannot see the solution. By writing a reference solution, you can refer to the variables in this solution in your assessment tests, and compare them to the variables in the learner solution.

Enter a Learner Template.

Enter a Learner Template. This is the code that the learner starts with to write their solution. You decide how much code to provide to the learner.

Tip: Select the lock icon to prevent students from making changes to that line of code.

Set how to call a function (if applicable).

Learners can run their function before submitting it for assessment. You provide the code that will call the learner function when they click Run. This code appears in the Code to call your function code box in the learner view.

The learner can edit this code to test their function with different inputs.

Select the assessment method.

For script-based problems: When the learner submits their script for assessment, both the learner solution and the reference solution are run first. The assessment you select then evaluates the learner solution.

For function-based problems: You write assessments that evaluate the learner solution for correctness. You do this by calling the learner function and comparing values in the learner solution with expected values. When the learner submits a function for assessment, these assessments are applied and the learner is shown the results for each assessment.

Assessment methods:

  • Correct/Incorrect: The assessment returns 1 if all tests pass and 0 if any tests fail.
  • Weighted: You assign to each test a relative point value, which is then converted into a percentage of the total. The assessment returns the total percentage for the passed tests, as a decimal value between 0.00 and 1.00.

For more information on building assessments, read these Help articles on the MATLAB Grader website:

Preview, validate, and publish the assignment.

  1. Select Learner Preview to view the learner experience for this assignment.
  2. Select Validate Reference Solution to run the reference solution, including assessment tests.
  3. Select Save as Draft to save the problem as a draft.
  4. Select Save as Final to save and publish the problem as a final draft.

Get additional help.

For help using features in MATLAB Grader, visit the help documentation for instructors (opens new window) or the help documentation for learners (opens new window) on the MATLAB website.