Commit Graph

12926 Commits

Author SHA1 Message Date
James Williams e6de145236 validate locale only when changed
fixes errors caused by trying to save an object with a locale
that no longer exists

fixes #CNVS-16331

Change-Id: Iea28d40050f3eabcb6433592db1a5086074c9dd6
Reviewed-on: https://gerrit.instructure.com/43142
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-10-24 15:45:16 +00:00
James Williams 690df87048 only set assignment quizzes to unpublished if assignment is missing
Change-Id: Ifd829b9a7975d2cdda7f74d1e677a842aeff54ef
Reviewed-on: https://gerrit.instructure.com/43222
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-10-24 14:26:36 +00:00
Matt Wheeler 130943707a Stream item api supports Assessment Requests
Fixes CNVS-16147

We simply neglected to support assessment requests
in the stream item api when we added assessment
requests to the stream items.

Test Plan:
1)  As an instructor, create a course with at least
	two students and an assignment, with peer reviews enabled.
	(Enable peer reviews under the assignment edit screen.)
2)  From the assignment show page, click 'peer reviews'
	in the right-hand nav under "Related Items"
3)  Assign a peer review for student A to student B.
4)  Hit the stream item api endpoint for student B
	and verify the data looks correct and the api
	doesn't error out. To do this, masquerade as that
	user, then in your browser hit
	`http://localhost:3000/api/v1/users/self/activity_stream.json`

	response should look like this:
	   while(1);
	  [{"created_at":"2014-10-10T21:09:30Z",
	  "updated_at":"2014-10-10T21:09:31Z",
	  "id":11,"title":"Peer Review for Bar Homework",
	  "message":null,
	  "type":"AssessmentRequest",
	  "read_state":true,
	  "context_type":"Course",
	  "course_id":1,
	  "html_url":"http://localhost:3000/courses/1/assignments/2/submissions/3"}]

Change-Id: Id097ca434783ffa741b4fad1faaf38087a1c384a
Reviewed-on: https://gerrit.instructure.com/42681
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
2014-10-24 14:14:48 +00:00
Transifreq 1e69a5b9ec Updated zh_Hant translation
Change-Id: If04e08a3d326e031f80aeb57d7f80c544dd4f657
2014-10-24 05:25:09 -06:00
Ahmad Amireh e026c7ad4d CQS: Feature Flag & Ember quizzes purging
- The "New Quiz Statistics" feature flag now converts the regular
  statistics page into the new one that uses the React/CQS client app
- All Ember quizzes code gone
- canvas_ember_urls gem gone
- quiz_moderate feature flag gone
- quiz_stats feature flag is now allowed in prod
- statistics_cqs explicit/hidden route gone, but the statistics_cqs ERB
  and coffee bundle are still there to help ease the transition later

Closes CNVS-16330

TEST PLAN
---- ----

  - go to /courses/:course_id/quizzes/:quiz_id/statistics
    + verify you get the old/regular stats page
  - enable the "New Quiz Statistics" feature flag
    + refresh that page, verify you see the new app

Now turn the flag on and off and play around the quizzes pages, verify
everything looks OK.

Change-Id: I01fc5da80fd206df08338823ffb446a1e3a06ed0
Reviewed-on: https://gerrit.instructure.com/42965
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-10-24 08:47:55 +00:00
Joel Hough 6aa1ccfc2a submission comments in the inbox
fixes CNVS-15693
fixes CNVS-15694

test plan
- regression test conversations
- test submission comments in the inbox

Change-Id: I0da5cea276f6d03ac08aab51143fe13d40503ee7
Reviewed-on: https://gerrit.instructure.com/42063
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-10-24 00:51:36 +00:00
Simon Williams e3a29be60c handle percent assignment with nil points possible
fixes CNVS-16374

test plan:
- create a percent grading assignment and leave the points possible field blank
- give someone a grade
- it should work (although it will just turn your grade directly into
  a percentage, since mathematically this doesn't make sense)

Change-Id: I48cfbf8ee2be113f3995aa91461a77b062485cdf
Reviewed-on: https://gerrit.instructure.com/43137
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-10-23 23:40:05 +00:00
Jon Jensen 9b19b077bb fix submission deadlocks, fixes CNVS-15988
this removes our db triggers and instead uses AR callbacks in conjunction
with after_transaction_commit. this way we won't get processes fighting
over the same assigments tuple.

note that we can't actually remove the hairtrigger gem until we clean up/
remove all those old migrations :-/

test plan:
1. tests should pass (and cover 2. and 3.), but just to be sure...
2. ensure that "assignments needing grading" counts work as expected
3. ensure that quizzes w/ essays don't show as graded in the speedgrader
   until the essays have been graded

Change-Id: I6af67605b18378bd3c181c710ba5027ec944394b
Reviewed-on: https://gerrit.instructure.com/43202
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2014-10-23 23:09:52 +00:00
Brad Horrocks 932f546e7f extend lazy list to set dataType option for requests
Comparisons to ENV.current_user_id (string) to users[0].id (int)
were failing. I made the api return string ids so it would all work
properly

Fixes CNVS-15484

Test Plan:

Setup -
1. Have a test course with 5 or so students and a teacher.
2. Log into test course as teacher.
3. [People]
4. [+ Group Set]
5. Give name, check 'allow self sign-up', create '3' groups now
6. Assign students to each group.

1. Log in as a student that is assigned to a group.
2. Go to test course.
3. [People]
4. [Groups]
5. "Leave" and "Switch To" should be displayed rather than join

Change-Id: I7129ae49ad3cd6e2871b5f0bc8d92db533a710b3
Reviewed-on: https://gerrit.instructure.com/43126
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Alex Boyd <aboyd@instructure.com>
Reviewed-by: Braden Anderson <braden@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
2014-10-23 22:11:59 +00:00
Joel Hough 6de539100b make notification preference buttons always screenreader accessible
fixes CNVS-14758

test plan
- ensure that buttons for all frequencies on the notification
 preference settings page are screenreader accessible

Change-Id: I4ae1651d8d9b7b702fce2b9226b5cb1f49e06403
Reviewed-on: https://gerrit.instructure.com/43186
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-10-23 21:43:40 +00:00
Simon Williams 00698fc898 only flash 401 errors in prod if they are unauthenticated
fixes CNVS-15975

test plan:
- hit a page with an ajax action that is unauthorized: (for example, right now
  there is a bug that causes this if you set the course homepage to be the
  assignment index page and then visit it as a user who has a student enrollment
  in a different class)
- it should show a 'development only' flash error in a development environment,
  and not show any flash error in a production environment
- also retest commit e45ff7189aee3edefb62de8f087bb6b871b2d1a9:
  * in one tab, start to fill out an ajax form
    (e.g. editing a quiz)
  * in another tab, log out of canvas
  * return to the original tab and try to
    submit the form (e.g. save your changes)
  * should get an error message with a link to
    login in a new tab
  * login in the new tab
  * return to the original, and try to resubmit
  * should save successfully

Change-Id: I2fc4c1d46b3ba510336957e4e93875d58677583e
Reviewed-on: https://gerrit.instructure.com/43189
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-10-23 21:30:14 +00:00
Cody Cutrer 0b015901fb bump authlogic for official rails4 support
Change-Id: I41bb4316c2336496194a994cc1cc62b2a5c94787
Reviewed-on: https://gerrit.instructure.com/42325
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Paul Hinze <paulh@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-10-23 21:24:26 +00:00
Cody Cutrer e79632e8a6 ensure ExternalFeedAggregator doesn't choke through pgbouncer
refs CNVS-15875

Change-Id: I2ac0b7ddf350b08486ad0ea4cf03e3715cc1f39a
Reviewed-on: https://gerrit.instructure.com/43182
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-10-23 21:22:03 +00:00
Cody Cutrer 6b137bb405 fix Shard.in_region scope for non-region-tagged-default-db
Change-Id: Ia1e7c97ac2b5f06f2c24feba9fa42302e659821b
Reviewed-on: https://gerrit.instructure.com/43238
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-10-23 21:21:27 +00:00
Simon Williams a7c5481d4d turnitin: don't explode if submission_type has changed before job runs
fixes CNVS-16377

test plan:
- enable turnitin
- create an assignment that accepts uploads or urls
- first submit an upload that is turnitinable (like a word doc)
- then, quickly resubmit a URL
- the submit_to_turnitin job should not be listed in the failed jobs list

Change-Id: I2d4fd2f2f94e65c7f6086c338f6dbe8e64203c12
Reviewed-on: https://gerrit.instructure.com/43140
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-10-23 21:03:06 +00:00
Cody Cutrer a190fe6786 bump switchman
also change not_ended_enrollments to be a multishard association,
since the preloader now respects the shard of the owner

test plan:
 * enroll an out-of-shard user in a course
 * do GET /api/v1/courses/:course_id/users?include[]=enrollments
 * it should include the enrollment for the out-of-shard user

Change-Id: If45f047fd12c15364076cfa7a1d3780e795e996f
Reviewed-on: https://gerrit.instructure.com/43167
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-10-23 20:41:35 +00:00
Matt Wheeler d0a342f654 Don't include soft deleted groups in search filter
Fixes CNVS-16369

Test Plan:

1) Create a large dataset locally. One way from a rails console:

```
c = Course.last

(1..6).each do |n|
	gc = GroupCategory.create!(context: c, name: "Name#{n}")
	(1..200).each do |m|
	  Group.create!(name: "Name#{m}", group_category: gc, context: c)
	end
end

GroupCategory.last(4).map(&:destroy)
```

2) On Master, see that the load time for the course users page (everyone tab) is long. 14 seconds in my case.
3) On this branch, see that the load time is much much shorter, 6 seconds in my case.



Change-Id: Ic68ef085e56a69b972cdb8069bc15cda4bd2c112
Reviewed-on: https://gerrit.instructure.com/43163
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
2014-10-23 19:33:15 +00:00
Cody Cutrer c23f0fe632 add region to cache keys that depend on region
it shouldn't matter, but protects against server misconfiguration

Change-Id: Ic8da4caa9b99e82fa73c4a6e18b1599998da29cd
Reviewed-on: https://gerrit.instructure.com/43224
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-10-23 19:24:49 +00:00
Jeremy Stanley f80696b451 fix file preview for hidden and nonexistent files
test plan:
 1. enable "better file browsing"
 2. go to the files page
 3. click the cloud icon next to a file, select "Restricted Access",
    and then "Only available to students with link".
 4. as a teacher, attempt to preview the file. you should see the
    file, not a not-found error.
 5. attempt to preview a nonexistent file by going to the URL
    /courses/X/files/Y/file_preview
    (where X is a *valid* course ID and Y is an *invalid* file id).
    you should see an error message without Canvas chrome
    (no header or left-side menu)

fixes CNVS-16394

Change-Id: I9c632d664e9fd8758dc63b21e6751a914f4a4ceb
Reviewed-on: https://gerrit.instructure.com/43175
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2014-10-23 19:00:59 +00:00
Ryan Taylor 2af63ddd94 Hides Quiz icons in gradebook/grade summary until DB is ready
The quiz icons are hidden away until the appropriate features are out to
allow for monitoring of gradebook/speedgrader edits to quiz scores which
are pending review because of their question types.

Closes CNVS-16399

Change-Id: I689f1dcc94a647a32fe619b215f6b641a8376f84
Reviewed-on: https://gerrit.instructure.com/43180
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2014-10-23 17:55:50 +00:00
Sean Lewis 58c5499344 spec: rid assignment group spec of non DS tests
assignments_group_spec.rb is still testing non Draft State
cases. This commit will purge it of all non-DS tests
and refactor those tests to test in Draft State.

Change-Id: I07998249c0172d8569ccd46d4cff8391a570e71c
Reviewed-on: https://gerrit.instructure.com/43188
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-10-23 17:55:01 +00:00
Ahmad Amireh 6df57b0a11 Respect course soft conclusion date for quiz subs
Submissions will no longer be creatable if the course has been deemed
concluded (softly; in the sense that its `end_at` overrides the term's
`end_at`, or its term has ended).

In this scenario, we now display a message to students (and teachers):

  "This quiz is no longer available as the course had been concluded."

Closes CNVS-15934

TEST PLAN
---- ----

  - create a course and open its settings page
  - set an end date to sometime in the past
    + do NOT check the option "Users can only participate in the course
      between these dates" yet
  - create a quiz in that course, with like a single question and
    unlimited attempts, and then publish it
  - in another tab as a student, go to the quiz take page, and take it
    once, hand it in, then stay on that page where you can see "Take
    this Quiz Again"
  - now in the teacher tab, edit the course settings and turn that
    option on, save
  - go back to the student tab, do not refrehs, just click that button
    for taking the quiz... and:
    + verify you are redirected back to the same page (e.g, not taken to
      the take quiz page)
    + verify no new attempts have been registered
    + verify you now see the alert message in a red box
  - turn that option back off, refresh the page:
    + you should be able to re-take the quiz
  - try on and off, see if you can get anything funny going on

Change-Id: I83a373258cc7e615c98e416ef7d630fa9ccb7331
Reviewed-on: https://gerrit.instructure.com/43204
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-10-23 17:32:33 +00:00
Ahmad Amireh 657f9d14ef Non-null constraints for quiz_submission_events
Closes CNVS-16408

TEST PLAN
---- ----

N/A

Change-Id: I798cda1bd10fd4bc7c19253bbaefd7927efe56c0
Reviewed-on: https://gerrit.instructure.com/43205
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Derek DeVries <ddevries@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-10-23 16:28:06 +00:00
Ben Young 6d5e5b1ee5 Only change the course code using the course name if the code is nil or empty
Fixes CNVS-6235

Test plan:
- Create a course, giving a value to both the name and code.
- Update the name of the course.  The code should not change.
- Set the code to nil or empty.
- Upon saving, the code should be regenerated based on the course name.

Change-Id: Ib3c2f355c9f9cd512c54c111ee958569370d51c1
Reviewed-on: https://gerrit.instructure.com/43060
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-10-23 15:50:59 +00:00
James Williams 2e5b71df2b restrict admin enrollments on explicit term setting
test plan:
* create a course with a teacher/ta/designer enrollment
* using the "Terms" link on the account navigation sidebar,
 set a term start date in the future, but leave the term dates for
 teachers/ta's/designers blank

* the UI should correctly state that teachers/ta's/designers
 can access before the term start
* a teacher/ta/designer should be able to access the course

* override the default term limits for the teacher/ta/designer
 to explicitly restrict their access until a future date
* they should not be able to access the course now

closes #CNVS-9681

Change-Id: Icec6bc24b2a199bf7aae541573590c1dd71fbd49
Reviewed-on: https://gerrit.instructure.com/42413
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-10-23 15:46:21 +00:00
tdehaan 8bb977155b spec: adds student quizzes with draft state spec
TEST PLAN
- run specs

Change-Id: Iab1fea8aef419e074012f94426531bc35013be79
Reviewed-on: https://gerrit.instructure.com/43124
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Finney <bfinney@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2014-10-23 15:43:19 +00:00
James Williams 7019733ebb fix question bank de-duping on import
test plan:
* create a course with two question banks with
 the same name, each containing at least one question
* create a quiz with quiz groups that pick from the
 question banks
* copy the course
* should retain two separate question banks, and retain
the quiz groups
* the questions (and number of them) for each bank should
remain the same as the original course

closes #CNVS-14780

Change-Id: I8ed819220021cf965e3ca90206c7096e5bde717c
Reviewed-on: https://gerrit.instructure.com/42392
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-10-23 15:20:11 +00:00
Transifreq 40b885cacb Updated tr translation
Change-Id: I4eaf41960b5ada5a3b58f9461fc6dc51a0cf57d9
2014-10-23 05:22:55 -06:00
Simon Williams 77b0ad574c bump switchman to 1.2.20
fixes CNVS-14894

this fixes a problem finding shadow objects through has_through associations,
and also makes a tweak for matching global ids to try to better support 32 bit
architectures.

test plan:
- set up a course on a sharded account
- create one student in the site admin account and one in the new shard account
- enroll them both in the course
- create a Peer Review Assignment in the courses
- assign them to each peer review the other
- it should work

Change-Id: I8614791d145d11ef8ab5666234e2e7443f71f065
Reviewed-on: https://gerrit.instructure.com/42975
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-10-22 22:56:39 +00:00
Cameron Matheson a05b14e0f4 keep crocodoc off canvadocs strand
refs CNVS-16092

Test plan:
  submission attachments should still be previewable in crocodoc

Change-Id: Ieee05820ecd19c70142876ec2ed987cac133ccc0
Reviewed-on: https://gerrit.instructure.com/42868
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2014-10-22 20:53:17 +00:00
James Williams 8eaaa98cf8 make api wiki page retrieval consistent
test plan:
* use the wiki sidebar to create a link
to a new wiki page with a title containing
escapable characters (e.g. spaces)
* follow the link and create the page

* the link will look something like:
/courses/:course_id/pages/new%20page?titleize=0

* confirm that using that url in the api
(e.g. /api/v1/courses/:course_id/pages/new%20page)
retreives the page as well

closes #MBL-3057

Change-Id: I1aba32bef5558b545bf7024e22c3fea76643f231
Reviewed-on: https://gerrit.instructure.com/43145
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2014-10-22 19:54:49 +00:00
Spencer Olson 3779715184 hide rubric icons in speedgrader
When viewing a rubric in speedgrader, the "+", "X" and pencil icons
will no longer be visible.
These same icons were also showing up and non-functional at the
courses/:course_id/rubrics/:rubric_id page BEFORE clicking
the 'Edit Rubric' button. Those should not be visible anymore.

closes CNVS-16334

test plan:
- Have a course with at least 1 student
- Create an assignment that has a rubric attached
  (does not matter if the rubric is being used for grading or not)
- Have a student submit to the assignment
- In Speedgrader, view the rubric and verify the "+", "X"
  and pencil icons are no longer present when hovering over the table.
- View the individual page for the rubric (for example,
  /courses/1/rubrics/1)
- Verify the "+", "X" and pencil icons are no longer present
  when hovering over the table, before clicking the 'Edit Rubric'
  button.
- Click the 'Edit Rubric' button. Verify the icons show up when
  hovering over the table.

Change-Id: Ifbc8a57bd133fe5fe2bd3f3ee07b9b350d6fb487
Reviewed-on: https://gerrit.instructure.com/43104
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2014-10-22 19:19:18 +00:00
Cody Cutrer bd4278f61a limit home menu to in region data
fixes CNVS-16198

test plan:
 * smoke test home menu isn't busted

Change-Id: I3b410dd7d813efca6c89cb400f4d2aa2ed973b93
Reviewed-on: https://gerrit.instructure.com/42544
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Paul Hinze <paulh@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-10-22 19:15:02 +00:00
Aaron Cannon 7b165f50f5 A11y: Fixed issue with JQueryUI tabs and NVDA
fixes CNVS-15755

Test plan:
- Using NVDA in FireFox visit the course settings page
- Verify that pressing enter on any tab will select that tab.
- Verify the same on other pages that use tabs.
- Verify the above with Jaws in IE and Safari with VO

Change-Id: I258e932aa325051b41228681d7588d599dfd54d5
Reviewed-on: https://gerrit.instructure.com/42813
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2014-10-22 17:24:01 +00:00
Nick Cloward 663eaa589a log out specific cas ticket
fixes: CNVS-15843

Changes how we associate a CAS ticket with the Canvas session.  When we
recieve a logout request from the CAS server we mark the ticket as
expired and each time the user performes a request we check their
session cas ticket to the ticket we stored to see if its expired or not.

