Commit Graph

17 Commits

Author SHA1 Message Date
Cody Cutrer c2cba46851 RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: I4a0145abfd50f126669b20f3deaeae8377bac24d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279535
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:03:06 +00:00
Cody Cutrer e73cf9ddf4 RuboCop: Style/HashSyntax
[skip-stages=Flakey]

auto-corrected

Change-Id: I9371a61046aee6b148f89dd434114a8ba2b1188c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:02:35 +00:00
Cody Cutrer 196d92d5d3 RuboCop: Rails/Validation
auto-corrected

Change-Id: Ic0cae5ea88556acc456499b4a466a36e9151a5c6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278365
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>
2021-11-16 16:48:43 +00:00
Cody Cutrer f5cdb0d986 RuboCop: Layout app/models
Change-Id: Ieae2904fb81739476d806b01bd7b4ff98c5ee35c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274155
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>
2021-09-22 19:32:32 +00:00
Jeremy Stanley a578221872 don't clean up Ignores for users with concluded enrollments
because apparently they still see these items in the todo list,
and this only makes them reappear overnight after being X'd out

test plan:
 - a teacher who sees todo items for a course in which her
   enrollment was completed_at > 6 months ago should be able to
   get rid of them by clicking X, and they should not reappear
   after Ignore.cleanup is run

flag = none
fixes LS-2200

Change-Id: Ic1fe0c3325d6e32ee553b8a0251ea302de33d0c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264296
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-05-06 22:18:13 +00:00
Cody Cutrer f299f76b75 add # frozen_string_literal: true for models
Change-Id: I70825be7ec7e24458afe0c63dc48c5a76158f520
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251150
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-10-28 22:08:12 +00:00
Cody Cutrer c5227d3f1b shackles was renamed to guardrail
closes FOO-989, FOO-990

Change-Id: I49dfa130cb74c34dd0eb25952790176ae4951058
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249365
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>
2020-10-06 19:23:08 +00:00
Mysti Sadler 610f931b2d Change ignore cleanup to be smarter
fixes ADMIN-844

Test plan
- WITHOUT to do list dashboard turned on
- Create an assignment, quiz and peer review
  for a user
- As the user, go to the dashboard and ignore
  the items in the to do list
- As the user, complete the items
- Verify the ignores have been deleted
- As a teacher who can grade one of the
  above assignments, go to the dashboard
  and ignore the grading remind
- Grade everything for the assignment
- Verify the ignore has been deleted
- Do the above again, but instead
  of completing the items, mark the
  enrollments as concluded 6 months ago
  or deleted 1 month ago
- Run Ignore.cleanup
- Verify the ignores are deleted
- Verify other ignores are not deleted

Change-Id: I867102b62f45706b74156c0c8c2d5733dd12512f
Reviewed-on: https://gerrit.instructure.com/144045
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2018-03-30 16:46:14 +00:00
Landon Wilkins 847e72d543 da licença part 12
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: I4d42346ee3e7d95dfb0fee61e832ce4403b27f91
Reviewed-on: https://gerrit.instructure.com/110032
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 21:36:29 +00:00
James Williams 89370c5f11 remove protected_attributes
refs #CNVS-32574

Change-Id: I3ba018a7110a7530c9af4a59c97422f626a749b6
Reviewed-on: https://gerrit.instructure.com/99260
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-12 17:46:18 +00:00
James Williams 05a534f533 strong params part G-L
refs #CNVS-32574

Change-Id: Ied89f6194ea3f63c546b50d056fe7cbe3a038609
Reviewed-on: https://gerrit.instructure.com/94678
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 20:58:10 +00:00
Jeremy Stanley 60213b772e include ungraded quizzes in TODO items
test plan:
 - ensure ungraded quizzes (survey or practice quizzes)
   due in the near future appear alongside graded quizzes
   and assignments in the To Do list on the dashboard
   - ensure they appear in the correct chronological
     position
   - ensure they link to the quiz properly
   - ensure the X button to remove the notification
     works properly
 - ensure ungraded quizzes are returned by the API
   "TODO items" endpoints for users and courses
   when `include[]=ungraded_quizzes` is supplied
   and that they appear in the correct chronological
   position

closes CNVS-32164

Change-Id: I216140ff9a3cada662c9fc8357de2e0ab0a8fa45
Reviewed-on: https://gerrit.instructure.com/91346
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-09-29 19:04:55 +00:00
Cody Cutrer fb64908614 expand "native" polymorphic associations to most polymorphics
Change-Id: I0b2ada85ae6d7b32d2940f5c7db6596b27c3bf84
Reviewed-on: https://gerrit.instructure.com/72282
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-02-22 19:14:31 +00:00
Drew Bowman 99f8b1d73d give more access to peer reviews
fixes CNVS-1455

test plan:

- create a graded discussion that requires peer review
- the discussion should have a peer review icon in listings
- assign peer reviews to students
- the students should have a peer review link in their
  activity stream

Change-Id: I416c876c9e21b5ce2a72c46fceb7a33bdfd3f96e
Reviewed-on: https://gerrit.instructure.com/36459
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: David Josse <david@instructure.com>
2014-08-08 16:18:45 +00:00
Braden Anderson 45d19f3003 validate types on polymorphic associations
fixes ALYT-26

test plan:
	* regression test

Change-Id: Ie93e89b842e354f1f76d75f3492145b86c79a035
Reviewed-on: https://gerrit.instructure.com/34560
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-05-28 17:05:34 +00:00
Cody Cutrer d9111f5414 arel-ify models
closes CNVS-4707

Change-Id: I32c8ec5a53525f89cf232890eaac790fbc2b4744
Reviewed-on: https://gerrit.instructure.com/18745
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-04-01 18:42:38 +00:00
Cody Cutrer 996a457bdc make assignments_needing_x shard safe
fixes CNVS-2200

normalize ignores out of the users.preferences column into
its own table. makes it more performant, and shard safe

test plan:
 * add a user as a teacher in courses on two different shards
 * set up an assignment needing grading (i.e. have a student
   submit an assignment that requires grading) in both courses
 * the assignment should show up on the teacher's dashboard
   regardless of which shard he's on
 * ignore the assignment on your dashboard on one shard
 * reload - it should stay gone
 * it should also be gone on the other shard
 * have another student submit to that assignment
 * it should come back on both shards for the teacher
 * ignore it, permanently this time
 * have another student submit to that assignment
 * it should still be gone on both shards

Change-Id: I6646410273c6be05d4b21b29b6ab76feb8e65d0f
Reviewed-on: https://gerrit.instructure.com/17295
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-02-01 17:08:41 -07:00