Commit Graph

3867 Commits

Author SHA1 Message Date
Rob Orton 3e2314cd20 don't move files to the same spot just for fun
Change-Id: Ia96983a180a67d74f4c369c3a5639069f241c46f
Reviewed-on: https://gerrit.instructure.com/57027
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2015-06-23 17:44:59 +00:00
Ethan Vizitei 00ab03214a don't die when trying to report exceptional exits for job queue
Change-Id: Ifd940fab1090ce71eb2bc6fcffe5a660fe60f054
Reviewed-on: https://gerrit.instructure.com/56740
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-06-22 19:57:36 +00:00
James Williams 6633d5bf4a switch to master when queuing re-evaluation in module progressions
closes #CNVS-21355

Change-Id: I24fb0f075d426a41ff87d0a8b5105fbf95b12eee
Reviewed-on: https://gerrit.instructure.com/56922
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-06-22 16:52:33 +00:00
Michael Nomitch f9d7c51e0e quiz icon shows in GB and grading changes workflow_state
fixes CNVS-18086

test plan:
  - make a quiz with auto-graded and non-auto-graded
    questions
  - take it as a student
  - notice that in the GB there is an icon for
    this quiz
  - notice that on the student grades page there
    is an icon for this quiz with a tooltip explaining
    that there is grading to be done
    - this is the case as both the teacher and student
  - grade the quiz in the gradebook
    - the icon goes away in both places and fudge
      points are added to the quiz (check in speed
      grader)
  - repeat the setup above but grade it in speed grader
    instead
    - the icons also go away in this case

Change-Id: I51f497fe8b59b9785ef126eaac963a8f0a285891
Reviewed-on: https://gerrit.instructure.com/55803
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-06-22 15:05:53 +00:00
Ryan Taylor 8f59fa1dce Prevents funky errors when accessing quiz_data#compact
Closes CNVS-21228, GH-291, GH-512

Test Plan:
- Quizzes still work

Change-Id: I1b2131a8e0c8bd3e015597f0f756394217ee16b3
Reviewed-on: https://gerrit.instructure.com/56469
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-06-19 20:55:28 +00:00
Andrew Huff 5f1a56c2d9 fix automatic group grade propagation in gradebook
fixes CNVS-21299

