closes #CNVS-26031
Change-Id: I2e0351fb62e5a06b47fe8c6c3dd503318d29a7ad
Reviewed-on: https://gerrit.instructure.com/69228
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
* make sure the dashboard sidebar has correct due dates
for overridden assignments
closes #CNVS-23993
Change-Id: I09ab704768b51aebe294515aad1791340b51f67f
Reviewed-on: https://gerrit.instructure.com/66467
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
and some other things too
test plan:
* regression test around the dashboard sidebar
closes #CNVS-22776
Change-Id: I46f1bd4476ca9aba27d41a4ce725c7dc2ee00dc5
Reviewed-on: https://gerrit.instructure.com/66056
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* basic regression test the calendar events public feed api
closes #CNVS-22774
Change-Id: I0a21788d25c63b404a4c6410f5d01e785bed1ed8
Reviewed-on: https://gerrit.instructure.com/62941
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
- preload context module data for student assignments
in calendar_events_api (improves locked_json)
- preload adhoc assignment overrides
(i.e. assignment_student_overrides) instead of doing
N+1 queries
- search the preloaded assignment_overrides when possible
instead of calling yet another query
test plan:
* regression test assignments api index, assignment groups
api index, calendar events api index, in particular
with regards to assignment overrides
refs #CNVS-22774
Change-Id: I5c027e346c733ce0dac2fcd702c5272ff861d1b3
Reviewed-on: https://gerrit.instructure.com/62892
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* assignments and assignment groups api index should
work as before
closes #CNVS-22864
Change-Id: I4b72f0fd5d5a8dc40a7669ee3929c60ddc401114
Reviewed-on: https://gerrit.instructure.com/62851
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
refs #CNVS-21317
Change-Id: I60016fd04109605d4324d5b184d5c0f7afa2515e
Reviewed-on: https://gerrit.instructure.com/60583
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
* syllabus should work as before
* modules loading of assignment due dates should work
as before
* assignments api should work as before
refs #CNVS-21476 #CNVS-21317
Change-Id: Iba183d6fda604acb29e9685f0f32be74ad27b898
Reviewed-on: https://gerrit.instructure.com/57215
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-16556
test plan:
- assignment index loads fine as teacher & student
- as does the gradebook
- as do calls to the assignment group api
Change-Id: Iff2fe084c15500f1dd232606f9182df328c76988
Reviewed-on: https://gerrit.instructure.com/43511
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* due dates should not intermittently fail to update
when updating
fixes #CNVS-13067
Change-Id: Ie4faf3112c847c4e969ae59e4c782466b94a2f84
Reviewed-on: https://gerrit.instructure.com/39535
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
this was replaced a long time ago by test student
Change-Id: I20981ada3e72df82da89d5bae1b81a3b31cfac66
Reviewed-on: https://gerrit.instructure.com/36309
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
when the assignment (or quiz) is a past version, it may have been
overridden by an override that was active then, but deleted now. don't
filter it out (based on deleted now) before letting
current_override_version look at it.
Change-Id: I072d24773a43f0ebfac6c463b5a820b553f056a3
Reviewed-on: https://gerrit.instructure.com/35116
Reviewed-by: Liz Abinante <labinante@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-7852
test plan:
- as teacher create an assignment with different due dates for
a couple sections
- as a TA that is limited to one section
- in the assignment index you can see all due dates
- in the assignment show page you can see all due dates
- in assignment edit page you have same access as a teacher
- changing dates works as expected
Change-Id: I3616751d7158fa3252852fc78be40cb660fe9cf4
Reviewed-on: https://gerrit.instructure.com/35190
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Coraline Ehmke <coraline@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-10793
fixes CNVS-12360
test plan
=========
- assignment overrides should still work
- general regression of assignment#new, #edit, quizzes#new, #edit, discussions#new, #edit
- check API end points for above overrides
Change-Id: I211ad888ac14d7e863ab67bfcb27d56a85e62aac
Reviewed-on: https://gerrit.instructure.com/29980
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Liz Abinante <labinante@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>
refs CNVS-6763
Test plan:
assignment due dates should display properly after updating an
assignment's overridden due dates
Change-Id: I3f066444dc969b4ee0cd30fe823278852216ae1e
Reviewed-on: https://gerrit.instructure.com/28798
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
fixes CNVS-9776
The version number isn't necessary since we still have updated_at
(having the version number requires a query for every assignment).
Test plan:
* make sure assignment overrides still work (sorry)
Change-Id: I909494d1b7bde237a3b66db8ae987f61cdd6c024
Reviewed-on: https://gerrit.instructure.com/26793
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
refs CNVS-6747
Test plan:
* Make sure the new assignments index page still shows correct dates
(test in a course that has assignments with and without overrides)
* Test the assignments index api action and make sure it returns the
right dates too
Change-Id: Ibb6baaa5009fe95b68e160af2fb4e91d5ac8ef37
Reviewed-on: https://gerrit.instructure.com/22612
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
refs CNVS-6747
Test plan:
make sure teachers still get the correct due date when an assignment
has course section overrides and a default due date
Change-Id: I6ad9f99bc4558c7f1d6a48c93fbd13426d2fe409
Reviewed-on: https://gerrit.instructure.com/22531
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
We would lose any included assocations on an assignment after
overriding due to ActiveRecord::Base#clone. This just copies all the
loaded assocations back over.
refs CNVS-6747
Change-Id: I6496ad1eee257a6745edc6d8f69f9627993e9983
Reviewed-on: https://gerrit.instructure.com/22497
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
refs CNVS-5805
first, don't do a count if we're just going to load the whole association anyway
second, don't use empty? on an association - that does a count. instead you
should use exists?, but the next branch does another query anyway that
would tell us the same information, and still only query one row
test plan:
* basic regression testing around versioned models (assignments, overrides,
wiki pages, etc.)
Change-Id: I9d29eacbaa67dbc267ee09400d62651ef6ccdc0a
Reviewed-on: https://gerrit.instructure.com/20901
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
if we're dealing with the actual assignment/quiz instead of the model
from one of its versions, we don't need to align the history of the
overrides with the history of the assignment/quiz. we can just use the
most recent version of each override.
refs CNVS-5805
test plan: existing specs cover that this optimization doesn't break
reading overrides of older versions
Change-Id: I52d55da0619688744d63d6523e1bc055ecdaa667
Reviewed-on: https://gerrit.instructure.com/20813
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-5650
test plan:
- go to the root account permission page and turn off "see the list of users"
for students
- then create an assignment with only overrides (no default)
- the students should see the due date
Change-Id: I518f651db96b14509c997628575834943042117f
Reviewed-on: https://gerrit.instructure.com/20395
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Currently, when an Assignment is replaced by a cloned version via
AssignmentOverrideApplicator, the new object is a singleton and there-
fore cannot be serialized / cached.
This patch removes the creation of the singleton and uses instance
variable @new_record to get the same effect.
Refs CNVS-5253
Change-Id: Id26377b6f9c4cd226d0144ccaf33452de1148050
Reviewed-on: https://gerrit.instructure.com/20158
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
closes CNVS-3756
Test plan:
make sure assignment show up in the correct section of the page in
/assignments for the following configurations:
* no overrides
* has a section override due date before the assignment due date
* has a section override due date after the assignment due date
Change-Id: I7681416a102c9d8078f433fb03f8667cf2647e98
Reviewed-on: https://gerrit.instructure.com/17968
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
test plan:
- new specs should pass
- go through and make sure assignment overrides work
for quizzes by using the editor on the quiz
edit page.
fixes CNVS-469
Change-Id: I6b647575bb7db34235b2a1742558f6274b2605fc
Reviewed-on: https://gerrit.instructure.com/17437
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
closes CNVS-747
test plan:
- go to the assignments edit page
- you should be able to create new assignment overrides as a teacher
- you should be able to update existing assignment overrides as a
teacher
- make sure you are able to delete assignment overrides
- make sure that using the "add due date" button, you cannot add more
overrides than the number of the sections of the course + 1 (the +1
is for the due date representing everyone else.
- make sure that you can not remove the last override when hitting the
remove buttons to the right of overrides when you have more than one
override.
- make sure the remove button disappears when you only have one
override, and reappears when you add an override.
- ensure the dates you enter on this page propogate to the assignments
show page and other areas of Canvas.
Change-Id: I974924797d9d4783c7f6ae93a25c356112fc0f54
Reviewed-on: https://gerrit.instructure.com/17342
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-518
also included:
- observers now get visible students' section overrides in their
AssignmentOverride.visible_to scope
- fixed a bug where calling some DatesOverridable methods would
use an overridden date where you wouldn't expect (see the specs)
- added a method to get the original object from an overridden one
- made DiscussionTopicPresenter handle due dates overridden to nil
test plan notes
- keep an eye out for regressions in displayed due dates
- discussion locking behavior should be as follows
-- viewing the discussion page before the earliest applicable
unlock date should show a locked discussion page that lists
the earliest unlock date
-- viewing the discussion after the earliest unlock date should
show the discussion
-- the discussion page should show the due date when only one
due date applies
-- the discussion page should show a "multiple due dates" ui when
more than one due date applies
-- the "multiple due dates" ui should only display entries for
sections that the observer's linked students are in
-- the "multiple due dates" ui should display lock dates from the
associated section override or from the original assignment
if the section override does not override lock dates
test plan
- check an observer not observing student
-- ensure that the discussion locking behavior behaves according
to the observer's section's override
- check an observer observing one student
-- ensure that the discussion locking behaves according to the
student's section's override
- check an observer observing multiple student's in more than one
section
-- make overrides for each student's section that differ in due
dates and lock dates
-- ensure that the discussion locking behaves according to the
students' sections' combined lock dates
-- ensure that the discussion page shows a "multiple due dates"
ui when the discussion is unlocked
Change-Id: I8f2970f0962cdc60cf9a423f01a876bf0ae909d4
Reviewed-on: https://gerrit.instructure.com/17452
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
Fixes #CNVS-2017
Notes:
* Previously, code assumed a user would always be present,
but this is not so for public courses with anonymous users
* Handles nil user cases in DatesOverridable and
AssignmentOverrideApplicator
Test plan:
1. Create a public course.
2. Create an assignment with a default due date
and one or more overrides.
3. View the assignment as a guest. The default due
date should be displayed.
Change-Id: I5e4907dd52636816c6dccabc3acdbb138c638f27
Reviewed-on: https://gerrit.instructure.com/16817
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
test plan:
* create section overrides for an assignment
* enter student view
* the latest override across all sections should be
reflected in views where vdd has been implemented
closes #CNVS-388
Change-Id: I22d02e228c596d431835117383d12c7311f13a7a
Reviewed-on: https://gerrit.instructure.com/16529
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes #CNVS-2309
Problem:
Overriding a due date to be earlier than the default was having no
effect because the default date was getting lumped in with the overrides
and treated the same way when deciding which to use.
Solution:
If there are applicable overrides, don't take the default into account.
Notes:
The issue was happening as a result of the way the VariedDueDate class
indiscriminately lumped due dates together and returned the last one.
Part of the solution was removing the VariedDueDate class and instead
relying on the override methods on an Assignment. This was done not
only to fix the bug at hand but also to move toward a more consistent
interface for handling varied due dates.
Change-Id: If9d24725a19b134d5d92d3a5c08d6794f466fa9c
Reviewed-on: https://gerrit.instructure.com/16406
QA-Review: Myller de Araujo <myller@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
indicates multiple overridden due dates on multiple sections if
they are visible to a teacher/ta/designer
if there are different dates, it sends all the information back
this json info can be used in the future for a detailed popup
but for now, simply indicate with text that there are
multiple due dates for the assignment
if they are a student, then only show them the latest override
that applies to them
test plan:
* create an assignment
* create a module, add the assignment as an item
* create another course section
* override the assignment date for one section,
then override it to another date for the other section
* go to modules page, should see "Multiple Due Dates"
* create a ta/teacher/designer/student, restrict them to one section
* login as the ta/teacher/designer/student, should see one due date
closes #CNVS-2010 #CNVS-2011
Change-Id: Ieab089a27e4e4e7bea26b1c597859bf8b77dc802
Reviewed-on: https://gerrit.instructure.com/16401
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
fixes #CNVS-517
fixes #CNVS-761
test plan
- start with a course with students in different sections
- create a quiz with a lock date that locks the quiz currently
- create a lock date override that unlocks the quiz for one section
- ensure that a student from a section that the override does not apply to
does see a lock icon on the course's quizzes list for the quiz
- ensure that a student from the section that the override does apply to
does not see a lock icon on the course's quizzes list for the quiz
Change-Id: Ic1f553818ff106e1d29a8f1b66d8445b99aecffc
Reviewed-on: https://gerrit.instructure.com/16228
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
[Fixes #CNVS-1145]
* Adds support for attaching AssignmentOverrides to quizzes
* Links common overrides for Assignments that belong to Quizzes
so quiz.due_dates_for(user) == quiz.assignment.due_dates_for(user)
* Moves common functionality for VDD out of the Assignment model
and into the DatesOverridable module, which is now included on
Quiz for a consistent interface
Test plan:
* Run through a few of the old VDD scenarios and verify things
still work as expected since a lot of code has shifted around
* No interface changes have been made to quizzes yet, so nothing
to check there
https://gist.github.com/f12b3694016f3dcc979e
Change-Id: I32b4a54273f90fac689e05174039b8efc952dd39
Reviewed-on: https://gerrit.instructure.com/16028
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
[Fixes CNVS-1945]
Previously, we were executing a lot of unnecessary queries
in AssignmentOverrideApplicator#overrides_for_assignment_and_user
when the end result was coming up as an empty array in the case
of no overrides. We can predict this outcome by simply checking
if an assignment has overrides before trying to determine if a user
has matching enrollments.
With caching disabled for this method, hitting the assignments
listing as a student with 5 assignments and no overrides ran 46
queries. With this change, only 27 queries are made (41% fewer).
Change-Id: I42d6c81fe1a271e5fdea89e148417833312c83c3
Reviewed-on: https://gerrit.instructure.com/15838
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
fixes#11752, #11753, #11758
this commit creates calendar events for every assignment
due date visible to the current user. this means that
students now see the due date that applies to them.
this commit also paves the way for proper override display
for teachers/admins/tas/observers.
test plan:
* create an assignment with an overridden due date that
applies to a student;
* as the student, navigate to calendar and verify that
the assignment is only displayed w/ its override date;
* as the student's teacher, navigate to your calendar,
view the API response, and verify that the overridden
assignment displays once for each due date. also verify
that the overridden assignment response has an
"assignment_override" key.
Change-Id: I9d9ebd036425c155cb4ad7bf24f11f788b4f59f0
Reviewed-on: https://gerrit.instructure.com/15314
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Marc LeGendre <marc@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
test plan:
REFERENCE:
* "Main Assignments Page": "localhost:3000/assignments", or click on
"Assignments" in the menu bar near the top of the page.
* "Right Side Bar": Go to the Main Assignments Page, it's on your
right.
* "Course Assignments Page": Hover over "Courses" in the menu bar
* near the top of the page, click on the course you set up. Once
that page loads, click on "Assignments" tab on the left hand side.
STEPS:
* https://gist.github.com/f12b3694016f3dcc979e
Change-Id: I9a5884ec1057f196ba5b731a2978c874141bec5b
Reviewed-on: https://gerrit.instructure.com/15006
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
instead of "most specific"
Change-Id: I0b585de78dfb8ed7597e326610856aec331ed9f6
test-plan:
- create an assignment with a section override and an adhoc override,
and a student to which both overrides apply
- set the assignment's due_at and the section override's due_at, then
set the adhoc override's due_at to be later than both the section
override's and the assignment's; the value of
assignment.overridden_for(student).due_at should be that of the adhoc
override
- set the section override's due_at later than the adhoc override's;
the overridden due_at should be that of the section override
- set the adhoc override's due_at to be nil (but still overridden); the
overridden due_at should be nil
- set the adhoc override's due_at back later than the section
override's and set the assignment's due_at to nil; the overridden
due_at should be the adhoc override's
- overridden all_day and overridden all_day_date should track with the
overridden due_at
- repeat for unlock_at and lock_at, but expect the *earliest* date for
unlock_at, rather than the latest
Reviewed-on: https://gerrit.instructure.com/14853
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
a convenience method to get all due dates applicable to and/or visible
to a specific user for an assignment. new named scopes on
AssignmentOverride to facilitate it, and minor bug fixes
Change-Id: I7f400fd13b7903b362e9ca0e6991f1d287f5f783
Reviewed-on: https://gerrit.instructure.com/14581
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
refs #10831
test-plan:
- create a course, student, and assignment
- create an assignment override that applies to the student
- the return value of assignment.overridden_for(student) should act
just like assignment, but with the overridden values in place
- the overridden assignment should not be able to be saved
- create multiple assignment overrides that apply to the student
(adhoc, group, sections, etc.)
- the overrides should be applied in the correct order
- overrides that don't affect a field should let lower priority
overrides affect it
- create an override and then delete it (without changing the
assignment version in between)
- the override should not apply
- create an override, then bump the assignment version, then delete the
override
- the override should apply to the old version of the assignment but
not the new one
- bump the assignment version, then create an override
- the override should apply to the new version of the assignment but
not the old one
Change-Id: Ib632903640cb8aeae5bbc8959c244f6923690f29
Reviewed-on: https://gerrit.instructure.com/14135
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>