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

Fixes assigned lessons and quizzes are not visible to the learner #12992

Merged
merged 3 commits into from
Jan 10, 2025

Conversation

AllanOXDi
Copy link
Member

Summary

This PR fixes quizes and lessons not being visible to learners

Screen.Recording.2025-01-09.at.18.06.36.mov

Closes #12955

References

#12955

Reviewer guidance

  1. Login as a coach
  2. Create lesson and quizzes
  3. Login as a learner to view

@github-actions github-actions bot added APP: Learn Re: Learn App (content, quizzes, lessons, etc.) DEV: frontend labels Jan 9, 2025
@@ -36,6 +36,12 @@ export default [
{
name: ClassesPageNames.CLASS_ASSIGNMENTS,
path: '/classes/:classId',
props: route => {
const classId = route.params.classId;
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 thought of passing classId as a prop to make it accessible in the component which was not possible with this.$route.params.classId

const className = computed(() => (get(classroom) ? get(classroom).name : ''));
const activeLessons = computed(() => getClassActiveLessons(get(classId)));
const activeQuizzes = computed(() => getClassActiveQuizzes(get(classId)));
const activeLessons = computed(() => getClassActiveLessons(get(classId.value)));
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't have to call get and use the .value accessor - only one or the other is needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed! thank you

@AllanOXDi AllanOXDi requested a review from rtibbles January 9, 2025 16:14
Copy link
Member

@pcenov pcenov left a comment

Choose a reason for hiding this comment

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

Thanks @AllanOXDi - no issues observed while manually testing.

Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Changes all make sense, and QA checks out. Passing route props is something we have under used as a mechanism, makes a lot of sense to use it more!

@rtibbles rtibbles merged commit 66ff3c0 into learningequality:develop Jan 10, 2025
37 checks passed
@AllanOXDi AllanOXDi deleted the fix-class-route branch January 10, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Learn Re: Learn App (content, quizzes, lessons, etc.) DEV: frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.18 - Home > Class - The assigned lessons and quizzes are not visible to the learner
3 participants