Expected Behavior:
* Excusing an assignment (by typing "EX" in the student's grade cell)
    should only excuse the assignment for that single student
* Grading an assignment should immediately change all grades for every
    non-excused student in the group to the given grade

Also adds an error to Assignment#grade_student when you try to grade and
excuse an assignment simultaneously

Test plan:
1. Create a group assignment and do _not_ check "Assign Grades to Each
    Student Individually"
2. Create groups of students
3. Make sure that grading/excusing the students works as expected

Change-Id: I7239d1893af2256e001952802f876551b4284e1e
Reviewed-on: https://gerrit.instructure.com/56823
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Adrian Foong <afoong@instructure.com>
Product-Review: Andrew Huff <ahuff@instructure.com>
2015-06-19 19:37:10 +00:00
James Williams e183664cc6 bring up relock students prompt if unlock_at date added
test plan:
* create an active and published course
* create a module and publish it
* edit the module, adding an "Lock until a later date" date
* it should bring up the "relock modules" prompt

closes #CNVS-20723

Change-Id: I6e56fd94110f4a489f5db70f4d4f33499b6731cc
Reviewed-on: https://gerrit.instructure.com/56411
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-06-19 17:08:25 +00:00
James Williams 214f56c114 change external feed entry titles to text
closes #CNVS-17774

Change-Id: I558625ca4827c3dd572a40596b14459d2ae3310c
Reviewed-on: https://gerrit.instructure.com/56760
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-06-19 12:30:12 +00:00
Cameron Matheson d9001e963c preserve excused status when grading groups
This change prevents accidentally grading students who were excused on
a group assignment

Test plan:
  * make a group assignment
  * excuse one student
  * grade a different student
  * all students should be graded, except the excused student (who
    should still be excused)

Change-Id: I2f6fa33f839fcda220df3502dd9f271c762f8bbf
Reviewed-on: https://gerrit.instructure.com/56154
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Adrian Foong <afoong@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-06-18 18:50:47 +00:00
Derek Bender 160c169944 one grading period save button
closes CNVS-20238

this removes individual save/update buttons on the
grading periods page in favor of a single save button.
a title validation is also added to grading periods.

Change-Id: Id6fa4de38f8d9243a21ce5011f090e8782c5aec0
Also-By: Spencer Olson <solson@instructure.com>
Also-By: Strand McCutchen <smccutchen@instructure.com>
Reviewed-on: https://gerrit.instructure.com/55688
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Derek Bender <dbender@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2015-06-18 18:46:22 +00:00
James Williams 8e3fc3e418 don't try to resolve references to objects without migration_id
closes #CNVS-21238

Change-Id: I1520c8b83736681eaaf400fc1178ffa6a75d7a3c
Reviewed-on: https://gerrit.instructure.com/56556
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-06-18 14:40:28 +00:00
Alex Boyd 98ed7a5213 Only grant group permissions to users who can read the group's context
Fixes CNVS-19702

Test plan:
 - Create a course with a start date in the future
 - Add a student
 - Create a group set and group
 - Add the student to the group
 - As the student, visit the group directly (i.e.
   /groups/<group_id)
 - Verify that you get an unauthorized error
 - Regression test groups, ensuring that students in active
   courses are still allowed to do all of the things they
   should be able to do

Change-Id: I60ef5b938de1a965ffe987d96e2beb5db86f0759
Reviewed-on: https://gerrit.instructure.com/55251
Tested-by: Jenkins
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2015-06-17 19:39:13 +00:00
James Williams 5067afc590 improve performance of needs_grading_count in course_json
test plan:
* regression test 'needs_grading_count' includes in
 course index api calls

closes #CNVS-21156

Change-Id: Ic20704ec3704ed9e8230ad424cad2e5e92fccb68
Reviewed-on: https://gerrit.instructure.com/56465
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-06-17 19:38:43 +00:00
James Williams 58fdd31928 validate unique integration_id on course save
test plan:
* use the api to try to create a course with
 an integration id already in use by another
 course on the root account
* it should fail with a legible error (and
 not a database error)

closes #CNVS-21237

Change-Id: I69d352deb71168d93a621af9bbbba2d3706ac593
Reviewed-on: https://gerrit.instructure.com/56617
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-06-17 19:38:40 +00:00
James Williams 91646b65eb imported link refactoring
test plan:
* regression test links within copied content

* should also fix a pre-existing bug where
 links to content within assessment/quiz questions
 were not being copied

closes #CNVS-20890 #CNVS-20740

Change-Id: I1d1b89faba468690eaddaa1e29cd2936c807cc60
Reviewed-on: https://gerrit.instructure.com/55830
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-06-16 20:04:32 +00:00
Abhishek Singh aeed561106 Quiz submission creation event
Fixes CNVS-20996

Test Plan
 - Should create quiz submission creation event with
  quiz data and quiz version as event data
 - Should not create this event for quiz preview

Change-Id: Ie5d5b77338981ede4f0955fe0af2b80943167063
Reviewed-on: https://gerrit.instructure.com/56339
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-06-16 19:53:17 +00:00
Joel Hough 2d16320fb5 include test env in BBB recording ready url
fixes CNVS-21179

test plan
- switch to a test environment by changing your canvas url to
 include "beta"
- create a big blue button conference
- from the rails console, redirect logging to stdout so you can
 watch the api calls we make to BBB using:
Rails.logger = Logger.new(STDOUT)
- find the conference you just made and call initiate_conference
 on it. something like:
BigBlueButtonConference.last.initiate_conference
- inspect the log output for a big blue button api call creating
 the conference
- ensure that the meta_canvas-recording-ready-url param includes
 the test environment

Change-Id: I46296853c42174fce5fe63afc7618ba20b4cd53d
Reviewed-on: https://gerrit.instructure.com/56338
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2015-06-16 18:50:11 +00:00
Clay Diffrient 336f5192d5 Adds is_favorite include option for course list
Makes it so that if you include 'favorites' as part of the include
query parameter, it will include a is_favorite option on each
course to let you know if the user has favorited that course.

closes CNVS-19479

Test Plan:
  - Make sure you have one or two courses favorited.
  - Go to /api/v1/courses?include[]=favorites
  - The JSON result that comes back should include 'is_favorite'
    for each course.
  - Courses that have been favorited should have this value set
    to true otherwise they should be false.

Change-Id: Iba49bbc66839a03e66fe26ce3d475678ff4c4232
Reviewed-on: https://gerrit.instructure.com/56375
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-06-16 17:09:25 +00:00
Cody Cutrer e5e6c8b2ee avoid raw sql updates in several places
refs CNVS-20933

Change-Id: I0e742eecf103ee0bb984fb74a7efe649c7e27df5
Reviewed-on: https://gerrit.instructure.com/56368
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-06-16 16:14:48 +00:00
Ethan Vizitei 34775713f9 soft delete associated pseudonyms
closes CNVS-21178

makes sure that we aren't showing users their pseudonyms for
delted authentication providers.

TEST PLAN:
1) create an authentication provider for facebook (For example)
2) get a pseudonym associated with it for a user
3) delete the AAC for facebook
4) confirm you no longer see that pseudonym in /users/self

