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

[FEATURE] [MER-3873] Likert activity for instructors #5274

Merged
merged 17 commits into from
Dec 2, 2024

Conversation

nicocirio
Copy link
Contributor

Link to the ticket

Different likert activities (with different amount of questions and options, even different text length for the options) rendered correctly in :

Screen.Recording.2024-11-29.at.2.58.40.PM.mov

This PR sets the ground for rendering light/dark Vegalite Visualizations that react to changes made by the user in the mode selected ("dark", "light", "auto"). Changes can be seen on assets/src/components/misc/VegaLiteRenderer.tsx

Some refactoring

While working on this feature I found that three tabs (Scored Activities, Practice Activities and Surveys) from the Insights instructor view had duplicated code. So, this PR exctracts common logic of those 3 live_component modules (OliWeb.Components.Delivery.{PracticeActivities, ScoredActivities, Surveys}) into a new OliWeb.Delivery.ActivityHelpers module.
And some ecto queries from that migrated code where moved to their corresponding context module as well (Oli.Analytics.Summary and Oli.Delivery.Attempts.Core)

Copy link
Contributor

@darrensiegel darrensiegel left a comment

Choose a reason for hiding this comment

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

We can probably land this as is, but we need to file another ticket (and prioritize) for the work to move away from the resource hierarchy querying.


def get_activities(assessment_resource_id, section_id, student_ids, filter_by_survey \\ false),
do:
Core.get_evaluated_activities_for(
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a really nice isolation of redundant code that had been spread across Practice, Summative and Survey views. But we really should be taking this opportunity to move away from querying across ActivityAttempt and ResourceAttempt tables. Instead, this information can be much more efficiently retrieved by querying across Summary tables and then joining to the corresponding SectionResource record (through section id and resource id) to get the title of the resource.

Copy link
Contributor

Choose a reason for hiding this comment

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

I filed https://eliterate.atlassian.net/browse/MER-4066 for this future work.

@darrensiegel darrensiegel merged commit 549032c into master Dec 2, 2024
5 checks passed
@darrensiegel darrensiegel deleted the MER-3873-likert-activity-for-instructors branch December 2, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants