Commit Graph

3 Commits

Author SHA1 Message Date
Cody Cutrer 809904d8b6 add frozen_string_literal comment to migrations
Change-Id: Idf4ddb29567c1dfab9f01b09c7a1056367ae7b44
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261814
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2021-03-30 18:14:36 +00:00
Stewie (Nicholas Stewart) 5fa6bb57b9 Add copyright message to remaining .rb files
Update: Copyright years now reflect the year that the file was first
committed.

Refs: PLAT-3200

Test Plan: jenkins is still happy and specs pass!!

Change-Id: Ic26463defe41fc52cf4da8020976394c641f51d5
Reviewed-on: https://gerrit.instructure.com/143545
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
2018-03-19 13:38:50 +00:00
Derek Bender 8f3fcfe51d add late_policy_status, accepted_at, points_deducted to submission
closes: CNVS-32365

Test Plan:
1. As a student, submit to an assignment late.
2. In rails console, observe that the submission created in step 1
   returns `minutes_late` that accurately represents the number of
   minutes late the submission was. This value should be 0 for
   not-late submissions.
3. As the student, resubmit to the assignment. In a rails console,
   verify the minutes_late has been updated.
4. Repeat steps 1-3 with a quiz instead of an assignment. To get the
   submission for a quiz, it will look like:

   quiz = Quizzes::Quiz.find_by(title: "My Quiz")
   s = quiz.quiz_submissions.find_by(user_id: 173).submission

   For quiz submissions, the student should be given one minute of
   leeway, meaning if you submit a minute or less after the quiz is
   due, minutes_late should be 0. A way you can test it via rails
   console:

   # make the student's submitted at exactly 1 minute after it was due
   irb(main):103:0> s.submitted_at = 1.minute.from_now(s.cached_due_date)
   => Thu, 04 May 2017 06:00:59 UTC +00:00
   # verify minutes_late is 0, since quiz submissions get 1 minute of leeway
   irb(main):105:0> s.minutes_late
   => 0.0

   # make the student's submitted at exactly 2 minutes after it was due
   irb(main):106:0> s.submitted_at = 2.minutes.from_now(s.cached_due_date)
   => Thu, 04 May 2017 06:01:59 UTC +00:00
  # verify minutes late is 1, since quiz submissions get 1 minute of leeway
   irb(main):108:0> s.minutes_late
   => 1.0

Change-Id: I170f798a38d827a0699682cb557c1aa81c73201e
Reviewed-on: https://gerrit.instructure.com/107955
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Matt Taylor <mtaylor@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-05-05 16:03:01 +00:00