Change-Id: Idf693b9d3cba616146df87a40c016c2356651806
Reviewed-on: https://gerrit.instructure.com/56530
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-06-16 15:49:31 +00:00
Dan Minkevitch 64217dd9be NC "OR" Module Progression Backend
closes CNVS-20896

Change-Id: If6ba751d14f49584205a712a0de7f9c9eb15eada
Reviewed-on: https://gerrit.instructure.com/55930
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-06-15 23:05:51 +00:00
John Corrigan 9d9dc21006 assessment assessor is always visible if is teacher
fixes CNVS-20675

The anonymity rules need not apply if the rubric assessment is being
used for grading, as opposed to for a peer review.

test plan:
- as a teacher, create an assignment with anonymous peer reviews, and
  assign one student (the reviewer) to assess another (the reviewed).
  (Make sure the assignemtn has a rubric associated with it as well.)
- as the reviewed, complete the assignment.
- as the reviewer, complete the peer review by using the rubric to create
  an assessment.
- as the teacher, grade the assignment, and use the rubric to create an
  assessment.
- as the reviewed, navigate to the submission details, and click the
  button in the upper right hand corner to 'show rubric'.
- observe that in the dropdown you see the teacher's name for the rubric
  assessment the teacher completed, and you see 'Anonymous User' for the
  rubric assessment the reviewer created.

Change-Id: I2614579d420aa7f40c8d0f9d7feb24ba39266ad8
Reviewed-on: https://gerrit.instructure.com/56367
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-06-15 19:10:35 +00:00
Cody Cutrer 936ef6e889 avoid unnecessary drop to raw SQL
Change-Id: I4cc28cdcb5be1c8abf420f3ca3d8e02b05ce0499
Reviewed-on: https://gerrit.instructure.com/56357
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-06-15 16:11:41 +00:00
Ethan Vizitei f7401feb8f Soft delete accont authorization configs
closes CNVS-20947

Allow users to "delete" auth configs without
violating foreign key constraints.
Also means updating all places that use the
association interface to a new method
that strips out inactive AACs

TEST PLAN:
 1) create a new AAC with the IDP of your choice
 2) create some pseudonyms that are attached to the new AAC
 3) try to delete the AAC from the authorization config area
 4) it should not blow up

Change-Id: Iff56fd8aa2ee66a2468191a9c880a99862d83927
Reviewed-on: https://gerrit.instructure.com/55808
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-06-12 20:10:28 +00:00
Jonathan Featherstone 35688f6f2a Added Grade passback LTI UI
Added necessary UI code to allow LTI based grade passback.
UI allows for side-by-side launch of powerschool app
as well as LTI based. LTI based tools are launched within an iframe
in a new dialog.

