Commit Graph

36 Commits

Author SHA1 Message Date
Robin Kuss 4ea47ec8db turn diff mods on for CI and dev
Closes LX-1705

Test Plan: jenkins is happy

[skip-stages=Flakey]

Change-Id: I92b39cc5150ee522f1fee7ec77b87a276b7eb49e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348203
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2024-06-14 18:31:58 +00:00
Sarah Gerard 24d74b12e9 Use AssignmentVisibilityService
these views are causing serious performance problems.  follow
the advice of our DBAs and instead of using/ joining on the
assignment_student_visibilities view we will now use the new
services

closes LX-1728
flag=differentiated_modules

test plan:
- tests pass
- a thorough QA of assigning assignments to different students
  and sections and checking for correct visibility.
Change-Id: If88db4b7d26b6d289bcd453ea6108ce11d949bdf

Change-Id: Idc141205b1949416e5f17a5b87fbbdcbc99c4356
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349302
Reviewed-by: Jen Smith <jen.smith@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2024-06-05 21:34:54 +00:00
Sarah Gerard 9cf5b6bb6d Use QuizVisibilityService
these views are causing serious performance problems.  follow
the advice of our DBAs and instead of using/ joining on the
quiz_student_visibilities view we will now
use the new services

refs LX-1728
flag=differentiated_modules

test plan:
- tests pass
- a thorough QA of assigning quizzes to different students
  and sections and checking for correct visibility.

Change-Id: I26f7d2cda691f6071a72b535ec3b53a89a85d108
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349053
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2024-06-04 17:41:11 +00:00
Jackson Howe ea83d570fe Create module_student_visibilities view
Slightly refactors the student visibilities view generator as
StudentVisibilitiesV5 so that it can be used to generate the new
module_student_visibilities view in addition to ASV and QSV, which
it already does. Creates MSV in a migration. The migration also
replaces the ASV and QSV definitions using the updated generator to
keep all 3 views in sync - the syntax for ASV and QSV changes slightly,
but there's no functional changes to those views (its also only
updating asv_v2 and qsv_v2, which are behind a disabled flag in
production).

The resulting MSV view will return module ids that a user can see. A
user can see a module if its visible to everyone (i.e., there's no
active overrides on the module) OR if there's overrides on the module
that apply to the user.

closes LF-995
flag = none

Test plan:
 - Compare the generated SQL for ASV/QSV between StudentVisibilitiesV4
   and StudentVisibilitiesV5 by running the following:
   connection.execute(MigrationHelpers::StudentVisibilities::StudentVisibilitiesV4.view(connection.quote_table_name("assignment_student_visibilities_v2"), Assignment.quoted_table_name, is_assignment: true))
   connection.execute(MigrationHelpers::StudentVisibilities::StudentVisibilitiesV5.new(connection.quote_table_name("assignment_student_visibilities_v2"), Assignment).view_sql)
 - Expect those to be functionally the same

 - Find a module and click "Assign To" - assign a few students
 - In a rails console, run ModuleStudentVisibility
    .where(context_module_id: <module id>)
 - Expcet the student IDs to match those assigned

Change-Id: I5067584c49be0dc37d9918528e769656ed1dda2e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337282
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-01-16 20:38:56 +00:00
Sarah Gerard 9c82c86926 Account for unassign_item in ASV/QSV views
closes LF-681
closes LF-682
flag=differentiated_modules

test plan:
- with the flag on
- have an assignment/quiz with different types of overrides
- the only overrides with unassign_item as true are section
  and ADHOC overrides
- run assignment.assignment_student_visibilities
  or quiz.quiz_student_visibilities with different scenarios
- assignment has an adhoc unassigned override
- assignment has a section unassigned override
- assignment has an assigned adhoc override with an
  unassigned section override (student should still have
  visibility)
- assignment has an unassigned adhoc override with an
  assigned section override (student should not have
  visibility)