Test Plan:

 - Setup CAS Server
 - Log in to Canvas with a user
 - Log in to Canvas with the same user in a different browser.
 - Have the CAS server send a SLO request for one of the tickets.
 - First session should be logged out on the next request.
 - Second session should not be logged out.

For additional details see:

https://github.com/instructure/canvas-lms/pull/516#issuecomment-57340629

Change-Id: I189f70e58db6444b1747a686a6a50f46c53f3697
Reviewed-on: https://gerrit.instructure.com/42312
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-10-22 15:08:40 +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
Ethan Vizitei d29221c1f6 fix missing translation error in due dates
fixes CNVS-5622

updated format on public syllabus to be short
and on the hour

TEST PLAN:
1. Create a course with the public syllabus 
   setting allowed
2. Create multiple sections for the course
3. |Calendar|
4. Click on a day and then change the calendar to 
    the course you just set up for this test
5. |More Options|
6. |"Use a different date for each section"|
7. Set up two dates that are over a month apart
8. |Update Event|
9. Log out and go to the syllabus for that 
    course by using the URL
10 you should see a nicely formatted date

Change-Id: I5de5e1e22152d5f556f50cdc1d067cb44a3e7d09
Reviewed-on: https://gerrit.instructure.com/42226
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-10-22 13:11:30 +00:00
Transifreq a2d86ebc83 Updated tr translation
Change-Id: I19bbb9bb54965c596ed04f952888a97231f79fd0
2014-10-22 05:22:49 -06:00
Ryan Taylor 3643fd3b4c Quiz icon in Gradebook doesn't break everything
When the quiz icon shows up and is clicked on to edit, it stalls the JS
on the page, making everything uneditable.  It also doesn't allow for
editing quizzes.

Closes CNVS-16332

Test-plan:
  - Confirm quiz icon edit is functional
  - Confirm other edit fields on the page are still functional

Change-Id: If2d9e5322472ba4bd3474371e5c27b726242ba12
Reviewed-on: https://gerrit.instructure.com/43127
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2014-10-22 00:36:32 +00:00
Dan Minkevitch 9f4b77a746 Fixes "splat" error on New Files
You should now be able to view folders
within files without any errors.

test plan:
* Enable "Better File Browsing" feature flag
* Go to any course's Files page that has folders
  and other uploaded content
* Navigate to a child folder
* You should see the contents of the child folder
  without error

Change-Id: I09359714fc0f49a6e9f5d40fa5ef881fa07052d4
Reviewed-on: https://gerrit.instructure.com/43120
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
2014-10-22 00:01:51 +00:00
Sean Lewis 72f4bfacc9 spec: refactor graded discussion/quiz spec
rewrote helper methods for building and editing assignments in draft state.
rewrote all tests in assignments_discussion_spec and asssignments_discussion_spec
to use new helper method.

Change-Id: If2b619723cfa7c04510d4e233f912ecea482dae1
Reviewed-on: https://gerrit.instructure.com/42931
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Kyle Rosenbaum <kyler@instructure.com>
QA-Review: Kyle Rosenbaum <kyler@instructure.com>
2014-10-21 22:55:11 +00:00
Cameron Matheson 51afd7fd2d add dummy Scribd::Document
fixes CNVS-16347

this fixes version deserialization when a version references a scribd
doc

Change-Id: Id29b6ed9080935b35aa1c5905ddea93e330a43a1
Reviewed-on: https://gerrit.instructure.com/43115
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2014-10-21 22:44:36 +00:00
Nathan Mills 57986c7965 add auto resize back in if no post message to resize is received
fixes: PLAT-688

test-plan:
*install the test tool
*the test tool frame size should be the full length of the screen

*put in the value you want to resize the tool to.
*it should resize