Test Plan
  * configure powerschool grade posting by enabling sis feature flag
    * /accounts/:id/settings
      * "post grades to sis" -> on
    * /courses/:id/settings
      * SIS ID -> random number
  * add an assignment, make sure that "post grades to sis" is checked
  * navigate to gradebook, verify that "post grades" button is visible
  * verify that "post grades" button is not visible when no
    assignments are present
  * click on button and verify that current powerschool modal launches
  * add sisapp lti launch
    * get local sisapp running
    * /accounts/1/settings/configurations
    * add app, by url http://<local sisapp>/post_grades/config.xml
  * navigate to gradebook, verify that both powerschool post and new lti
    post are available in drop down menu
  * test for #successability

  Additional considerations:
  Drop down menu supports up to 10 post grades configurations. Add
  multiple sisapp endpoint to view ellipsis record indicating that no
  more configurations will be displayed

closes CNVS-20529

Change-Id: I988eb55555027903b6dab0692ce8514569a81345
Reviewed-on: https://gerrit.instructure.com/55384
Tested-by: Jenkins
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
Product-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
2015-06-12 19:07:37 +00:00
Cody Cutrer 8a19951591 remove deprecated method
Change-Id: I38a28e20b8f2cc3d4cc58837cc80a8d4e50e338a
Reviewed-on: https://gerrit.instructure.com/56173
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-06-12 16:15:14 +00:00
Michael Nomitch cc4a9fb949 quiz question types works with groups
fixes CNVS-20948

test plan:
  - make a quiz with multiple questions
    and a quiz group with questions of
    different types in it
  - ping the API endpoint for this quiz
    "api/v1/courses/:id/quizzes/:id"
  - the question_types array contains
    the types from the quiz group
    and the types of the non-nested
    questions

Change-Id: I647499707fa024a19fac564688653db3c9f9e4c7
Reviewed-on: https://gerrit.instructure.com/55993
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-06-12 05:36:06 +00:00
Cody Cutrer 004617a433 resolve ties in quiz statistics by moving them up a bucket
instead of undeterministically splitting the ties apart in different
buckets. this also fixes a fragile spec

Change-Id: Ia07c0bc7f1f1e56cc9d04d2d003d7012b499cb57
Reviewed-on: https://gerrit.instructure.com/56278
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-06-11 23:18:39 +00:00
Ethan Vizitei 4fb4c84cdc don't let course notifications bomb with no prior_version
closes CNVS-21124

Course notifications for catalog were not getting sent out.
Upon sending them manually to debug, we found that courses with
no "prior_version" were throwing an exception from the predicate
block that evaluates whether to send the new_course notification.

This bombs the whole job (catalog sends notifications once an hour,
and a single exception stops the job from running).

This is not usually a problem when sending notifications in a save
cycle, but these records are being loaded and broacasted with no
save, which is why they break in this case.

TEST PLAN:
 1) load a course from the database but don't save it
 2) call "broadcast_notifications"
 3) it should not throw an exception

Change-Id: Ia9a07080b5b54e4f732fb51722a678650cce3b76
Reviewed-on: https://gerrit.instructure.com/56186
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Product-Review: Bryan Petty <bpetty@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2015-06-11 20:00:46 +00:00
Abhishek Singh e6d25a1b68 Removed delete dependency between quiz_submissions and quiz_submission events.
Fixes CNVS-20994

Test Plan
 - Deleting any quiz submission should not delete its events.

Change-Id: I1b8d80db8d62da753de3d7568495e7dac17b1ca9
Reviewed-on: https://gerrit.instructure.com/56018
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Ryan Taylor <rtaylor@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-06-11 19:37:25 +00:00
Tyson Brown d71945faad Register Parents and Add Observees when configured for SAML
authentication

Fixes PFS-1084

Parent Registration:
When a Saml config is designated for Parent Registration the parent
signing up will be redirected to a Saml login page where they will log
in with their child's credentials.  After login the child user's
Saml session will be ended and the parent registration process will complete.

Parent Adding Student:
When a Saml config is designated for Parent Registration the parent
adding another observee will be redirected to a Saml login page
where they will log in with their child's credentials.  After login the child user's
Saml session will be ended and the observee creation process
will complete.

---------------------------------------
TEST PLAN:
SETUP:
1) In your account settings check the box for 'Self Registration' (and
either of the sub-options)

2) Add the following users to your account (these will be the students):
billyjoel
eltonjohn

3) In Authentication Settings add a SAML authentication service
and enter the following fields (I've set up a remote SAML Idp):

IdP Entity ID:  http://107.170.212.143/saml2/idp/metadata.php
Log On URL:  http://107.170.212.143/simplesaml/saml2/idp/SSOService.php
Log Out URL:
http://107.170.212.143/simplesaml/saml2/idp/SingleLogoutService.php
Certificate Fingerprint:
9C:11:68:93:95:CD:18:01:EC:52:2B:9E:22:7F:73:55:ED:6D:82:D4
Parent Registration:  check

TEST:
Parent Registration:
* Go to '/login/canvas'
* Click on the signup banner
* sign up as a parent for billyjoel or eltonjohn
  (on SAML login page the password for either user is: tantrum)

Add Student:
* Log in as a parent user w/ a Canvas Auth login
* Go to '/profile/observees'
* Add Student 'billyjoel' or 'eltonjohn'

Authentication Settings (new parent reg checkbox):
* Go to Authentication Settings
* Add a second SAML config
* check the parent registration checkbox
  - it should warn that selection will deselect the other
    and in fact do so upon save.
  - the selected config is the one used for
    parent reg/add student
---------------------------------------

Change-Id: Ief83b604fc252c88dbb912c56de65d8620fe802f
Reviewed-on: https://gerrit.instructure.com/49691
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-06-11 15:25:19 +00:00
Cody Cutrer 5d7d31eebf fix some boot up issues when the db isn't set up yet
with spring and preloading, this code can be hit before the db exists

Change-Id: I0f0efbb96ba5cbc0c2461a84ab823a14dbb38f74
Reviewed-on: https://gerrit.instructure.com/55942
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-06-11 15:16:38 +00:00
Colleen Palmer e8dd470a72 Dashboard Cards Dashboard
fixes CNVS-20119; fixes CNVS-20139; fixes CNVS-20140;
fixes CNVS-20424; fixes CNVS-20426

This adds a new Dashboard view when using New UI.

Note: This is for New UI only. Legacy UI should only show Recent Activity on
dashboard (as it always has).

Test Plan:

- Login and make sure new UI is on
- Go to / and see the new Dashcard view.
It should look similar to: http://cl.ly/image/2R2K28183h2G

- Switch to "Recent Activity" by using the toggle
It should look similar to: http://cl.ly/image/2l1V1h421b0d

- Dashboard Cards have quick links on the bottom to quickly let you
navigate to within a course. These include:

- Discussions (if available)
- Announcements (if available)
- Files (if available)
- Assignments (if available)

If activity has happened in Announcements, Assignments or Discussions, an
active state is given to the quick link that makes it look like this:

http://cl.ly/image/1d3Y0T3w1Q01

Change-Id: Ia07f7f2711d6e0625d26d7ea5d050ccb51dc0128
Reviewed-on: https://gerrit.instructure.com/53043
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins
QA-Review: Adam Stone <astone@instructure.com>
2015-06-10 22:55:43 +00:00
Derek Bender 81feabdfbf validate grading period do not overlap dates
Grading Periods previously could overlap in arbitrary ways.
This adds a server side validation to ensure that when a Grading
Period is persisted it will not overlap with existing Grading
Periods in the same Grading Period Group. Grading Periods in
different groups are not validated in this way. The front end will
report errors if attempting to save a grading period that overlaps.

Our definition of overlapping is any two grading periods
intersecting each other except if the end date of an earlier
grading period is equal to the start date of a later grading period

These two grading periods would be considered overlapping
(when in the same group):

  GradingPeriod.new(
    start_date: 0.months.ago,      end_date: 2.months.from_now
  )
  GradingPeriod.new(
    start_date: 1.months.from_now, end_date: 3.months.from_now
  )

These two grading periods do *NOT* overlap, even thought the
end_date of the first is the same as the start date of the
second (again, these would need to be in the same group):

  GradingPeriod.new(
    start_date: 0.months.from_now, end_date: 2.months.from_now
  )
  GradingPeriod.new(
    start_date: 2.months.from_now, end_date: 3.months.from_now
  )

Fixes CNVS-19858

Change-Id: I0c901fa35f3225186948bbd8d61ef368cd15c939
Reviewed-on: https://gerrit.instructure.com/53953
Tested-by: Jenkins
Reviewed-by: Dylan Ross <dross@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Derek Bender <dbender@instructure.com>
2015-06-10 20:55:43 +00:00
Cameron Matheson 7a4c59f61b fix speedgrader group representative selection
students with unexcused submissions weren't always being preferred,
making a spec fail often

Test plan:
  * setup a group assignment
  * excuse the assignment for all-but-one members of each group
  * when you load the speedgrader, the assignment should display as not
  * excused

Change-Id: If08d8e009813c47e71d33951947eb8d509741189
Reviewed-on: https://gerrit.instructure.com/56100
Tested-by: Jenkins
Reviewed-by: Cody Poll <cpoll@instructure.com>
Reviewed-by: Derek Bender <dbender@instructure.com>
QA-Review: Adrian Foong <afoong@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-06-10 17:39:49 +00:00
Cody Cutrer a80c26e7a5 fix rails-level validation of namespaced pseudonyms
Change-Id: I15956cc8191284594ac5236aeb0b1b4a3616b084
Reviewed-on: https://gerrit.instructure.com/55941
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-06-09 19:53:11 +00:00
Brian Finney 232e2dcb8d refactor overdue_and_needs_submission and needs_grading?
Change-Id: I2e8c424545b71be8136d04008433ff42eb96bc4d
Reviewed-on: https://gerrit.instructure.com/55831
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Brian Finney <bfinney@instructure.com>
2015-06-09 00:22:27 +00:00
Cameron Matheson ce51b1c9c2 make gb.csv names match web gradebook
closes CNVS-5620

Test plan:
  The display/sort order of gradebook.csv should match the web gradebook

Change-Id: I87fa21fd2e8c758dc74a1dab9e0f3208026fb0a3
Reviewed-on: https://gerrit.instructure.com/55325
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Adrian Foong <afoong@instructure.com>
2015-06-08 23:25:38 +00:00
Cameron Matheson 90732b88ee default to course grading scheme for new assignments
closes CNVS-15228

Test plan:
  * set a course-level grading scheme
  * make sure that new letter-graded assignments use that grading
    scheme (rather than the default canvas scheme)

Change-Id: I78f256a74a5dc0b3346a1b8267ee26e27a5ad652
Reviewed-on: https://gerrit.instructure.com/55779
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Adrian Foong <afoong@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-06-08 20:48:09 +00:00
Cody Cutrer 3fb95a2b53 use prepend for AAC plugin settings
it's much cleaner, but requires ruby 2.1

Change-Id: I598adbe83269752cd83d9edfb5b99d2214540249
Reviewed-on: https://gerrit.instructure.com/54863
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-06-08 20:45:37 +00:00
Michael Nomitch ea246c32d5 allow students to see answers after final attempt
fixes CNVS-19091

test plan:
  - make a quiz where correct answers are visible
    after a final attempt and give them two attempts
    - include some questions that require manual
      grading and some that do not
  - as a student submit two attempts
  - note that you do NOT get an error saying
    'Answers will be shown after your last attempt'
    once you have submitted your second attempt

Change-Id: I4ed1c7c775ef730afb963ed1d15f844e2244602f
Reviewed-on: https://gerrit.instructure.com/55480
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-06-08 19:49:51 +00:00
Cody Cutrer d21c2dc92e allow choosing other login attributes for oauth providers
closes CNVS-20912

test plan:
 * change the login attribute
 * ensure the error message you get when it can't find your login
   shows the value you expect

Change-Id: I8fbad8c4df5f2dc5b01cf43d5d6c43ab7be97972
Reviewed-on: https://gerrit.instructure.com/55665
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-06-05 21:35:55 +00:00
Abhishek Singh c032ada325 Needs Grading on quiz submission list API
Fixes CNVS-19664
Modified list quiz submissions API to check for all submissions which
needs grading and trigger a delayed grading job. Also added a new
field 'overdue_and_needs_submission' to the returned JSON.

Test Plan
- Check the overdue_and_needs_submission field for ongoing test. It should be false.
- Check the overdue_and_needs_submission field for test which is overdue but workflow state is still untaken.
  It should be true and a delayed job to grade that quiz should be triggered.
- Check if the overdue quiz is graded and workflow state is changed to complete and
  overdue_and_needs_submission is changed to false.
- Check the above scenarios with teacher role and student role.

Change-Id: I420ade5b6b2d522aa79d1f13f865ce0e1169aae0
Reviewed-on: https://gerrit.instructure.com/55269
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Abhishek Kumar Singh <asingh@instructure.com>
2015-06-05 19:54:55 +00:00
Cody Cutrer 634ecf362b fix rake db:initial_setup
Change-Id: Ic4bba6d6efc2f78826444e32d906f17a0c140769
Reviewed-on: https://gerrit.instructure.com/55802
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-06-05 19:53:28 +00:00
Cameron Matheson b96ad90b23 don't include deleted groups in Assignment#representatives
fixes CNVS-19549

Change-Id: I3ab7ed3f1d8262b0187b6545da888d1f0046c7e0
Reviewed-on: https://gerrit.instructure.com/53531
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Adrian Foong <afoong@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-06-05 19:41:47 +00:00
Cameron Matheson 743005c661 speedgrader: excuse an assignment support
closes CNVS-20962

Test plan:
  excuse assignments in speedgrader with the usual "EX" thing

Change-Id: If206adc3956950a28433df6a199d5dc4e590b803
Reviewed-on: https://gerrit.instructure.com/55569
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Adrian Foong <afoong@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-06-05 18:40:12 +00:00
Ethan Vizitei 73ec7effc4 Add "Login with X" buttons
closes CNVS-19458
closes CNVS-19542
closes CNVS-19543
closes CNVS-19462
closes CNVS-20954

Add a "login with X" buttons that only displays
if the account has configured OAuth.  The button
just goes straight to the login flow.  Also tries to do it
in an abstract enough way that other OAuth providers will be easy
to add buttons.

Also add icons to pseudonyms so that you can tell which is which
from "/users/self"

TEST PLAN:
 1) configure a facebook AAC (and probably do these for each oauth
provider)
 2) visit /login/canvas
 3) click the AAC-specific vendor login button
 4) complete the AAC-specific vendor login flow
 5) go look at "/users/self" and make sure you can identify your
   oauth pseudonym