- test out including the assignment in a module with
  overrides as well (the module itself should not have
  unassigned overrides)

Change-Id: Ia2e62b3dac069c37c18babc9c5dbae34ca11c52b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333103
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
Migration-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
2023-11-20 15:16:31 +00:00
Sarah Gerard 6e6e58d030 Add Module Overrides to ASV/QSV views
closes LF-671
closes LF-672
flag=differentiated_modules

test plan:
- with the flag on
- have a course with multiple assignments/quizzes
  and modules
- for each assignment/quiz, run
  assignment.assignment_student_visibilities
  or quiz.quiz_student_visibilities
- test out different scenarios:
- an assignment that is in a module with an ADHOC override
- an assignment that is in a module with a section override
- an assignment in two modules, one with an override and
  one without (should be visible to everyone)
- an assignment that has an assignment override and a
  module with an override
- for each scenario, ensure that only the users with overrides
  are given visibility, unless there is a module with no
  overrides that contains the assignment.

Change-Id: I9c62c619e3f76456ca5a5eda0a85819d5c84158a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332730
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Migration-Review: Jackson Howe <jackson.howe@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2023-11-16 19:36:21 +00:00
Sarah Gerard c3c6a1b35a Add course overrides to ASV QSV
closes LF-678
closes LF-677
flag=differentiated_modules

test plan:
- run migrations
- with the flag on (if you flipped your flag make sure
  to restart canvas)
- test with both an assignment and quiz
- create a course override for the assignment/quiz
  override = assignment.assignment_overrides.create!
  override.update_attribute(:set_type, "Course")
  override.update_attribute(:set_id, course.id)
- run assignment.assignment_student_visibilities or
  quiz.quiz_student_visibilities
- expect to see all students in the course listed

Change-Id: Icad2a2f67f41273cf89a43db288983eb0218ff3c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331992
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Migration-Review: Jackson Howe <jackson.howe@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2023-11-06 18:49:36 +00:00
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 9b71ed2054 RuboCop: Style/BlockDelimiters, Style/Lambda
[skip-stages=Flakey]

auto-corrected

Change-Id: I642f868d75c079e698f1fe4161bbbe419dbe1827
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279374
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-23 21:30:47 +00:00
Cody Cutrer c4bc112611 RuboCop: Style/MethodCallWithoutArgsParentheses
[skip-stages=Flakey]

auto-corrected

Change-Id: Idcbd419ab2196101398715e6b8cdd8d70ae5c587
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278698
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-18 23:07:30 +00:00
Cody Cutrer dc12b29899 RuboCop: RSpec/EmptyLineAfterExampleGroup, RSpec/EmptyLineAfterSubject
[skip-stages=Flakey]

auto-corrected

Change-Id: I3723d4c743da33bd2d6255be9d8c176a4fb84d9c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278689
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-18 14:58:17 +00:00
Cody Cutrer 9792b6780d RuboCop: Performance/RedundantBlockCall
[skip-stages=Flakey]

auto-corrected, with a few post-correction tweaks

Change-Id: Ic8ad959a4c331ae879644f473ffda20e63e353e9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278341
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-17 20:03:24 +00:00
Cody Cutrer 104f7642ff RuboCop: RSpec/EmptyLineAfterHook
[skip-stages=Flakey]

auto-corrected

Change-Id: I6663e9e197e5f6c06b574804e466c39519050ba3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277754
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-10 16:15:08 +00:00
Cody Cutrer e7e5192b70 RuboCop: RSpec/EmptyLineAfterExample
auto-corrected, no additional changes beyond the auto-correct

Change-Id: Ic0194e60ccd8cee4cfc814134f807f621b7d511d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277748
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-10 16:14:50 +00:00
Cody Cutrer 06a2c9df42 spec: remove manual requires of spec_helper
[skip-stages=Flakey]

