-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Implement full preferences API #7327
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,7 +79,9 @@ def get_user_email_language(user): | |
| Return the language most appropriate for writing emails to user. Returns | ||
| None if the preference has not been set, or if the user does not exist. | ||
| """ | ||
| return UserPreference.get_preference(user, LANGUAGE_KEY) | ||
| # Calling UserPreference directly instead of get_user_preference because the user requesting the | ||
| # information is not "user" and also may not have is_staff access. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand this comment: it looks like you are calling
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point-- I meant to back that change out, but must have forgotten. I will go back to UserPreference.get_preference.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch @wedaly. I removed UserPreference.get_preference and didn't notice this older comment while I was doing it. We'll need to rethink how this can get implemented. |
||
| return UserPreference.get_value(user, LANGUAGE_KEY) | ||
|
|
||
|
|
||
| def enroll_email(course_id, student_email, auto_enroll=False, email_students=False, email_params=None, language=None): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you want to make these into TODOs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really-- I don't know what the value is of having "TODO" (with nothing on any backlog).