Change-Id: Ie5e085cd65512286858cf5be5caffd4e7431a6c7
Reviewed-on: https://gerrit.instructure.com/55172
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-06-05 16:59:47 +00:00
Cody Cutrer ad4baa0387 don't use subquery for courses API on root accounts
really, anywhere we use #associated_courses on a root account,
substitute the simpler all_courses

refs CNVS-20414

Change-Id: Ife41259e42c9fcce3150552cb2ff43d6ddbfcdde
Reviewed-on: https://gerrit.instructure.com/54010
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-06-05 16:05:34 +00:00
Ethan Vizitei ff056664b2 namespace pseudonyms by authentication provider
closes CNVS-19452

 * add the column and foreign key, uniquely index it,
   and replace the old unique index to make sure it's null
 * change lookup of pseudonyms on log in. CAS/SAML/LDAP
   look for matching or non-namespaced pseudonyms. OAuth
   looks only for matching.
 * update API for creating/exposing the provider info
 * update canvas_authentication modulation so it's only forced to true
   when deleting the LAST aac

test plan:
 * create a pseudonym for a specific provider (via the API)
 * ensure that even it matches for another provider, it's
   not found when you try to log in
 * check a CAS login will find a pseudonym with no provider,
   or the correct one
 * check that a OAuth login won't find a pseudonym not
   associated with any provider
 * finally, check that a OAuth login _will_ work with a
   matching pseudonym

Change-Id: I5d9ef8a992c6e0f6e1d8e13e4fb87d25304d982e
Reviewed-on: https://gerrit.instructure.com/55117
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-06-05 15:45:55 +00:00
Cody Cutrer c1344edb1d account authorization configs cleanups
* get rid of has_one
 * get rid of several methods on account that are unused or trivially
   replaced

Change-Id: I5a4f1e342b2bd465a240bbe701c2ab883b1f3878
Reviewed-on: https://gerrit.instructure.com/55240
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-06-05 15:45:47 +00:00