Change-Id: Id65c835b72e1c0a4bb825b58490ce0ff7c8d9873
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276829
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-10-26 20:38:27 +00:00
Cody Cutrer b6e406ddcf RuboCop: RSpec/ExampleWording
[skip-stages=Flakey]

Change-Id: I291432cd1f51fdaefb3cf6160d423879fb858c11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274253
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-24 02:15:35 +00:00
Cody Cutrer 8e0327867e RuboCop: Layout spec/models
[skip-stages=Flakey]

Change-Id: I25b7f97dc3bb7fd9f24e63e372d7127c42cd3147
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274147
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:17:48 +00:00
Cody Cutrer 81d0bbc465 add # frozen_string_literal: true for specs
Change-Id: Id508bec1817937b1c24c29f1db7221e09cb9c2ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251157
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-27 20:48:35 +00:00
Neil Gupta e597167034 Store dropped submissions from a calculation
fixes GRADE-326

test plan:
* Create a course with a student and assignment group
* Add 2 assignments with 10 points possible to the assignment group
* Create a drop rule to drop the lowest assignment from the group
* Score the student 5 and 10 on the assignment
* In rails console:

  e = Enrollment.where(user_id: <student_id>, course_id: <course_id>)
  score = e.first.find_score
  details = score.score_metadata.calculation_details

 score.current_score should be 10, and details should look like

  {
    current: {
      dropped: [first submission id]
    }, final: {
      dropped: [first submission id]
    }
  }

Change-Id: Iba4173ce52f52f6acd474860d190d1d4c4d3c253
Reviewed-on: https://gerrit.instructure.com/129213
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-10-30 22:57:49 +00:00
Shahbaz Javeed e966615880 ensure graded assignments aren't gradable after removal from overrides
closes GRADE-124

test plan:
* Create a differentiated assignment
* Submit the assignment from two students
* Assign grades to all but one student
* Unassign the assignment from a graded student and the ungraded
  student
* Go back to gradebook
* Verify that the cell for the graded student is grayed out and not
  editable
* Verify that the cell for the ungraded student is grayed out and
  not editable

Change-Id: I93c9a2f4dec0888d56ba39682bc2184196f25bba
Reviewed-on: https://gerrit.instructure.com/122731
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Matt Taylor <mtaylor@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2017-08-28 15:56:43 +00:00
Landon Wilkins 242581edd3 da licença part 48
add consistent license headers to all source files

Change-Id: Ib581cddb21430cf4971aeb14980727c2935e31e4
Reviewed-on: https://gerrit.instructure.com/110154
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-28 18:59:33 +00:00
Spencer Olson fb9049324e set default values for booleans on various tables
This commit adds default values of false and not null constraints for
all boolean columns on the assignments, discussion_topics, and quizzes
tables. This commit also has a data fixup to backfill default values on
the boolean columns.

closes CNVS-34536

Test Plan:
* Do the following in a course with at least one closed grading period:
1. On the Assignments page, create an assignment with a due date in a
   closed grading period using the "+" button on an assignment group.
2. As a teacher, try to toggle the "Post to SIS" setting for the
   assignment from the Assignments page. Verify the setting changes.
3. Create a new assignment with a due date in a closed grading period
   using the "+Assignment" button.
4. As a teacher, try to toggle the post to SIS setting for the
   assignment from the Assignments page. Verify you can edit the
   setting as you toggle the button.

Change-Id: I7c799bb3b194363836d900287be90ca13805508e
Reviewed-on: https://gerrit.instructure.com/101315
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-02-22 18:17:59 +00:00
Neil Gupta 8edf09d694 add scores table
add scores table, which will hold the
computed_current_score and computed_final_score
which is currently stored on the enrollment
object. in addition, grading period scores will
be stored on the scores table.

closes CNVS-33573

Test plan:
* Create a course
* Make sure should total for all grading periods is enabled
* As a teacher, create an assignment that falls in a grading period
* As a student, submit something for that assignment
* As a teacher, grade that submission
* As a student, view your grades
* You should see the student's grade for both the grading period and
  all grading periods.
* Repeat this process for another assignment and make sure the total
  grades get updated for the student.

Basically, we want to smoke test test saving scores for an assignment
and re-calculating course grades with new scores. Everything should
behave the same as before.

Change-Id: Ib7241d55c0fa52e01441671f17f65675f8e10564
Reviewed-on: https://gerrit.instructure.com/96825
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2016-12-28 20:11:54 +00:00
Shahbaz Javeed 95283746ea prevent grading if submission is due in closed grading period
closes CNVS-32229
closes CNVS-32232

test plan:
* Create a course with MGP enabled and two grading periods in
  the default term
* Create two assignments for this course, one in a closed GP and
  one in an open GP
* To test overrides, create the following as well:
  * For one of the students, make the open assignment due in the
    closed grading period
  * For another student, make the closed assignment due in the
    open grading period

* Ensure the following steps work for all assignment/student
  combos due in a closed grading period.

** CNVS-32229 **
* Login as a teacher
* Go to speedgrader for the assignment in the closed GP
* Notice that the grade input is locked down
* Right click on the locked-down input and select 'Inspect'
* Remove the 'ui-state-disabled' class and remove
  readonly="readonly" from the input field's HTML
* Notice the input is no longer grayed out and you can enter
  a grade
* Enter a grade and tab out of the input
* You should see an error message that says something went wrong
  and notice in the Network tab of your dev tools that the AJAX
  post failed, meaning the submission was not gradeable
* Refresh the page and notice the grade is not there.
* Verify it isn't there in Gradebook either

* Login as an admin
* Go to speedgrader for the assignment in the closed GP
* Notice that the grade input is *not* locked down
* Enter a grade and tab out of the input
* You should *not* see an error message that says something went
  wrong meaning the submission was graded successfully
* Refresh the page and notice the grade is there.
* Verify it is also present in Gradebook

** CNVS-32232 **
* Login as a teacher
* Go into a gradebook that has an assignment that is
  locked down because it is in a closed grading period
* Notice that the grade cells for the assignment are locked
  down (because the submissions fall in a closed grading period)
* Right-click on one of the locked-down cells and select 'Inspect'
* Remove the 'grayed-out' and 'cannot_edit_in_closed_grading_period'
  classes
* Notice the cell is no longer grayed out and you can enter a grade.
* Enter a grade
* Click on another cell.
* You should see an error message that says something went wrong
  and in the Network tab of your dev tools verify the AJAX post
  failed, meaning the submission was not gradeable
* Refresh the page and notice the grade is not there

* Login as an admin
* Login as a teacher
* Go into a gradebook that has an assignment that is
  in a closed grading period
* Enter a grade in a cell that should be due in a closed grading
  period
* Click on another cell
* You should *not* see an error message that says something went
  wrong meaning the submission was graded successfully
* Refresh the page and notice the grade is there.
* Verify it is also present in Gradebook

Change-Id: Ia80e4de626616309c5e9dffb78ed0f9671ad1076
Reviewed-on: https://gerrit.instructure.com/95687
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2016-12-08 21:01:07 +00:00
James Williams 0777cba946 remove differentiated assignments feature checks
test plan:
* basic regression test of assignment overrides

closes #CNVS-27549

Change-Id: Ie463848b3831087efb3f9ec762dca6264055ee76
Reviewed-on: https://gerrit.instructure.com/73139
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-03-07 18:44:46 +00:00
James Williams 3e1481aa6e rails 4.2: s/destroy!/destroy_permanently!
destroy! is now a method in rails

refs #CNVS-26056

Change-Id: I66e512265ff5cda6a12d7820e3cf69c77ef9e746
Reviewed-on: https://gerrit.instructure.com/69721
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-07 14:00:13 +00:00
James Williams 600165e7b2 rails4: deprecate Relation#all in favor of Relation#to_a
refs #CNVS-21596

