Repository navigation
Remove the LearningObjectDisplay model - #1548
Merged
Merged
Conversation
Contributor
|
Don't these changes also remove the "Continue where you left off" feature that was added some time ago? @murhum1 EDIT: Nvm, the feature uses localStorage and works fine with these changes (I tested it). |
ihalaij1
requested changes
Oct 2, 2026
ihalaij1
left a comment
Contributor
There was a problem hiding this comment.
Some things I found that should still be addressed:
- Some translation strings in
django.pofiles have no references left:MODEL_NAME_LEARNING_OBJECT_DISPLAYMODEL_NAME_LEARNING_OBJECT_DISPLAY_PLURALLABEL_LEARNING_OBJECT, which only old migrations still useUSER_LAST_VISITED -- …andPLACES_TO_START -- …, which still point at the deleted_user_last.html
INDEX_TYPE.LAST("Link to last visited content") is now useless, should it be deleted from everywhere?- Removing the option would need a data migration for courses with
index_mode=2, so it needs a decision.
- Removing the option would need a data migration for courses with
- The
export.pyhelp text (line 15) lists aresultssubcommand thathandle()doesn't implement. This is not related to this PR, but should be fixed anyway.
murhum1
force-pushed
the
delete-learningobject-display
branch
from
October 2, 2026 10:55
f2f84cf to
9cc360d
Compare
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The obsolete feature is removed consistently, with existing database values migrated safely.
Review effort: Balanced
Findings: None
What changed in this PR
Removes the unused LearningObjectDisplay tracking feature and its database storage.
Changes:
- Removes display tracking, last-visited rendering, admin, export, and translation code.
- Drops the obsolete model and database table.
- Removes the
LASTindex mode and migrates existing instances to results mode.
| File | Description |
|---|---|
lti_tool/templates/lti_tool/lti_course.html |
Removes last-visited rendering. |
locale/fi/LC_MESSAGES/django.po |
Removes obsolete Finnish translations. |
locale/en/LC_MESSAGES/django.po |
Removes obsolete English translations. |
exercise/views.py |
Stops recording page displays. |
exercise/templatetags/exercise.py |
Removes the user_last tag. |
exercise/templates/exercise/_user_last.html |
Deletes the obsolete partial. |
exercise/migrations/0052_delete_learningobjectdisplay.py |
Drops the display model table. |
exercise/management/commands/export.py |
Removes display-view export support. |
exercise/exercise_models.py |
Removes the model definition. |
exercise/admin.py |
Removes model administration. |
edit_course/operations/configure.py |
Removes the last configuration option. |
course/templates/course/course.html |
Removes the legacy index-mode branch. |
course/models.py |
Removes the LAST enum value. |
course/migrations/0065_alter_courseinstance_index_mode.py |
Migrates legacy values and updates choices. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ihalaij1
force-pushed
the
delete-learningobject-display
branch
from
October 9, 2026 07:44
9cc360d to
367e0b8
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Removed the LearningObjectDisplay model and associated code.
Why?
Related features were unused despite the indexed DB table being written to almost every page load. Also took up a lot of DB space.
Fixes #1547
Testing
Navigated to exercise / chapter pages and verified no errors were thrown.
Did you test the changes in