Commit Graph

7509 Commits

Author SHA1 Message Date
Ahmad Amireh 7df6a55a34 Quiz Stats - don't count Student View submissions
QuizSubmission now supports a new scope "for_students" that will grab
all submissions that are:

  - not a teacher preview
  - not a teacher-initiated "Student View" one
  - submitted by students who really are rolled in a course

Closes CNVS-13694

TEST PLAN
---- ----

  - create a quiz with one question
  - enter Student View via the course settings
    + take the quiz
    + get out of Student View
  - visit the statistics page (or hit the API)
    + verify the attempt is not factored
  - generate the CSV of Item-Analysis to verify that IA does not factor
    these attempts either
  - test the change with Survey quizzes - need to make sure "logged out"
    users are still OK where applicable

Change-Id: Ic58569be31576734eb6e309d548a7415c07e08a7
Reviewed-on: https://gerrit.instructure.com/38174
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2014-07-29 16:13:44 +00:00
Jon Jensen 5480c8fecd spec: speed up api specs
liberal applicataion of once-ler and bulk_insert helpers, reduce runtime
from 50min -> 25min

Change-Id: I07c1952c4ead0a1c6caafc389de0b9586b27dc68
Reviewed-on: https://gerrit.instructure.com/37794
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2014-07-29 16:11:16 +00:00
Ahmad Amireh 2acbe015cf Ember Quiz Stats - Summary chart scrolling fix
Closes CNVS-12672

TEST PLAN
---- ----

  - enable NQS, create a quiz, take it by one student
  - go to ember quiz stats:
    + verify that the summary chart shows the 0 and 100 percentiles
  - make the window small enough to show a horizontal scroller for the
    rest of the page
    + verify that the chart scales down to stay visible
  - make the window too small:
    + verify that the chart can be fully viewed using the horizontal
      scroller
  - make the window too large:
    + verify that the chart scales up to a certain point (width of
      960px)

Change-Id: I2be601aaa6c98f574fe6fa944a3a57558e386e3f
Reviewed-on: https://gerrit.instructure.com/38342
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-07-29 16:00:03 +00:00
James Williams 2b3cfb34aa user submission export
test plan:
* as a student, visit /dashboard/data_exports
* should be able to export a zip file containing
 all of the student's submissions

refs #CNVS-14242

Change-Id: Iaab216e7411c27fa6d259f677e40a75d3de3f5a8
Reviewed-on: https://gerrit.instructure.com/36872
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-07-29 14:56:03 +00:00
James Williams 8162b8550a queue content migration through content-item launch
test plan:
* set up a course_home_sub_navigation enabled tool, as in
 the test plan for g/37834
* launch the tool from the course home page
* select the imscc file on the test tool content
 selection page
* should be redirected to the content_migration page
 and have a new migration queued for the course

closes #CNVS-13797

Change-Id: If94e65d2ba3c1f2ed53624b6a3b4c9a75d25c5ce
Reviewed-on: https://gerrit.instructure.com/38206
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-07-29 13:10:30 +00:00
Simon Williams 2c53ea32d3 change outcomes index headings to be sequential from h1
fixes CNVS-13123

test plan:
- go to the course outcomes page
- enable a screenreader and view the headings list
- it should now have sequential headings, starting at h1 (specifically for this
  page, it should have an h1 and an h2)

Change-Id: I616d212c343df7b8e277b505aa00e93697ddda7b
Reviewed-on: https://gerrit.instructure.com/38255
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-28 22:54:22 +00:00
Jeremy Stanley a2f61cf748 fix date shifting issues
due to rounding error, a customer's date that should have been
30 days from the new start of the course was placed at
29.999999999999996 days, which was truncated to 29, which was then
shifted back 6 days to fall on the correct day of the week.

also, announcement post delay dates were not getting shifted
at all.

test plan:
follow the scenarios in CNVS-14130 and ensure that
 * announcement post delay dates are shifted
 * some dates don't mysteriously end up a week earlier
   than they should

fixes CNVS-14130

