Skip to content

Make courses.manage_learner_grading depend on courses.view_gradebook #683

Backlog

Description

@BryanttV

Description

courses.manage_learner_grading lets a user reset attempts, rescore submissions, override scores and clear problem state for individual learners. It doesn't require courses.view_gradebook, so a custom role can let someone change a learner's grades without letting them see grades. Anyone who can change a learner's grades should also be able to see the grades they change. This adds courses.view_gradebook to the dependencies of courses.manage_learner_grading (ADR 0034).

Current Behavior

courses.manage_learner_grading depends only on courses.view_learner_course_status. The Custom Roles API accepts a role with courses.manage_learner_grading and without courses.view_gradebook, and the role catalog doesn't list courses.view_gradebook as a dependency.

Expected Behavior

courses.manage_learner_grading depends on both courses.view_learner_course_status and courses.view_gradebook. Because courses.view_gradebook depends on courses.view_course_info, a role with courses.manage_learner_grading must also include courses.view_course_info. courses.manage_bulk_learner_grading depends on courses.manage_learner_grading, so it inherits both requirements.

Acceptance Criteria

  • The depends_on of courses.manage_learner_grading lists courses.view_learner_course_status and courses.view_gradebook.
  • The built-in roles that grant courses.manage_learner_grading (course_admin, course_staff, course_limited_staff) still pass schema validation. They already grant courses.view_gradebook.
  • Creating or updating a custom role with courses.manage_learner_grading and without courses.view_gradebook returns 400, and the error lists the missing dependency.
  • The role catalog lists courses.view_gradebook (and, indirectly, courses.view_course_info) as dependencies of courses.manage_learner_grading and courses.manage_bulk_learner_grading.
  • Tests cover the new dependency and the indirect dependencies of courses.manage_bulk_learner_grading.
  • compiled-schema.yaml, course_roles.rst (if it documents dependencies) and the CHANGELOG are updated.

Related Issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    willow

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions