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

Client: Button to let a student add entire Subject as Mastery #155

Open
TiE23 opened this issue Aug 7, 2018 · 1 comment
Open

Client: Button to let a student add entire Subject as Mastery #155

TiE23 opened this issue Aug 7, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@TiE23
Copy link
Owner

TiE23 commented Aug 7, 2018

This would appear in the Subject component along with the details. Write a mutation that'll add all SubSubjects inside a Subject to a student's masteries. Unless I can grab the SubSubjects underneath, I might need to define a new mutation like assignStudentNewMasteries().

Actually, it might make more sense to dig into it client-side. It will allow me to do other things like disable the button if they're all filled, and maybe even let me show Subject-level mastery (cumulative of all SubSubject scores, or a progress level of SubSubjects).

@TiE23 TiE23 added the enhancement New feature or request label Aug 7, 2018
@TiE23 TiE23 added this to the Client: Student experience milestone Aug 7, 2018
@TiE23 TiE23 self-assigned this Aug 7, 2018
@TiE23 TiE23 changed the title Client: Button to let a student assign all courses Client: Button to let a student add entire Subject as Mastery Aug 7, 2018
@TiE23
Copy link
Owner Author

TiE23 commented Aug 17, 2018

I really cannot handle this right now. It's just too much. I'm going to abandon this branch and put this into the future project.

#134 Is where I had to work around a Prisma failure in this search:

export const SUBJECT_DETAILS_STUDENT_QUERY = gql`
  query SubjectDetailsStudentQuery ($studentid: ID!) {
    subjectSearch(
      where: {
        subSubjects_every: {
          masteries_every: {
            parent: {
              parent: {
                student: {
                  AND: [
                    {
                      id: $studentid
                    },
                    {
                      enrollment: {
                        courses_every: {
                          status: 0
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    ) {
      ...SubjectDataAll
      subSubjects {
        ...SubSubjectDataAll
        masteries {
          ...MasteryDataAll
          parent {
            id
          }
        }
      }
    }
  }
  ${SubjectDataAll}
  ${SubSubjectDataAll}
  ${MasteryDataAll}
`;

Perhaps upgrade Prisma, try running the same query above, and see that ALL Subjects and SubSubjects get returned EVERY SINGLE TIME. Prisma failed me and would return random stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant