closes OUT-366
test plan:
N/A - this is being done to ensure proper calculations for
outcomes impacted by the YAML bug from around June/July
Change-Id: I721406cb6c5824baa0afe35dc04cf1de553c0777
Reviewed-on: https://gerrit.instructure.com/88097
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Tested-by: Jenkins
Product-Review: Josh Simpson <jsimpson@instructure.com>
fixes CNVS-28147
test plan:
- create an outcome with a default 1/3/5 scale
- align the outcome to a question bank with 10 total points
- align the outcome to another 10 point bank, but set mastery
at 70% rather than the default of 60%
- as a student, score 60% on both quizzes/banks
- go to the student view of learning mastery gradebook
- the alignment to the first question bank should show the score
as 3/3, the alignment to the second bank should as 2.57/3
- return to the second quiz and score a 70% instead of a 60%
- mastery should now show as 3/3 for the alignment
- return to the secon quiz and score 100%
- mastery should now show as 5/3 for the alignment
- test some other outcome point scales and results to ensure consistency
Change-Id: I4a90c8f698c425311453b40e0a506d0a4e408b1c
Reviewed-on: https://gerrit.instructure.com/75381
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
Tested-by: Jenkins
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
either with Relation#all or Association#scope
refs #CNVS-26056
Change-Id: Ie370a3c47c575007ce3b0ba75a122d854e6f8fbc
Reviewed-on: https://gerrit.instructure.com/69497
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Learning outcome question results should be `dependent: :destroy` on
LearninOutcomeResults.
refs CNVS-24296
fixes CNVS-25725
test plan:
- Create a learning outcome result that has a learning outcome question
result.
- Destroy the learning outcome result.
- Validate that the related learning outcome question result has also
been destroyed.
Change-Id: Ib4455ee6a972c205e3eafa2bc996c9657776aa76
Reviewed-on: https://gerrit.instructure.com/67633
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
Closes CNVS-13587
Test Plan:
- Create an outcome.
- Enable the Learning Mastery Gradebook (LMG)
- Create an assignment
- Add a rubric to that assignment
- Add an outcome to that Rubric
- Submit that assignment as a student
- Give a student a point value on that outcome.
- Verify their information now shows in LMG
- Remove the Outcome from the Rubric
- Check LMG, outcome info should be gone
- Delete the rubric
- Check LMG, outcome info should be gone
- QA: be sure to check outcomes that use averaging as part of their mastery
evaluation (n_mastery and decaying average), just to make sure the math
still works as expected.
- Confirm the same behaviors when attaching/removing an outcome from a
quiz. (Bonus, unreported bug, I think).
Change-Id: Icdcf674a669165200150f84eb3d943863e09a49d
Reviewed-on: https://gerrit.instructure.com/62055
Reviewed-by: Brian Finney <bfinney@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
Only quiz questions were being scored. This commit adds
LearningOutcomeResults for a quiz which determines mastery by
performance on the entire selection of questions.
This also records LearningOutcomeQuestionResults for each quiz
question outcome result.
Closes CNVS-13282
Test-Plan:
- Build out several question banks tied to learning outcomes
- Confirm nothing is broken.
- Confirm that outcomes are scored correctly
Change-Id: If2dd2c5f387071cec3c5634bcb74fc3f78283c64
Reviewed-on: https://gerrit.instructure.com/45381
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
fixes CNVS-19351
- Adds LearningOutcomeResult#submitted_or_assessed_at.
- Updates Api::V1::OutcomeResults#outcome_result_json to return
submitted_or_assessed_at value in json.
- Updates ResultsCollection#scoresFor in OutcomeSummaryCollection to
used @chain, and to set assessed_at value to submitted_or_assessed_at
api value.
test plan:
- observe outcome line graph for an outcome whose outcome results
include those with submitted_at values.
- as a teacher, update the grade for one such outcome result.
- observe that the placement along the x axis of the outcome result does
not change.
Change-Id: I27a790b9092fb3c4cf8aaa98c177ea4f37998a03
Reviewed-on: https://gerrit.instructure.com/50570
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-16915
(all mentions of 'gradebook' refer to learning mastery gradebook)
test plan:
- go to gradebook
- all existing mastery scores should still default to highest score to retain
accuracy of existing calculations
- in rails console, set 'calculation_method' to 'latest' for an outcome
- all results for that outcome should now show student's latest score on gradebook
- in rails console, set method to 'highest'
- all results for that outcome should now show student's highest score on gradebook
- in rails console, set method to 'n_mastery' and set 'calculation_int' to a number
between two and 5
- all results for that outcome should now show avg of student's higest n# of scores
(#n being the number set for the outcome's 'calculation_int')
- in rails console, set method to 'decaying_average' and set 'calculation_int' to 75
- scores should now appear as they did first time gradebook was viewed on step #2
- in rails console, set 'calculation_int' to 65
- scores for that outcome should now reflect decaying average with 65% weight given to
most recent score, and 35% weight for avg of all prior scores
- have a student make a new submission to an old assignment and give it a score
- the re-submission should now be most recent score for 'latest' and
'decaying_average' methods
- amend a score for an old submission without a new submission from the student
- the amended score should not become the most recent, but still be accurately
reflected in the 25%/35% part of the 'decaying_average' method
Change-Id: I330c47cb2288d99e589deca00ddb5a8ee8103a91
Reviewed-on: https://gerrit.instructure.com/44935
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
fixes CNVS-12916
test plan
- as a teacher in a course, use the api to create a live
assessment aligned with an outcome (see the api docs for how the
endpoint works)
- create results for some students
- ensure that the results and the assessment can be read back using
the index endpoints
- ensure that the assessment shows up in the web ui at
/course/:course_id/outcomes/users/:student_id (click 'Show All
Artifacts')
- try to create an assessment using the same key as an existing
assessment
- ensure that the existing assessment is returned (check the id)
- fetch results specifying a user id to filter by
- ensure that only results for that user are returned
Change-Id: I2d09691f772658aea3ccdd36cff2df5835b1f2cd
Reviewed-on: https://gerrit.instructure.com/35092
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Derrick Hathaway <derrick@instructure.com>
instead of passing an :exportable option to
ActiveRecord::Associations, simply define a constant
on the class containing exportable associations and
attributes. This is due to :exportable breaking
ActiveRecord, and we can't simply monkey-patch in
config/initializers because models are included in
migrations before the initializers are run
Change-Id: I11f1a6b4570c397d8e01010c517bc6efdac7afca
Reviewed-on: https://gerrit.instructure.com/33235
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Anthus Williams <awilliams@instructure.com>
This commit namespaces the rest of quiz related code into a Quizzes
namespace: controllers, views, models, and classes that previously lived
under lib/ that are Quiz-related.
Test plan:
Full regression test on all quiz related items
refs CNVS-10457
Change-Id: If54b61213945056539e03271a936d233abb66188
Reviewed-on: https://gerrit.instructure.com/29351
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
fixes CNVS-11041
this commit fixes PolymorphicTypeOverride. PolymorphicTypeOverride was
added as a shim to assist in namespacing models that are referenced in
polymorphic relationships. It did this by overriding read_attribute on
the particular attribute (e.g., for ContentTag#content_type).
Unfortunately, in some cases, Rails does not use #read_attribute to
access these types (specifically, when calling .preload_associations).
This adds an override for the attr_reader/method associated with the
attribute to be overridden.
Test plan
- Test affected models with old and new data with sharding enabled.
In a sharded environment:
- Attach an old quiz (one created prior to January) to a module
- when navigating to the module, the attached content items should
display correctly.
Change-Id: Ibfbff5a0d5dc63f6cc3714b22fc3bf4dc04e66cb
Reviewed-on: https://gerrit.instructure.com/29858
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
having an "association" attribute causes problems in rails 3
Change-Id: I3249a25cd2a6162ff33f548a2e9f4f51a2940ece
Reviewed-on: https://gerrit.instructure.com/29058
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-10679
this commit refactors quiz into a quizzes namespace. it contains various
shims to facilitate the data migration of polymorphic relationships
('Quiz' -> 'Quizzes::Quiz'). JIRA contains several tickets linked to
the above tickets in regards to removing these shims after the data
migration, as well as the strategies on reverting the shims once the
data migration is complete.
Change-Id: I30c566d60a87af6ee83e9d0041fdcb909ead6a89
Reviewed-on: https://gerrit.instructure.com/28573
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
SimplyVersioned plugin needs callbacks for the addition of the
submission_versions index table. Whenever a submission version is
saved, we will want to add an entry to the submission_versions table
in addition to the versions table. This patch provides hooks for
those callbacks.
Test Plan:
- Versioned anything should still work
Refs CNVS-2802
Change-Id: I02a862c5894a98ece8a586330f264680751ab52f
Reviewed-on: https://gerrit.instructure.com/19520
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
the shims will be removed in a later commit. that commit will need to
wait for the plugins to be fixed before it can be submitted.
test-plan:
- specs pass
Change-Id: Ifd6e2a254f0272a58d507c845cdae58b7392801c
Reviewed-on: https://gerrit.instructure.com/12798
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
This list is *NOT* complete, some items may have snuck in that I forgot
to note, and/or some of the noted items may not be completely functional
yet.
Specs need to be written around a lot of this, other specs will no doubt
need to be fixed.
Some things, particularly around LearningOutcomeGroups will need data
migrations that aren't there yet.
* remove LearningOutcome.non_rubric_outcomes? and replace with false
where invoked
* remove LearningOutcome.enabled? and replace with true where invoked
* remove never-taken branches
* remove the shared/aligned_outcomes partial and it's supporting
javascript, since it's now empty
* remove js handler for add_outcome_alignment_link and supporting
method since it only occurred in never-taken branches
* mix LearningOutcomeContext into Course and Account
* replace LearningOutcomeGroup.default_for(context) with
LearningOutcomeContext#root_outcome_group
* rename LearningOutcome#content_tags to LearningOutcome#alignments
* rename LearningOutcomeGroup#content_tags to
LearningOutcomeGroup#child_links, and properly restrict
* remove ContentTag[Alignment]#rubric_association_id, add
ContentTag[Alignment]#has_rubric_association? that looks at the
presence of the content's rubric_association_id
* condition off the assignment having a rubric_association rather than
filtering tags by has_rubric_association (which just looks back at
the assignment). all or none of the assignment's alignments are
forced to have the association (via the assignment). this was true in
practice before, is now codified (and more efficient)
* rename AssessmentQuestionBank#learning_outcome_tags to
AssessmentQuestionBank#learning_outcome_alignments
* rename Assignment#learning_outcome_tags to
Assignment#learning_outcome_alignments
* rename Rubric#learning_outcome_tags to
Rubric#learning_outcome_alignments
* move/rename (Course|Account)#learning_outcome_tags to
LearningOutcomeContext#learning_outcome_links
* move/rename Account#learning_outcomes (corrected) and
Course#learning_outcomes to
LearningOutcomeContext#linked_learning_outcomes
* move/rename Account#created_learning_outcomes and
Course#created_learning_outcomes to
LearningOutcomeContext#created_learning_outcomes
* clarify and correct usage of linked_learning_outcomes vs.
created_learning_outcomes
* move/rename (Account|Account)#learning_outcome_groups to
LearningOutcomeContext#learning_outcome_groups
* remove unused Account#associated_learning_outcomes
* just remove one link to a learning outcome when deleting
* merge Account#has_outcomes?, Course#has_outcomes? and
Course#has_outcomes into LearningOutcomeContext#has_outcomes?, add a
use in Context#active_record_types
* kill LearningOutcomeGroup#root_learning_outcome_group (unused)
* rename LearningOutcomeResult#content_tag to
LearningOutcomeResult#alignment
* kill unused (and broken) OutcomesController#add_outcome_group
* kill unused OutcomesController#update_outcomes_for_asset
* kill unused OutcomesController#outcomes_for_asset
* remove unused (outside specs, correct specs)
AssessmentQuestionBank#outcomes=
* remove unused ContentTag#learning_outcome_content
* replace ContentTag.learning_outcome_tags_for(asset) (only ever called
with asset=an assignment) with call to
Assignment#learning_outcome_alignments
* remove unused ContentTag.not_rubric
* remove (now) unused ContentTag.include_outcome
* remove unused LearningOutcome#learning_outcome_group_associations
* avoid explicit use of ContentTag in outcome-related specs
* replace LearningOutcomeGroup#learning_outcome_tags with
LearningOutcomeGroup#child_outcome_links (and only use for outcome
links; not tags for child groups)
* split ContentTag#create_outcome_result into
Submission#create_outcome_result,
QuizSubmission#create_outcome_result, and
RubricAssessment#create_outcome_result. fix some bugs along the way
* refactor ContentTag.outcome_tags_for_banks and some code from
QuizSubmission#(track_outcomes|update_outcomes_for_assessment_questions)
into QuizSubmission#questions_and_alignments
* refactor RubricAssociation#update_outcome_relations and
Rubric#update_alignments into LearningOutcome.update_alignments
* don't use ContentTag#rubric_association with outcome alignments; use
the tag's content's rubric_association in its place (they should have
been equal anyways)
* refactor LearningOutcome.available_in_context and
@context.root_outcome_group.sorted_all_outcomes (only time
sorted_all_outcomes is used) into
LearningOutcomeContext#available_outcomes and
LearningOutcomeContext#available_outcome
* overhaul LearningOutcomeGroup#sorted_content and rename to
LearningOutcomeGroup#sorted_children. it not returns ContentTags
(outcome links) and LearningOutcomeGroups, vs. LearningOutcomes and
LearningOutcomeGroups; fix usages appropriately
* fix UI for arranging/deleting outcome links and groups within a group
to refer to the outcome link rather than the outcome
Change-Id: I85d99f2634f7206332cb1f5d5ea575b428988d4b
Reviewed-on: https://gerrit.instructure.com/12590
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
Refs #4189
No need to create results synchronously in RubricAssociation#assess
just for Assignments - RubricAssessment#track_outcomes already
does that automatically. Just make it use send_later_if_production
instead of plain send_later so the spec still works.
Also, don't do the weird find_and_create in a loop to avoid a
minisculely possible race condition, to avoid creating two versions
off-the-bat.
Change-Id: If6948b9b4fae31782e47874ab1b1b6aa4dd8edb5
Reviewed-on: https://gerrit.instructure.com/3911
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Question banks can be aligned to outcomes that
are part of the same context. Whenever students
take a quiz with questions from the bank they'll
get evaluated for the linked outcomes based on
the points they got for each bank question.
Also fixed a bug which may or may not have existed
before this commit that unexpectedly deleted quiz
submissions when a user tried to re-take a quiz.
refs #3317
Change-Id: I744af3915672a5e260b078503e0bc648c238eca9
Reviewed-on: https://gerrit.instructure.com/2641
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>