Change-Id: Ice5bd3be0ddee0dec2af7b740c568750dd3c4ab8
Reviewed-on: https://gerrit.instructure.com/38223
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-07-28 22:22:58 +00:00
Michael Nomitch ede8dbf294 Revert "DA - assignments_needing_submitting"
fixes CNVS-14443

This reverts commit 57427343e3.

Change-Id: Ic70da7d96965d368773c2e16c2b49c59f57e5c18
Reviewed-on: https://gerrit.instructure.com/38314
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2014-07-28 22:17:35 +00:00
Cameron Sutter 228306d922 DA - gb2 visibility data
fixes CNVS-9872
refs CNVS-14074

test plan:
 * turn on the differentiated assignments feature flag
 * edit an assignment so that not all sections can see it
 * using assignment groups API
 - in the request make sure to include "assignments" and "assignment_visibility"
 > there should be an assignment_visibility object within each assignment object
 > the assignment_visibility object should be an array of unique ids
 > the ids should only be students in sections that can see the assignment
   or students whose submissions were graded
 * using the assignments API
 - in the request make sure to include "assignment_visibility"
 > there should be an assignment_visibility object
 > it should be an array of unique ids
 > the ids should only be students in sections that can see the assignment
   or students whose submissions were graded

Change-Id: I68e832c3dc1859e398f656fa77804b2733f0dcd3
Reviewed-on: https://gerrit.instructure.com/36811
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-07-28 22:17:20 +00:00
Ryan Florence 88afac883e [wip] magic modules
Change-Id: I68283129aa2fe8146ab804adbce1fb6699f2f5bb
Reviewed-on: https://gerrit.instructure.com/37213
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2014-07-28 21:24:37 +00:00
Colleen Palmer 5422219490 Changes the path for fontcustom compile
This recompiles the iconfont to have the correct path and
edits the styleguide path info

Testing:

- When you go to styleguide all the icons should appear

Change-Id: I1a300cd20b9965782771b7eabf8b475bd22f15c2
Reviewed-on: https://gerrit.instructure.com/38135
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-07-28 20:50:25 +00:00
Ryan Florence f4081e6d08 increase requirejs waitSeconds
occasionally users connections are very slow,
no need to error out on the page

fixes CNVS-13542

Change-Id: I49e0873b42bb7bb53c73d9b37d95dee00be0a733
Reviewed-on: https://gerrit.instructure.com/38233
QA-Review: August Thornton <august@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Matt Fairbourn <mfairbourn@instructure.com>
2014-07-25 23:15:07 +00:00
dave 7e6519d586 add api endpoint to post global annoucement
***test plan
  1.  Make a POST like /accounts/1/account_notifications
  2.  Required Parameters:
      1) account_notification[subject]
      2) account_notification[start_at]
      3) account_notification[end_at]
      4) account_notification[message]
  3.  Optional Parameters:
      1) account_notification[icon]
        'warning' | 'information' | 'question' | 'error' | 'calendar'
         note: defaults to warning
      2) account_notification_roles[]
        'StudentEnrollment', 'TeacherEnrollment' etc...
        this defaults to all roles
  4.  Only account admins should be able to make the api call
  5.  Should not be able to create an account notification with an
  end_at < start_at

closes:  PS-1730
closes: PS-1872

Change-Id: Ide86722598ae4a7ab565422f2996015b48cf8910
Reviewed-on: https://gerrit.instructure.com/37477
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
2014-07-25 22:16:18 +00:00
Simon Williams d7ed7a5911 don't set graded_at in the future for quiz submissions
fixes CNVS-14403

test plan:
- create a quiz with a due date far in the future (and no time limit)
- take the quiz as a student
- look at the grade_history api for that user
- the graded_at for the quiz assignment should be when it was submitted, not
  when it was due (in other words, it should be in the recent past, not the far
  future)

