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

Rubric model assocations #52780

Merged
merged 3 commits into from
Jul 24, 2023
Merged

Conversation

bethanyaconnor
Copy link
Contributor

@bethanyaconnor bethanyaconnor commented Jul 13, 2023

Codifying my understanding of the model relations -- please comment if these don't seem right. I want to get these right before we go too much farther!

This understanding comes both from the tech spec and this slack conversation (apologies for this being in a private channel!).

The associations codified here are:

  1. A Rubric belongs to a Lesson and a Level. (We may, in the future, need to know the unit, but that can be derived through lesson.)
  2. A Rubric has many LearningGoal and, inversely, a LearningGoal belongs to a Rubric.
  3. A LearningGoal has many LearningGoalEvidenceLevel and, inversely, a LearningGoalEvidenceLevel belongs to a LearningGoal.
  4. A LearningGoalEvaluation belongs to a LearningGoal. It will also have some associations with users in the future, but I haven't added those in this PR, preferring to focus only on the rubric side.

@bethanyaconnor bethanyaconnor marked this pull request as ready for review July 13, 2023 18:50
Copy link
Contributor

@wilkie wilkie left a comment

Choose a reason for hiding this comment

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

We don't have any kind of has_many association for Level.

Just confirming that we are certain that a lesson only has one rubric?

@bethanyaconnor
Copy link
Contributor Author

We don't have any kind of has_many association for Level.

Oh good point. I can add that!

@bethanyaconnor
Copy link
Contributor Author

Just confirming that we are certain that a lesson only has one rubric?

@tess323 -- does this sound right to you?

Comment on lines +13 to +14
belongs_to :level
belongs_to :lesson
Copy link
Contributor Author

Choose a reason for hiding this comment

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

One thing I should've called out -- as written, both a lesson and a level are required. It's easy to mark them as optional but I want to check what feels right here. My working assumption has been that both are needed but I might be wrong there.

Copy link
Contributor

Choose a reason for hiding this comment

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

The core reason why both would be required, to my understanding going in, would be because there could be more than one per lesson. but I guess we want both... since a level is absolutely required to be the point of assessment and then a lesson is loosely required for the purposes of lookup and showing it on the lesson page more easily.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that was my thinking as well. I'll leave it as-is and as we work and potentially find reasons to adjust this, we can reconsider

@tess323
Copy link

tess323 commented Jul 13, 2023

Just confirming that we are certain that a lesson only has one rubric?

@tess323 -- does this sound right to you?

yup!

@tess323
Copy link

tess323 commented Jul 13, 2023

This all looks right to me

@bethanyaconnor bethanyaconnor merged commit 5c7abf5 into staging Jul 24, 2023
2 checks passed
@bethanyaconnor bethanyaconnor deleted the bethany/aitt/rubric-associations branch July 24, 2023 17:10
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.

None yet

4 participants