Rubric Group

The rubric group contains commands for working with rubrics.

codepost_powertools.rubric.export_rubric(course, sheet_name, assignments, *, wipe=False, replace=False, count_instances=False, log=False)

Exports a codePost rubric to a Google Sheet.

Each assignment’s rubric will be exported into a single worksheet of the given Google Sheet. If wipe is True, the entire sheet will be wiped first. If replace is True, whenever an assignment being exported sees an existing worksheet, it will replace that sheet with the current exported rubric.

If count_instances is True, it will count the number of instances of each rubric comment. Note that this may be slow, since it will have to loop through all the applied comments in the assignment submissions.

This function will return a mapping from assignment names to a bool representing whether the export for that assignment was successful. The keys for this mapping will come from assignments.

Note

The Google Sheet must already exist. This function will not create it for you.

Parameters:
  • course (CourseArg) – The course.

  • sheet_name (str) – The Google Sheet name.

  • assignments (Iterable[str]) – The names of the assignments to export.

  • wipe (bool) – Whether to wipe all the existing worksheets.

  • replace (bool) – Whether to replace the existing assignment worksheets.

  • count_instances (bool) – Whether to count the number of instances of each rubric comment.

  • log (bool) – Whether to show log messages.

Returns:

A mapping from assignment names to whether the export was successful.

Return type:

Dict[str, bool]

New in version 0.2.0.