Change-Id: I37754b4be5238e240bbc6a9826ea9d7599c9a61f
Reviewed-on: https://gerrit.instructure.com/38154
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-25 20:12:09 +00:00
Colleen Palmer d972788bea This changes and reorganizes all of our css structure. It starts
to consolidate some of the stylesheets, but the majority of work
has just been to reorganize the files that we have so they can more
easily be found and edited. Not to mention a structure than can
organize any new features and styles we put into canvas!

7/23
* added correct path for compiled course_settings
* took out repeated variable sheet in publish_gradebook

7/22
* fixed css path for conversations styles

7/21
* changes from master rebase
* took out context_modules.sass because it was old and unused

7/17
* brought back legacy sass files and changed to right paths
* taking out ComboBox to move to analytics plugin
* moved tinymce file to correct place, fixed js file paths to point
to it correctly
* brought tinymce sass file to stylesheets root to see if
jenkins passes
* rebased master, took out onneeded _environment.sass

fixes DES-83
* regression fixes from master rebase

fixes DES-83
* fixes compile error on jst/UserObservees.sass pulling in environment

fixes DES-83
* brings back in calendar.css so we can separate that deletion out
  on a separate occasion

fixes DES-83
* take out user_observees since it's a handlebars sheet

fixes DES-83
* stylesheets/pages/ now has compiler sheets
  and a /shared/ partials folder
* consolidation for assets_real.yml - we've knocked this down
  to each page having one sheet that is compiling
* moved anything in /public/stylesheets that wasn't
  in our /app/stylesheets/ into there for better organization
* we've purged a few files that weren't being used or have been
  updated elsewhere

fixes DES-83
* takes out unneeded _newheader file
* removes redundant @import base/environment in _g component files
* renames app_common to c-common
* moves static css from /public into assets/stylesheets and modifies assets_real.yml to reflect new paths

fixes DES-83
* added _ prefix to g_ components in /components so they won't compile to stylesheets

fixes DES-83
reworking the way that we're overriding bootstrap
* deleted bootstrap-parts directory
* moved bootstrap-parts scss to /base
* renamed _main.scss to _custom_bootstrap.scss
* renamed _overrides.scss to _bootstrap_overrides.scss
* deleted empty and unused popover.scss file

fixes DES-83
moved /mixins into /base since they were only being called into _environment.sass

fixes DES-83
consolidated /bootstrap into /vendor

fixes DES-83
consolidated utilities into components

fixes DES-83
initial folder structure added
* reorganized existing css files for better structure

fixes DES-83
got rid of unneeded dump file

Change-Id: Id6f1409d478087a6cf9ebaa19ffa3a10b50891ca
Reviewed-on: https://gerrit.instructure.com/37280
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2014-07-25 19:58:40 +00:00
Jayce Higgins f3f8b0c428 Adds peer review notification for assigning peer reviewers
Fixes: CNVS-3771

Adds a peer review notification to go out after
a peer reviewer is added to the discussion. This
also resolves the issue with a notification not
being sent if a rubric is not attached.

Test-Plan:
1.) Run bundle exec rake db:migrate in the console
	before doing anything else -- (This sets up your
	db by using notification_types.yml to populate
	notification types in the DB.)
2.) Create a graded discussion with at least 2
     students
3.) Make sure both students have everything
     in their notifications set to ASAP.
4.) Edit the assignment settings and select the
     'Require Peer Reviews' - Choose to manually
     select peer reviewers.
5.) Navigate to discussions as an admin
6.) Select the cog and go to peer reviews.
7.) Assign a peer reviewer and verify that the
     notification was sent out.

Change-Id: I78212cb8043de0fcf809a9ffa56ffca327ffcacc
Reviewed-on: https://gerrit.instructure.com/36646
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-07-25 19:56:57 +00:00
Brian Palmer 8faaf9bca5 fix autoloading of the Importers module
It wasn't following the rails file naming convention

fixes CNVS-14360

Test plan: imports, such as state standards imports, should work even
without class caching

Change-Id: I99ac8448844b7ac852203a5b8127d6fa35ea5f12
Reviewed-on: https://gerrit.instructure.com/38090
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-25 19:14:12 +00:00
Simon Williams 40b8bafa9a api: paginate the course assignments endpoint
closes CNVS-13475

