-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat: [FC-0092] Add short label to assignment #36970
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
Merged
ormsbee
merged 1 commit into
openedx:master
from
raccoongang:kireiev/AXM-2398/feat/short_label_assignment-for-upstream
Sep 18, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -811,7 +811,9 @@ def get_assignments_grades(user, course_id, cache_timeout): | |
| course_id (CourseLocator): The course key. | ||
| cache_timeout (int): Cache timeout in seconds | ||
| Returns: | ||
| list (ReadSubsectionGrade, ZeroSubsectionGrade): The list with assignments grades. | ||
| tuple: | ||
| - list[Union[ReadSubsectionGrade, ZeroSubsectionGrade]]: List of subsection grades. | ||
| - list[dict]: List of dictionaries with section-level grade breakdown and assignment info. | ||
| """ | ||
| is_staff = bool(has_access(user, 'staff', course_id)) | ||
|
|
||
|
|
@@ -842,7 +844,7 @@ def get_assignments_grades(user, course_id, cache_timeout): | |
| log.warning(f'Could not get grades for the course: {course_id}, error: {err}') | ||
| return [] | ||
|
|
||
| return subsection_grades | ||
| return subsection_grades, course_grade.grader_result()['section_breakdown'] | ||
|
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. Please update the docstring according to these changes.
Contributor
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. Updated |
||
|
|
||
|
|
||
| def get_first_component_of_block(block_key, block_data): | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I was concerned here because we're changing the return type of a function that felt very platform core.
get_assignments_gradesHowever, it looks like this is only called by one view in the mobile API. So, my concern has changed from breaking other callers to wonder why we have a special case for getting this data for mobile.
Uh oh!
There was an error while loading. Please reload this page.
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.
Indeed, there is only one caller, so this change shouldn't be a problem.
Not sure what you mean by "special case" though. These labels are needed for a new mobile screen, to be used for buttons in the Assignments tab. If that doesn't answer your question, could you please be more specific?
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.
I mean that I don't want the mobile application and the web application to have different views and assignments and progress.
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.
The problem is that in the web app, the instructor may create short labels that will be longer than 3 characters,
and they will be a pain to work with in the mobile UI. Hence the difference in constructing these labels on mobile vs. web.
I believe, @marcotuts may provide more details and/or correct us on this.