Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update ora settings course app for clarity #35550

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions lms/djangoapps/courseware/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ def legacy_link(course_key: CourseKey):

class ORASettingsApp(CourseApp):
"""
Course App config for ORA app.
Course App config for Flexible Peer Grading ORA app.
"""

app_id = "ora_settings"
name = _("Open Response Assessment Settings")
description = _("Course level settings for Open Response Assessment.")
name = _("Flexible Peer Grading for ORAs")
description = _("Course level settings for Flexible Peer Grading Open Response Assessments.")
documentation_links = {
"learn_more_configuration": settings.ORA_SETTINGS_HELP_URL,
}
Expand All @@ -287,14 +287,15 @@ def is_enabled(cls, course_key: CourseKey) -> bool:
"""
Get open response enabled status from course overview model.
"""
return True
course = get_course_by_id(course_key)
return course.force_on_flexible_peer_openassessments

@classmethod
def set_enabled(cls, course_key: CourseKey, enabled: bool, user: 'User') -> bool:
"""
Update open response enabled status in modulestore. Always enable to avoid confusion that user can disable ora.
"""
return True
raise ValueError("Flexible Peer Grading cannot be enabled/disabled via this API.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, if this method is no longer needed to set the value , why can't it be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was following the pattern that was used for proctored exams. I believe that course apps expects a set_enabled function so that is why it is included.


@classmethod
def get_allowed_operations(cls, course_key: CourseKey, user: Optional[User] = None) -> Dict[str, bool]:
Expand Down
Loading