test plan:
- create 10 assignments in a course
- call the 'list course assignments' endpoint with per_page=2 as a query
  parameter
- it should only return 2 assignments and have pagination links to go to the
  next page
- make sure those links work
- also try passing other allowed parameters like 'include[]', 'search_term' and
  'override_assignment_dates', and make sure they are maintained in the
  pagination links. in other words, make sure that if you are including
  submissions in the first call with the include[] parameters, subsequent calls
  to later pages also return the submission

Change-Id: Ib637eb95186a2d3c586aaca64ef3efe2d937b142
Reviewed-on: https://gerrit.instructure.com/37640
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-25 17:18:39 +00:00
Ryan Shaw 41ba4aa3b2 create k12 specific stylesheets
closes: #CNVS-10113

this is the start of creating a new k12 specific
look-and-feel.  To start using this, turn on the
'k12' feature flag for an account.

test plan:
this should do nothing for existing users
but to test that this is working you can
do:
Account.find(<id of your account>).enable_feature!(:k12)
and then make sure that the stylesheets being loaded
on the page are coming from either:
/stylesheets_compiled/k12_normal_contrast/
or
/stylesheets_compiled/k12_high_contrast/
(depending on if you have turned on high contrast
for yourself)
if everything looks just like it did before, this works.

Change-Id: I9355d1498ab4f6587faf137b129a998044a3bbeb
Reviewed-on: https://gerrit.instructure.com/37926
Reviewed-by: Colleen Palmer <colleen@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2014-07-25 16:46:39 +00:00
Sterling Cobb 4dda4961aa read error message screen readers when adding user
fixes CNVS-14078

If you're using VoiceOver or NVDA and trying to add a user to your
course but don't add a correct email, it won't read the error message.
This is now fixed.

Test Plan
Given I'm on the People page
And I'm using NVDA in FireFox
And I'm a Teacher
When I click the '+ People button
And I enter an email address that is not formatted correctly
And I press the "Next" button
Then I should see an error message explaining why the email didn't work
And the error message should have focus
And the error message should be read to the user automatically

Change-Id: Ic644bc9b5f93123bb9305a0d7c11e232d0c6620f
Reviewed-on: https://gerrit.instructure.com/38079
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2014-07-25 16:26:32 +00:00
James Williams fc4553d0cb add screenreader text to unenroll link on user page
test plan:
* as an admin, visit the page of a user with an enrollment
* with a screenreader, the link with an "X" icon should
have descriptive text

closes #CNVS-13996

Change-Id: I2bb29fc10803028246f1fde121e5a0dba9f36452
Reviewed-on: https://gerrit.instructure.com/37932
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-25 12:19:21 +00:00
Duane Johnson a519383c79 save assignments on Post Grades
Saves assignment names and due dates when modified in the SIS Post
Grades dialog.

Test Plan:
- for assignments that are missing names or duplicated, fix the
  name
- for assignments that are missing due dates, add a due date
- once all assignments are fixed, the assignments should auto-
  matically be saved to Canvas
- the user is sent to the next page in the dialog where they
  can click "Post" button

Fixes SIS-250

Change-Id: I0bbcf6f4eea1c4bf645cbd09a123bf0ac37fd1cd
Reviewed-on: https://gerrit.instructure.com/37248
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Eric Adams <eadams@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-07-24 21:09:49 +00:00
Duane Johnson 07d438d563 sync error visuals w/ Post Grades assignment form
Shows red circles next to form elements that are missing or
incorrect (due_at, name).

Test Plan:
- press "Post Grades" button
- assignments with missing due dates or names should have
  a red circle next to them
- choosing a date or typing a name should remove the red
  circle after removing focus from the element

Fixes SIS-335

Change-Id: I9b01f4f322e20180211285bc02ed027d3aebf31d
Reviewed-on: https://gerrit.instructure.com/37211
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Eric Adams <eadams@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-07-24 19:24:47 +00:00
Cameron Sutter 4bcbd7e236 clean up discussion edit page
fixes CNVS-12770

I just cleaned up some uneccessary code from simon's suggestions.
There are no functionality changes from g/34272

Change-Id: I5cec7c44b31663de5fb945afb8b9557aad2e282c
Reviewed-on: https://gerrit.instructure.com/37931
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-24 17:21:15 +00:00
Cody Cutrer 77c14d79b6 move rescue_responses to app config
fixes CNVS-14289

Change-Id: Icadcbee1c31436322fb53a4b5263c30f3381c3a3
Reviewed-on: https://gerrit.instructure.com/38016
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-07-23 20:02:28 +00:00
James Williams 2e0d9e635e add screenreader text to account setting report description links
test plan:
* using a screen-reader, confirm that the question mark buttons
on the Account settings/Reports tab have descriptive text

closes #CNVS-13913

Change-Id: I8c453cb60e27156d8c6b2da9f98d2940c203320d
Reviewed-on: https://gerrit.instructure.com/37977
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-23 19:21:44 +00:00
Brian Finney d170bf1adc Accessibility for delete on file upload question
Fixes CNVS-12798

test plan
- Setup a quiz with a file upload question
- Take the quiz
- Upload a file
- The delete (X) button in the file upload space should have proper
accessibility

Change-Id: Ib8dfe02cf020422609258c44ca9b3156148d8025
Reviewed-on: https://gerrit.instructure.com/37793
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Brian Finney <bfinney@instructure.com>
2014-07-23 16:33:32 +00:00
Cameron Sutter 79f45f569d DA - quiz edit page
fixes CNVS-9766

test plan:
 * turn on the Differentiated Assignments feature flag
 * from the quiz edit page
  - add a due date for some of the sections, but not all
  - save (update quiz)
  > the only_visible_to_overrides flag on the quiz should be true
  > edit the quiz again and there should not be an
    empty due date row for 'Everyone else'
  - add a due date for all the sections
  - update the quiz
  > the only_visible_to_overrides flag should not be there
  - edit the quiz so that there are only due dates
    for some sections but not all
 * on the normal quiz show page and
 * on the new Quiz Statistics show page
  > there should not be a row in the due date area
    for 'Everyone else'
 - turn off the DA flag and make sure the quiz show page works
   with the 'New Quiz Stats page' flag and without it
 - make sure the edit page works with the DA flag off as well

Change-Id: Ifb090a195ff3283d963df12ae7a9eb503f32ee86
Reviewed-on: https://gerrit.instructure.com/34085
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2014-07-23 14:41:24 +00:00
James Williams 67835ce809 fix new module IE 10 dialog form submit on enter
test plan:

* in a course that already has one or more modules,
 use IE 10 toopen the "create module" dialog to add a module
 to a course
* with keyboard focus on the module name text field,
 press enter
* should submit the module as in other browsers

fixes #CNVS-14224

Change-Id: I1952c3d60e1ad05dfd4ea5962218f09dd2d21d5f
Reviewed-on: https://gerrit.instructure.com/37979
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-23 14:32:08 +00:00
Brian Palmer 1c1455185b log auditor events to the rails log
closes CNVS-14174

test plan: Generate some audit events, such as login/logout and grade
changes. grep your canvas log for AUDITOR lines, which should contain
a json object with the attributes of the audit event.

Change-Id: Icbf67b94120e2e22ba656e673edc04ab30de5945
Reviewed-on: https://gerrit.instructure.com/37572
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-07-23 14:26:25 +00:00
Michael Nomitch 57427343e3 DA - assignments_needing_submitting
fixes CNVS-14137

test plan:
  - In one course with DA off
    - make sure that the To Turn In
      section shows an assignment that is
      due in 1 day and not turned in
  - In one course with DA on
    - make sure that a similar assignment
      that a student cannot see due to
      differentiated assignments doesnt
      show up in that column
  - NOTE: don't use the same course/user
    because there is a cache that only updates
    every 15 minutes