Change-Id: I5dedaab90a2abe6bf288ff30401c9b31629b45b2
Reviewed-on: https://gerrit.instructure.com/59220
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-24 21:28:14 +00:00
James Williams 00f8b93534 rails4: fix student_visibility_specs
refs #CNVS-21596

Change-Id: Ia834d5114a04e7c6bdd30196393d19a1a04d8286
Reviewed-on: https://gerrit.instructure.com/58087
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-13 15:25:48 +00:00
James Williams 417329b3b4 s/visibile/visible
lul

Change-Id: I303e168053ec058cdbf40acc6337b3d3404034ad
Reviewed-on: https://gerrit.instructure.com/58065
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-13 15:24:07 +00:00
Michael Nomitch c52094377f add adhoc to quiz sql view
fixes CNVS-18403

test plan:
  - quick regression test on DA for quizzes

Change-Id: I2c9521ce9fd22374cd192ca228967fa6ec50ade7
Reviewed-on: https://gerrit.instructure.com/48372
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-02-13 17:55:16 +00:00
Michael Nomitch 78571b40a5 DA - module evaluation efficiency
fixes CNVS-16367

test plan:
  - go to modules page and change stuff and save
    - things dont break
  - DA'd discussions/assignments/quizzes filter out
    of the modules page for students
  - the page for all student progressions works
    as it should

Change-Id: I8403e4c508169e7f3750f3ddc7494f4a4ed3f371
Reviewed-on: https://gerrit.instructure.com/43113
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-10-28 19:11:47 +00:00
Michael Nomitch 9ee36ade20 DA - remove draft state from tests
fixes CNVS-16186

test plan:
  - not needed :)

Change-Id: Id16b79f1511f806edfabfffa91a47c7a01f35642
Reviewed-on: https://gerrit.instructure.com/43334
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-10-27 22:11:13 +00:00
Michael Nomitch 5a03cf7f9b DA - students with quiz submissions can see show page
fixes CNVS-15783

test plan:
  - as a teacher make a DA'd quiz
    - as a student with an override and a grade,
      as a student with an override and no grade, and
      as a student without an override with a grade
      - the quiz is on the quiz index and assignment index,
        and the show page is normal
    - as a student without a grade or override, with a submission
      * note the submission grade must be nil (the gradebook is messed
      up so you may have to change it via the API)
      - the quiz is on neither the assignment index or quiz index
      - the quiz show page has a flash message telling you it doesnt count
    - as a student without a grade or override without a submission
      - the quiz is on neither the assignment index or quiz index
      - the quiz show page redirects you to the quizzes index
  - with DA off everything works as usual

Change-Id: I51e1e7efd1543e7bb6b858dfa04d7798a516c7c3
Reviewed-on: https://gerrit.instructure.com/41696
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-10-22 14:58:40 +00:00
Cody Cutrer 912a2cb083 rspec 3-ify spec/models
refs CNVS-16239

Change-Id: I0dc5ac9cb86fbb5dd0335d9e21d77d4a48ecb774
Reviewed-on: https://gerrit.instructure.com/42697
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2014-10-14 20:10:03 +00:00
Michael Nomitch 0a5e71d28e DA - quizzes
fixes CNVS-14094

test plan:
  - course with DA as students and teacher
    - api show & index
    - quizzes index page shows only assigned quizzes
    - quizzes show page url redirects to index if
      quiz isnt visible to user
    - grade calculation
    - gradebook/grades page
    - calendar events events
    - modules filter out quizzes correctly
    - observers see same things as their students
    - if a student takes a quiz and it is not graded and then
      loses visibility, make sure that the GB greys out the cell
      rather than showing a submission icon
  - same course with DA off works normally

Change-Id: I10b936f1516d6d24f11d74c0bb572051f0b1d1c4
Reviewed-on: https://gerrit.instructure.com/39897
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
2014-10-01 20:58:54 +00:00