Change-Id: Ifb04ce49272d83d3f0c58ec40d896d7b443b9ad7
Reviewed-on: https://gerrit.instructure.com/43077
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-10-21 22:21:17 +00:00
Jeremy Stanley bfcaa96bd2 implement 'hidden_in_prod' feature status
this is 'hidden' in production environments and 'allowed' elsewhere

test plan:
 - The 'better_file_browsing' feature should be hidden in production
   environments (such as a portal with config/testcluster.yml
   removed).

fixes CNVS-16352

Change-Id: Ic8eefcb53122d27fbf9094cbc010efdbd40e2a59
Reviewed-on: https://gerrit.instructure.com/43098
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2014-10-21 22:12:39 +00:00
Cameron Matheson e4aeb194a5 fix gradebook history for quiz regrades
fixes CNVS-16182

Change-Id: I1ceadbd241d593d966640f21b77528daab7ed11e
Reviewed-on: https://gerrit.instructure.com/42687
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2014-10-21 22:06:25 +00:00
Jon Jensen 50960779fd spec: fix once-ler/sharding issues
while recording, we weren't wrapping the default shard in a transaction,
so side effects could carry over to other groups/examples.

additionally, the previous version of once-ler added recording hooks to
any sharding group, whether or not it actually had any recordings. this
was sub-optimal, and also problematic for non-transactional tests.

this fixes a slew of the rerun failures.

also get rid of the ConnectionEnumerator, since an array suffices and is
easier to reason about (it was just like an array, except #each yielded
connections)

Change-Id: I8cf4d6fb74f2b048017a33c4fc50313cc8e5c19c
Reviewed-on: https://gerrit.instructure.com/38713
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2014-10-21 21:19:59 +00:00
Rob Orton 3dbfc2ef95 add a dropped column to dropped_columns.rb
Change-Id: Ied363a8d60c917cdd5b1398e1ec69895dda4cdf9
Reviewed-on: https://gerrit.instructure.com/43105
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2014-10-21 20:27:24 +00:00
Josh Simpson c18c1ab385 add grading periods api
closes CNVS-15907,CNVS-15908
This commit adds a RESTful, JSONAPI standardized api for grading
periods, along with a serializer and some naive permissions on the
GradingPeriod object.

Test plan
- Note that you'll need to enable the 'multiple_grading_periods' feature
  on the root account.

- Test each of the following endpoints, according to the newly generated
  grading period documentation:

  - GET index
    - /api/v1/accounts/:account_id/grading_periods
    - /api/v1/courses/:course_id/grading_periods

  - GET show
    - /api/v1//accounts/:account_id/grading_periods/:id
    - /api/v1/courses/:course_id/grading_periods/:id

  - POST create
    - /api/v1/accounts/:account_id/grading_periods
    - /api/v1/courses/:course_id/grading_periods

  - PUT update
    - /api/v1/accounts/:account_id/grading_periods/:id
    - /api/v1/courses/:course_id/grading_periods/:id

  - DELETE destroy
    - /api/v1/accounts/:account_id/grading_periods/:id
    - /api/v1/courses/:course_id/grading_periods/:id

Change-Id: I586d6eaf565f35d5d4bd8e22aaa9fd72f0d07832
Reviewed-on: https://gerrit.instructure.com/42451
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2014-10-21 19:58:34 +00:00
Rob Orton ffc0f3c82f don't fail sis_imports GET with nil options
fixes CNVS-16235

test plan
 - create an sis_import
 - update the import to have nil options
   s = SisBatch.where(id: last_import)
   s.options = nil
   s.save!
 - go to /api/v1/accounts/self/sis_imports
 - it should not fail

Change-Id: I230f5535726eada520b4369bd01c0e0262e94630
Reviewed-on: https://gerrit.instructure.com/42650
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-10-21 19:44:14 +00:00
Cody Cutrer 112623c175 fix new admin e-mail notification
fixes CNVS-16348

test plan:
 * add a new admin to an account
 * that person should receive an e-mail notification

Change-Id: I95b90e476f909c425b5585684c87d41ace15380d
Reviewed-on: https://gerrit.instructure.com/43070
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-10-21 18:58:29 +00:00