Change-Id: I6cc93b01ba41335ae0c7f6f8682b8798e0604c3e
Reviewed-on: https://gerrit.instructure.com/37020
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
2014-07-23 14:06:34 +00:00
James Williams 7e4749e3f8 use require_dependency instead in importers
Change-Id: Iaa1c085b5ec30d0e9e1d4dd698ceff935c9f604d
Reviewed-on: https://gerrit.instructure.com/37971
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-07-23 13:24:00 +00:00
James Williams 5cc99e6a9f remove space in page revisions title
closes #CNVS-14351

Change-Id: Id4e04b90577b1651ba4d3bab9546b3743b38499a
Reviewed-on: https://gerrit.instructure.com/37936
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-07-23 12:12:32 +00:00
Braden Anderson d510f0e811 conversations: only poll unread count on inbox page
fixes CNVS-14355

test plan:
  * open conversations
  * mark a conversation read or unread
  * wait 30 seconds
  * verify that your unread message count is updated

  * open your browser's network monitor
  * switch to another tab
  * wait 30 seconds
  * verify that /api/v1/conversations/unread_count was not hit

  * open a different canvas page
  * wait 30 seconds
  * verify that /api/v1/conversations/unread_count was not hit

Change-Id: Ib33ac1fda7e16717508cfb34bf360d8b917468d1
Reviewed-on: https://gerrit.instructure.com/37954
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-07-22 22:17:05 +00:00
Ryan Shaw 6034184ee4 add search to files and convert to react
closes: CNVS-12642
closes: CNVS-11221

test plan:

nothing should have changed for courses/accounts that
have the feature flag 'better_file_browsing' turned off
but I guess make sure.

with it turned on, you should be able to browse the
files in your course, search for things, and re-sort.

it should paginate, download files you click on,
show thumbnails of files (where it has one) and you
and see the files usage in the bottom left.

things that I know dont work:
* the folder tree thing on the left is still
  just static html, not the actual files in your course.
* it does full page reloads when you go from
  looking at one folder to another or when you
  search for something. I am going to fix that.

I know there is still work to be done here to consider
the entire files section complete, but this is a solid
foundation so that sterling and I can collaborate and
work forward.

Change-Id: Ia79ddba4318b7d6e52b38a87e91f615552da250b
Reviewed-on: https://gerrit.instructure.com/37491
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-07-22 22:07:52 +00:00
Jacob Fugal 399f732b82 handle corrupted tombstone auditor events
refs CNVS-13987

after data fixup for CNVS-13987, the audit logs will contain tombstone
records for events that had been lost/corrupted by overwrites. these
records are essentially empty outside of ids, created_ats, and the index
entries pointing at them.

these adaptations prevent these bare events from causing errors during
the API response, and also some display indication in the admin tools
UI.

test-plan:
 - revert a6304f2 to reenable audit logs

 - generate tombstone events (with index entries, so they get found) in
   each of the three audit logs (authentication, grade change, course
   change):

     # user for authentication events, course for the other two
     target_course = Course.find(...)
     target_user = User.find(...)

     streams = [
       [Auditors::Authentication::Stream, :user_index, target_user],
       [Auditors::GradeChange::Stream, :course_index, target_course],
       [Auditors::Course::Stream, :course_index, target_course]
     ]

     streams.each do |stream, index, target|
       index = stream.send(index)

       database = stream.database
       id = CanvasUUID.generate
       created_at = Time.now

       key = index.create_key(index.bucket_for_time(created_at), target.global_id)
       ordered_id = "#{created_at.to_i}/#{id.to_s[0, 8]}"
       ttl_seconds = stream.ttl_seconds(created_at)

       database.batch do
         database.insert_record(stream.table, {stream.id_column => id}, {
           'created_at' => created_at,
           'event_type' => 'corrupted'
         }, ttl_seconds)
         database.update(index.insert_cql, key, ordered_id, id, ttl_seconds)
       end
     end

 - query each of the audit logs for the appropriate target through the
   admin tools UI. the tombstones should show up in the results with the
   correct created_at and an indication that the record was
   corrupted/lost

Change-Id: I690c8a5469228b7815a644010bb4b744c8ea2e9c
Reviewed-on: https://gerrit.instructure.com/37603
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-07-22 16:16:06 +00:00
Aaron Cannon 02da89e801 Accessibility: Labeled the available from and until fields on discussions
Fixes CNVS-13935

Test plan:
- Using a screen reader, create a new discussion topic.
- Navigate to the Available From and Until fields
- Validate that the screen reader reads the field labels correctly.
- Validate that the fields still opporate as expected.

Change-Id: I3f81dd13d8e4b04bb3034681e9fb17015e4fd9c5
Reviewed-on: https://gerrit.instructure.com/37842
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jayce Higgins <jhiggins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2014-07-22 15:41:53 +00:00
Aaron Cannon cf33943b4c Accessibility: Made expand/collapse controls accessible to keyboard users
Fixes CNVS-13584

test plan:
  - as both a teacher and a student:
    - navigate to assignments index page
      - using the keyboard verify:
        - you are able to navigate to the expand/collapse controls
        - expand/collapse appears visually focused
        - you are able to toggle the expland/collapse controls
    - enable :quiz_stats feature flag on a course
      - navigate to quiz index
      - verify the above for quiz index

Change-Id: Ia9486464289d122c41d1790202b1b5e81d1a67a8
Reviewed-on: https://gerrit.instructure.com/36785
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2014-07-22 15:40:52 +00:00
Brad Humphrey 25cc14c224 remove canvas frame from borderless lti launches
test plan
  - install a tool
  - launch the tool using /courses/1/external_tools/retrieve?url=http://lti-tool-provider.herokuapp.com/lti_tool&borderless=1
  - it should launch within a canvas frame
  - launch the tool using /courses/1/external_tools/retrieve?url=http://lti-tool-provider.herokuapp.com/lti_tool&borderless=1
  - it should launch in full screen without first loading the canvas frame

fixes PLAT-550

Change-Id: I83d6d024c7c574138a0863dc74dedaac749a0b26
Reviewed-on: https://gerrit.instructure.com/37893
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-07-21 20:42:47 +00:00
James Williams 63c380d8ac fix typo in extend_time controller
Change-Id: I2d0ab394b80a4b098339b45a8ae3afe59d575e68
Reviewed-on: https://gerrit.instructure.com/37911
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-07-21 19:00:32 +00:00
James Williams 9989eaa9a1 retain unpublished state for discussion topics on copy
test plan:
* create an unpublished discussion topic and a
 published one
* copy the course (or export/import it)
* should retain their respective states

closes #CNVS-14201

Change-Id: If7702b67701b50ce4e2a027d1d4b5ab441d86003
Reviewed-on: https://gerrit.instructure.com/37900
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-07-21 17:25:10 +00:00
James Williams e3bb29a0a2 fix content importers without class caching
Change-Id: Ifad2fdbaac327cdaac985a0a10afd09e7c136208
Reviewed-on: https://gerrit.instructure.com/37910
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-07-21 16:58:25 +00:00
Cody Cutrer b7a7cd4951 fix permission checks for available roles
fixes CNVS-13848

test plan:
 * create a role that only has permission to create admins
 * in a subaccount, grant that role an additional permission
 * in the root account, add an admin to the role
 * log in as that admin
 * in both the root account and the subaccount, attempt to create
   an admin - it should only list your role in both cases

Change-Id: If9a2dd4952e432700c59a0d4ad5e76ffa822dd0f
Reviewed-on: https://gerrit.instructure.com/37408
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-07-21 16:32:23 +00:00
Cody Cutrer 17044dfb94 i18n fixes for content_exports/index.html
fixes gh-476

Change-Id: I73481c0c0571184e2656bd0d9a23bfdaf84c330c
Reviewed-on: https://gerrit.instructure.com/37858
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-07-21 14:55:08 +00:00
Cody Cutrer 5d2e9c7704 fix overrides in subaccounts changing permissions for parent accounts
refs CNVS-13848

