all manual
note that for any methods moved/re-indented, I made no other changes
(except possibly a remove of a `self.` on a method call to call another
now-private method) for ease of review
Change-Id: I0cca6644264a0b46a45a1a5c99021c9deb64fca0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277532
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
also improve the unsubmitted call when actually called
when course home is set to assignments it was doing
everything in SortsAssignments including checking
:grade rights on every single assignment
Change-Id: Iec8aed1f671859a33cde4d7d8c868588e6a780a7
Reviewed-on: https://gerrit.instructure.com/161995
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes OUT-346
test plan:
- create some assignments
- as a student, submit to some of the assignments
- as a teacher, grade some of the submissions
go to api endpoint:
users/(student_id)/courses/(course_id)/assignments
?include%5B%5D=submission&bucket=unsubmitted
- the endpoint should list the assignments the student
has not yet submitted to
go to api endpoint:
users/(student_id)/courses/(course_id)/assignments
?include%5B%5D=submission&bucket=ungraded
- the endpoint should list the assignments the teacher
has not yet graded
- assignments the student does not have access to,
such as those restricted by section, should not appear
regardles of status
Change-Id: Ia0d27b01a5124e68a98dc5af8776ead6714e4772
Reviewed-on: https://gerrit.instructure.com/86359
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Tested-by: Jenkins
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
fixes CNVS-17809
test plan:
- make a request to the assignments index api
with the param bucket=
- "ungraded"
- "upcoming"
- "future"
- "past"
- "overdue"
- as a student, the assignments in each bucket
accurately reflect assignment overrides for
this student
- as a teacher, default assignment due dates
are applied
- as an observer watching a single student, buckets
reflect that student's submissions
- as a full course observer, due dates reflect which
section they are in
Change-Id: I69ed0fe063173324a2e848f4b3b49ea42d843744
Reviewed-on: https://gerrit.instructure.com/47437
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
fixes CNVS-14375
Previously grading counts were only available
aggregated as a count for the assignment. This
lets you consume them split out by section
rather than.
needs_grading_count_by_section is the flag
to send. This also splits out the needs_grading
query off into it's own object to reduce the
cognitive load of working in the assignment model.
TEST PLAN:
- setup a course with multiple sections and
assignments that need grading for students in
each
- hit the assignments API index with the
"needs_grading_count_by_section" parameter set
to true
- the JSON response should include a
"needs_grading_count_by_section" key for
each assignment and it should have a hash
of section ids and counts
Change-Id: I290a080b5f657996423798cacfb37660f5ed427c
Reviewed-on: https://gerrit.instructure.com/39627
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
fixes CNVS-1220
test plan
when checking for an assignment listed as upcoming, check:
- the "Coming Up" sidebar on the right of the user's or course's
"Recent Activity" page
- the "Upcoming Assignments" sidebar on the right of the user's
or course's Assignments page
- the "Upcoming Assignments" section on the main listing on the
user's or course's Assignments page
ensure assignments can be overridden to be upcoming
- create an assignment that is due more than one week from now
- as a student, ensure the assignment is not listed as upcoming
- create an override that applies to the student that makes the
assignment's due date less than one week from now
- As a student, ensure that the assignment is listed as upcoming
ensure assignments can be overridden to not be upcoming
- create an assignment that is due less than one week from now
- as a student, ensure the assignment is listed as upcoming
- create an override that applies to the student that makes the
assignment's due date more than one week from now
- As a student, ensure that the assignment is not listed as upcoming
Change-Id: Ia517d87f0a8ed48f6ce3ca466258e7ad8ebe650c
Reviewed-on: https://gerrit.instructure.com/17168
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Marc LeGendre <marc@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>
Added a presenters folder so that complex view logic that doesn't fit
within the scope of a helper can have its own place in the project tree.
Change-Id: Ibd4caa969b94b33b10f0a5afd1f2dd7163bc8bf7
Reviewed-on: https://gerrit.instructure.com/15347
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes#11953
This fixes a typo in sorts_assignments which got the wrong key out of
the passed hash in SortsAssignments.by_varied_due_date.
The spec has been updated as well to take a list of submissions. It
now also checks that #by_varied_due_date will raise an error if any
fields it requires are missing.
test plan:
create an assignment with an overdue due date ( due_at < Time.now )
create an assignment with a non-overdue due date ( due_at > Time.now )
as a student in the course, visit the Course Asssignment page
make sure that the overdue assignment appears under "Overdue
Assignments"
make sure that the non-overdue assignment is not in the "Overdue
Assignments" section on the page.
Change-Id: I74bc99521e4675b5f4f92bfdfa7c175daa99b3aa
Reviewed-on: https://gerrit.instructure.com/15586
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@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>