test plan:
 * create a role in a root account that has no permissions
 * create a subaccount
 * grant permission to add new admins to that role in the subaccount
 * add an admin to that role in the root account
 * log in as the admin
 * he should not have permission to add admins to the root account,
   but should be able to in the sub account

ALSO - general permissions regression test

specs still pass, but it's kind of a scary change to the core of
how permissions work

Change-Id: I74fd72d71e9922431e134af94da41815196a2234
Reviewed-on: https://gerrit.instructure.com/37407
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-07-19 00:42:32 +00:00
Nathan Mills 737c5ccdd4 add aria selected for canvas app center filters
fixes PLAT-556

test plan:

screen readers should be able to tell which filter is selected
you can tab through the apps now, and select one with space

Change-Id: Idf96f9418420dfe79ebe6d4451901cf2766589ab
Reviewed-on: https://gerrit.instructure.com/37767
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-07-18 17:12:42 +00:00
Nathan Mills a91d9c09d0 add lti2 models and registration endpoints
fixes PLAT-522 PLAT-429 PLAT-545 PLAT-540 PLAT-498

test-plan
you can register an lti2 tool

Change-Id: If045b694213e1019f8a595b63a7e33ea4ac28e64
Reviewed-on: https://gerrit.instructure.com/37095
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
2014-07-18 16:42:10 +00:00
Colleen Palmer 0212b59646 Support for fontcustom for canvas icons
This uses the fontcustom gem to compile our icons from svgs in the
public/fonts/ folder. No more complicated workflow for adding/editing
icons!

Way to test:
  * Add your new svg to public/font/icons/
  * Important!! Edit template file to update
    stylesheet in public/font/_canvas-icons.scss
  * Run the rake task to compile: bundle exec rake icons:compile
  * Check the styleguide to make sure they're pulling in
  * Done!

Update
fixes DES-101
-takes our core_en.js file (unneeded)

fixes DES-101
- Changes font directories
- Tweaked documentation

fixes DES-101
- Tweaked documentation
- Changed directories for font icon
- Added unique hash to font name

fixes DES-101
- Changed rake task to perform bundle exec
- Updated documentation
- Added missing config file

fixes DES-101
Takes out the default [date-icon] css fontcustom puts in

fixes DES-101

Take out all the icomoon comments in the svgs

fixes DES-101

Added missing icons to font

fixes DES-101

Adds the fontcustom gem to a different gemfile

Change-Id: I9860cb074baaf4518548c9d87c1177a14d96a44c
Reviewed-on: https://gerrit.instructure.com/36974
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2014-07-18 15:47:45 +00:00
Joel Hough 0c80487238 use absolute url for avatar in notifications
fixes CNVS-14251

test plan
- cause a notification with an avatar to be sent (discussion,
 conversation, or submission comment)
- ensure that the avatar image src attribute is an absolute url

Change-Id: I6992de1f4b83ecfdf838725a42e09feb1ca5e1c9
Reviewed-on: https://gerrit.instructure.com/37729
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-07-18 14:18:25 +00:00
Jon Willesen ddcd5403ed add content parameters to course_home_sub_navigation lti launch
fixes CNVS-13798

test plan:
 - copy the xml configuration for the lti-tool-provider example
   lti app to a local file.
 - modify the xml by duplicating the migration_selection
   extension, changing the extension name to
   course_home_sub_navigation
 - configure the lti app on a course by pasting the modified xml
 - navigate to the course home page and open the network tab on
   the web inspector
 - launch the tool by clicking on its button on the right
   sidebar
 - inspect the POST request to the lti app and verify that 4
   "ext_content_" parameters are present:
   - intended_use
   - return_types
   - file_extensions
   - return_url
 - click on one of the supported links
 - should be redirected to the "tool use finished" page.

Change-Id: If5df5657c64377fdb2badca1d890c73e95548fbc
Reviewed-on: https://gerrit.instructure.com/37834
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-07-17 22:41:23 +00:00