Commit Graph

17660 Commits

Author SHA1 Message Date
Benjamin Porter bce1c3fd3f Outcomes Import API: Expose ISTE standards
Expose ISTE standards as available standards when clients request the
list of standards available to import

Fixes CNVS-23789

Test Plan:

    - Make an API request to the "available" action of the
      OutcomesImportController:

      curl -H "Authorization: Bearer <your-key>"
      http://<canvas-domain>/api/v1/outcomes_import/available

    - Observe that the ISTE standards are in the list.  There should be
      three: "NETS for Administrators, NETS for Teachers, NETS for
      Students"

Change-Id: I07597719596269e06eb6773ba298c453b6626e0b
Reviewed-on: https://gerrit.instructure.com/64481
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
QA-Review: Benjamin Porter <bporter@instructure.com>
2015-10-07 05:13:49 +00:00
Ryan Shaw fde44bd840 use same brandable_css manifest across deploys
fixes: CNVS-23783
also closes: CNVS-23841

all the real changes are here:
https://github.com/ryankshaw/brandable_css/compare/2cf4ad3...master
review those too while you are reviewing this.

(sidenote: I was going to get this all set up to host
that npm package all official from the instructure
github account but, apparently we are going to get
our own private npm so I didn't want to go through
all of that fuss just to change it again when that
gets figured out)

https://gerrit.instructure.com/64465 should be
submitted along with this

test plan:
* bundle exec rake RAILS_ENV=production \
  UNIQUE_KEY_FOR_BRANDABLE_CSS_MANIFEST=some_unique_key \
  brand_configs:generate_and_upload_all
* it should generate all your css from scratch
* run that again, it should say "no sass changes"
* bundle exec rake RAILS_ENV=production \
  UNIQUE_KEY_FOR_BRANDABLE_CSS_MANIFEST=other_key \
  brand_configs:generate_and_upload_all
* should generate everything from scratch
* https://dev-canvascdn1-com.s3.amazonaws.com/dist/brandable_css/brand
  able_css_bundles_with_deps.jsonnestedother_key
  should exist

to also test CNVS-23841:
* with node 0.11.x installed
* try to run `bundle exec canvas:compile_assets`
* it should fail fast and tell you it failed because
  you don't have a new enough node
* it should not ambiguously fail with an error like
  cannot find method 'parse' of undefined

Change-Id: I7a90560b8ef3c5ca173c4b5bc06e0681848c0099
Reviewed-on: https://gerrit.instructure.com/64473
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2015-10-06 22:04:33 +00:00
Clay Diffrient 60d3834e9d [a11y] Adds context to module level buttons
Makes it so that screenreaders are given specific module context
i.e., the module name, whenever they navigation to a module
level button

fixes CNVS-22866

Test Plan:
  - Go to the modules page
  - Using a screenreader go to the publish cloud at the module
    level.
  - It should indicate the name of the module, for example:
    "Published. Click to unpublish My Cool Module."
  - Similar things should occur for the Add content button and
    the manage module dropdown.
  - The publish button and cog buttons for items within modules
    should similarly give context.

Change-Id: I1ba3f5e5c09e8186667af38eb19852295d5f01e2
Reviewed-on: https://gerrit.instructure.com/63049
Product-Review: Aaron Cannon <acannon@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
2015-10-06 20:30:45 +00:00
Jeremy Stanley f53907c0dd fix lock-by-date modules in public courses
test plan:
 - create a public course
 - add some modules
 - set one or more modules to unlock in the future
 - ensure that both logged-in students and non-logged-in users
   see that modules that are locked by date appear as such
   in the modules UI

fixes CNVS-15095

Change-Id: Id32d8af9cacf9412d3fbc6eed9da8171bf36194b
Reviewed-on: https://gerrit.instructure.com/64329
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-06 19:03:40 +00:00
Jon Willesen 874432a9f9 correctly record login events in login/logout audit log
The `successful_login` method was trying to use
`@current_pseudonym`, which doesn't get set in the login
request. Fortunately it gets passed a `pseudonym` parameter
which it should have been using anyway.

fixes CNVS-22768

test plan:
 - login and check the login / logout activity admin tool for the login event

Change-Id: I726317cc8e688e40f1b9a1d9bd0b4ef65f1607b3
Reviewed-on: https://gerrit.instructure.com/64624
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2015-10-06 18:27:46 +00:00
James Williams 2b72c8141e fix assignments on syllabus page
test plan:
* create a course with assignments with due dates
 and calendar events
* the syllabus page should differentiate between
 the assignments and regular events with bold text
 and also say "due by X"

closes #CNVS-22502

Change-Id: I7032c6af99482beda4a15a0d511b2d205af442b2
Reviewed-on: https://gerrit.instructure.com/64573
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-06 18:18:56 +00:00
James Williams 2ba3c0b17b fix permissions for admin users without :manage_courses
also add a read-only view for course settings

test plan:
* create an account role with permissions to do everything
 except "Manage Courses" and
 log in as an account admin with that role:

* they should be able to view unpublished items
 (modules, assignments, etc)

* they should be able to get to the course settings page
but they should not be able to edit the settings
 (or try to, unsuccessfully)

* they should not be shown options on the course home
 they don't have the rights to edit, such as
 "Choose Home Page"

* also to be safe, make sure all the course settings are
editable for a full admin

closes #CNVS-22594

Change-Id: I57a7fe9dd04b6ec35fd6e2b311e02b9e43d82929
Reviewed-on: https://gerrit.instructure.com/63064
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-06 17:15:38 +00:00
Rob Orton 2b4a7f4d22 show inactive status for inactive enrollments on sis export
fixes CNVS-23667

test plan
 - set an enrollment to inactive via sis import
 - run sis export it should have inactive instead of nil

Change-Id: I125698dde37a0511c1a196c25c414fc5fbbb9345
Reviewed-on: https://gerrit.instructure.com/64495
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-10-06 16:43:54 +00:00
Jon Willesen 8dd8e03623 record anonymous grading in grade change audit log
anonymous grading is currently only possible from speedgrader.
when a grade is changed in speedgrader, it now sends in a
parameter that indicates whether the "hide student names" flag
was on (by any means).

when the grade changes on a submission, the submission also
remembers whether it was graded anonymously. If the grade
changes and the graded anonymously flag was not explicitly set,
the flag is reset to false. This way we don't have to modify
every place that changes a grade to update the anonymous flag.

this commit includes migrations to add anonymous grading to both
the submission record and the cassandra auditing table. The
grade change audit API was augmented to include this information

finally, added the 'Anonymous' column to the grade change audit
log displays admin tool to display the value of the field
fetched from the API.

closes CNVS-21537

test plan:
 - setup your environment for grade change auditing (requires
   cassandra).
 - check "Grade Change Log" API documentation and behavior for
   the new "graded_anonymously" field.
 - check the behavior of the new "Anonymous" column in the
   "Grade Change Activity" account admin tool.

Change-Id: Ief6c0da2a36986acf8639ba2620820813d2b8047
Reviewed-on: https://gerrit.instructure.com/63815
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2015-10-06 16:20:22 +00:00
James Williams 404c92725a moderated grading speedgrader provisional grade selection
test plan:
* as a moderator for a moderated assignment, should be able to
select provisional grades for publishing from speedgrader

closes #CNVS-23264

Change-Id: Ia7e75e30220ef115ff634c16ad6a360efb2a9fe4
Reviewed-on: https://gerrit.instructure.com/64404
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-06 16:17:37 +00:00
Dylan Ross 9dfe5ed917 speegrader checkbox doesn't save while disabled
this commit prevents users from saving the 'eg_hide_student_names'
user setting when anonymous grading is enabled

test plan
  - go to the speedgrader
  - click settings
  - ensure the 'hide student names' checkbox is not checked
  - go to admin feature options
  - turn 'Anonymous Grading' on
  - return to the speedgrader settings modal
  - save
  - return to the admin feature options page
  - disable 'Anonymous Grading'
  - return to the speedgrader settings modal again
  - ensure the 'hide student names' checkbox is not checked

closes CNVS-22577

Change-Id: Ie5f18a9c21b851c2aea46f769737752814f0fa6f
Reviewed-on: https://gerrit.instructure.com/64491
Tested-by: Jenkins
Reviewed-by: Cody Poll <cpoll@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Dylan Ross <dross@instructure.com>
2015-10-06 16:13:09 +00:00
Pam Hiett 352d4a18de remove reference of ic-brnd-secondary in _variables.scss
Fixes: CNVS-22856

test plan:
- as a user with the old ui navigate to any page and inspect the
  header (dark gray bar at the top)
- it should be referencing #34444f

Change-Id: I5948722370a612b895b6bbe66cc83ecb778d9e4b
Reviewed-on: https://gerrit.instructure.com/64323
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2015-10-06 15:46:45 +00:00
Alex Boyd bb8e93481f Use short message ids in reply to addresses
Fixes CNVS-22730

Test plan:
 - Set up sharding
 - Set up incoming and outgoing mail
 - Create two students
 - Ensure that student 1's notification preferences are set to
   send email immediately after receiving a conversation message
 - Enroll student 1 and student 2 in a common course
 - As student 2, send a conversation message to student 1
 - Open the email sent to student 1
 - Ensure that the reply-to address of the email looks like this:
     ...+5fd8e496846e6bf20f1d2f7cf62812670154be03-1~2@...
   rather than this:
     ...+5fd8e496846e6bf20f1d2f7cf62812670154be03-10000000000002@...
 - Reply to the email
 - Ensure that the reply was posted as a response to the
   conversation message on student 1's behalf

Change-Id: I7f515056d92a2a3ead96bc4baabdd22ec4dd1130
Reviewed-on: https://gerrit.instructure.com/63814
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2015-10-06 15:18:19 +00:00
Colleen Palmer a032030209 Alerts do not meet color contrast requirements
closes CNVS-23377

This changes the global alert notifications in the styleguide to meet our
webaim contrast ratios.

Test Plan:
- Go to /styleguide
- Go to Hightlights & Alerts section
- All colors meet our 3:1 contrast ratio
- Turn on High-contrast mode
- Go back to Alert section in styleguide
- All colors meet our 4.5:1 contrast ratio

UI dev notes:
- I moved bootstrap/_alerts css into our component/_alerts file
- Took out _alerts from the custom_bootstrap file
- Took out some commenting cruft in custom_bootstrap
- Took out .alert-block css since on searching it didn't appear to be used
anywhere
- Took out some of the bootstrap styles on the notifications (border,
text-shadow, and margin); then switched out the colors for our variables
- The "info" alert pulls in the primary color variables, so if customized, that
will pull in custom colors

Change-Id: I95b0ebb3cc833fd252160245e176c5dfeeb001b2
Reviewed-on: https://gerrit.instructure.com/64321
Tested-by: Jenkins
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2015-10-06 14:18:08 +00:00
Dylan Ross 05a9d01ca3 fixes react gradebook js test failures
test plan
  ensure `bundle exec rake js:dev` tests pass

Change-Id: Ifcc54fb52e603251cb9ca4d923d395a3cad5fff1
Reviewed-on: https://gerrit.instructure.com/64605
Reviewed-by: Cody Poll <cpoll@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-10-06 13:13:02 +00:00
Jonathan Featherstone a08ba2fad4 Fixed style issues in post grades lti modal
Fixed a padding and scroll bouncing issues on inner div of post grades
lti modal.

Should be tested with SKYW-2

closes SKYW-19

Change-Id: Ibb56fefdb6f070da88e95a7b9ece4bdae5fae0e4
Reviewed-on: https://gerrit.instructure.com/63531
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Mark Severson <markse@instructure.com>
2015-10-06 00:02:35 +00:00
Jennifer Stern e824c568e0 Improve dashboard loading and view toggle UX
fixes CNVS-22052

Test plan:
* As the dashboard card view loads, you should see ghost images of the cards.
* When you toggle to the recent activity view, it should load immediately.
* If you reload the page, the recent activity view should load.
* If you toggle back to the cards view, it should load immediately.
* If you reload the page, the cards view should load.

Note: this change could result in a slight negative performance impact.
I think that it's worth it for the improved UX when switching views, but
it's something we should look at when testing.

Change-Id: Ib83234a3d955e42cbd1133e8d8634f23184277f4
Reviewed-on: https://gerrit.instructure.com/64040
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2015-10-05 23:34:02 +00:00
Simon Williams 39818ea9e2 lock announcements after CC based on setting
fixes CNVS-23357

test plan:
- run course copies with announcements with and without the course
  setting "Disable Comments on Announcements" being set.
- settings should be correct on copy
- announcement should be appropriately locked/unlocked on copy

Change-Id: Ib75af5ffbdbd4a181d021706139d56ccc8c82214
Reviewed-on: https://gerrit.instructure.com/64126
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-10-05 22:45:01 +00:00
John Corrigan 102c0eebc0 insert space between icon & text for `Button--link` class
fixes CNVS-23799

test plan:$
- Navigate to the ePub export page: `/epub_exports`.$
- Observe that the icon & text are not directly next to each other

Change-Id: I321513919028ec90276ae628878499cac9a32880
Reviewed-on: https://gerrit.instructure.com/64504
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-05 22:16:35 +00:00
Clay Diffrient 25c00a0bc2 Make the 3rd Mark show as the Final Mark
closes CNVS-23275

Test Plan:
  - Make sure that the 3rd mark column on the moderation screen
    says "Final Mark" rather than "3rd Mark"

Change-Id: Id41eb184a69c82800ca754e5b5dff1fae29b2cd5
Reviewed-on: https://gerrit.instructure.com/64490
Tested-by: Jenkins
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-10-05 21:50:59 +00:00
Cameron Matheson 4084f05ae6 more logging around "error establishing firefox connection"
refs CNVS-23355

Test plan:
  * selenium tests should still pass

Change-Id: Ia9cd42a41916c695f68f9823c9b4916ac588a971
Reviewed-on: https://gerrit.instructure.com/64476
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2015-10-05 20:33:33 +00:00
Chris Hart 77752b4d13 (NUI) fix spacing around full-width LTI iframes
Fixes: CNVS-22877

Test plan:

1) Test Commons (a full-width LTI iframe)
- Turn on the Use New Styles feature flag and clear
  your cache
- Make sure you have Commons installed, if you don't
  already
- When you load Commons from the primary nav, it
  should now look like this:
  http://screencast.com/t/XsS5yDpH60
- Repeat in the legacy UI, to make sure nothing
  has changed from production

2) Test an LTI tool that loads in a non-full-width
   iframe, to make sure nothing is broken. Roll Call
   is a good choice. Instructions for local
   installation are here:
   https://gollum.instructure.com/Rollcall
   https://gollum.instructure.com/OtherServiceTestAccounts

Change-Id: I7af2eecc2fda155d78433923b21fb61c81442e0b
Reviewed-on: https://gerrit.instructure.com/64056
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2015-10-05 19:13:17 +00:00
Jennifer Stern 6992b7ea71 (NUI) Highlight Commons menu item in global nav when it's opened
fixes CNVS-22876

Test plan:
This refactors the logic to determine whether a nav item should be
highlighted, so we should test all of the nav items.

Change-Id: I4b60d662b498ae0ee31663b123465e602643d690
Reviewed-on: https://gerrit.instructure.com/64372
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2015-10-05 19:04:36 +00:00
Cody Cutrer 674045addb don't remove compressed files from client app symlinks
Change-Id: Ib26d7865dd68a53e3dc7b6ea424965939c07ca0e
Reviewed-on: https://gerrit.instructure.com/64579
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-10-05 18:40:32 +00:00
Cody Poll 6c30ea57cf Fixing react scrolling issue
Scrolling performance was pretty horrendous. Now it's not.

Test plan:
  This commit touched a lot of different parts of the react gradebook, so it
  basically needs a regression test against how the gradebook was before. Some
  examples include:
    - Column ordering
    - Search for a student functionality
    - Filter by grading periods
    - Adding new grades
    - Editing old grades

fixes CNVS-23053

Change-Id: I0360704f9581775471fc1c0864b7ae863e7a1355
Reviewed-on: https://gerrit.instructure.com/63307
Tested-by: Jenkins
Reviewed-by: Dylan Ross <dross@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cody Poll <cpoll@instructure.com>
2015-10-05 18:26:12 +00:00
James Williams 164ded9695 fixes fragile selenium specs in rails4
fixes CNVS-23369

Test Plan:
-Run build

Change-Id: I15f60901c74fec85782641d06b71f41f0e3d354a
Reviewed-on: https://gerrit.instructure.com/64431
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-10-05 17:24:58 +00:00
James Williams fa2ccc3970 improve moderated grading needs_grading_count with null scores
test plan:
* as a provisional grader for a moderated assignment,
 merely adding a comment (and not giving a grade)
 should not decrement the
 "needs grading" count on the course dashboard sidebar

 closes #CNVS-23758

Change-Id: Ie6fa807f468a58d5429f0c93c360dc4095cd759d
Reviewed-on: https://gerrit.instructure.com/64389
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-05 17:21:43 +00:00
Brad Horrocks d1efaa4004 Dev keys created from site admin shouldnt have an account id
Fixes PLAT-1258

Test Plan:
Go to '/developer_keys' create a dev key.
Make sure it doesn't have an account id associated with it

Change-Id: I8c104e4b1a7b7fe01d4a4d4757e8b3b451775ddd
Reviewed-on: https://gerrit.instructure.com/64236
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-10-05 16:06:36 +00:00
Matthew Berns c3c899112a do not validate allowed extensions if file upload is not a submission option
fixes CNVS-23019

test plan:
- create an assignment and select file upload as a submission type
- enable option to restrict file types and leave field empty
- disable file upload as a submission option
- assignment should let you save without validating for restricted file types

Change-Id: I2c84e4e0261a7ae4176960e004ba1baded6752bc
Reviewed-on: https://gerrit.instructure.com/62867
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-05 15:36:05 +00:00
Cameron Sutter 8ed3c8bf64 no 'correct answer' for surveys
fixes CNVS-22945

test plan:
- while editing  surveys, none of the answer labels should say 'Correct Answer'

Change-Id: I50a958a87dc5e298c2e6384b4d7d2127daf2b7b7
Reviewed-on: https://gerrit.instructure.com/63540
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-05 15:08:17 +00:00
Spencer Olson b57ce34ef6 grading period filtering respects overrides
the grading periods filter in the gradebook and
on the student grades page should now respect
overrides.

closes CNVS-21917
closes CNVS-23235
closes CNVS-22963

test plan:

turn on multiple grading periods and create assignments
with student and section overrides. verify that the
grading periods filtering in the gradebook and on the
student grades page respects the overrides. also verify
that grade cells in the gradebook are 'grayed out' if
the student's override places them in a different grading
period than the currently selected one. finally, verify
that, if a student has multiple overrides, their effective
due date is the most lenient (farthest in the future), and
grading period filtering should be based on that most
lenient date. if a student has an override with no due date,
the submission should be filtered into the 'last' grading
period.

Change-Id: Idd06a0575b155e64a726b29254c2f197d0a83523
Reviewed-on: https://gerrit.instructure.com/63286
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Christi Wruck
2015-10-05 15:01:14 +00:00
Jonathan Featherstone c16e0d6590 Fixed focus issue on assignment add rubric
Previously, clicking the "add rubric" button was opening the rubric
section and setting focus on the title field. Focus is now set on the
"find a rubric" button, which is more intuitive for non visual users.

Test Plan:
  * Navigate to details page of assignment using voiceover / safari
  * Using voiceover, click on the "Add Rubric" button
  * Note that "find a rubric" is now focused

closes CNVS-21404

Change-Id: I19bd5c48f1d2d7fa3eca52c97476367b5165c1fa
Reviewed-on: https://gerrit.instructure.com/63975
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-10-05 14:57:57 +00:00
James Williams dbe56e5233 add requirement_count to course copy
test plan:
* create a module with some required module items
* set it so students only need to "Complete One Item"
* copy the course
* the "Complete One Item" setting should be retained

closes #CNVS-23713

Change-Id: I7f113d34b2247c13c9984124c2364a6fece878b6
Reviewed-on: https://gerrit.instructure.com/64496
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-05 13:00:10 +00:00
Dylan Ross c953e011ea fixes set group weights regression
this commit also adds title attribute to assignment
groups cell

closes CNVS-23746

test plan
  - open set weights dialog
  - change some assignment weights or toggle
    the 'weight final grade based on groups toggle'
  - save
  - ensure grades are reflected in the gradebook

  - ensure hovering over an assignment
    group shows the score of the assignment group
    divided by the points possible. For example,
    "10 / 15"

Change-Id: Iad384fd0be0a424c3bf779a650f559f621402b5f
Reviewed-on: https://gerrit.instructure.com/64317
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Dylan Ross <dross@instructure.com>
2015-10-02 20:57:08 +00:00
Simon Williams 5b9497d77a re-include session_id in logs
Rack generates a session_id internally which we like to include in logs
for tracking requests. This session_id wasn't getting picked up by out
log wrapper because of interdependencies in the middleware call stack
and bugs in rack/rails. Read on for details:

See the order of the middleware stack by running: `rake middleware`

The main players in this saga are:
- RequestContextGenerate middleware
- session store middleware:
    ActionDispatch::Session::EncryptedCookieStore <
    ActionDispatch::Session::CookieStore <
    Rack::Session::Cookie <
    Rack::Session::Abstract::ID
- Rack::Session::Abstract::SessionHash

How to intercept the session_id:

The Rack session_id is generated lazily the first time the SessionHash
(which is a thin wrapper around a ruby hash) is read from or written to.
This needs to happen after the session has been loaded out of the cookie
by the session store middleware, which happens after our
RequestContextGenerate middleware.  We don't just want to move the
generation of the request id later, because then the first couple log
lines will not tagged with a request id.

So our idea was to capture the session_id in an un-encrypted cookie that
could be read early in the middleware call stack (which is fine to be
public, and only used for logs to not a big deal if it's tampered with).
Again, this happens lazily on first access, so our best bet is to catch
it on the way out of the middleware stack.  But when
RequestContextGenerator returns it's already too late, because cookies
have already been written to the header.  So we introduce a new
middleware that captures the session_id, writes it to a cookie, and then
modify RequestContextGenerator to read from the cookie.

This works great except that with this setup, after a log in attempt the
redirect after login would still be logged with the old "unknown"
session_id and not the new, logged-in session_id.  When a session is
cleared (what happens at log in time), ActionDispatch implements
a `reset_session` that we call, which calls session.destroy, but rack
had not implemented session.destroy, so rails patched it, but then after
calling destroy, they reset the session to a plain hash (not
a SessionHash), so an id isn't generated until the plain-hash session is
written to the cookie, which happens AFTER our new middleware finishes
in the stack (and never sets it in the place we look for it).

Rails 4:

Rack internals changed somewhat between rack-1.4 and rack-1.5 and the id
moves from being stored in the session options hash to the main session
hash.  We'll need to fix this for rails 4.

A better way:

It may be better to try to keep a handle on the actual SessionHash so
that we can dynamically load the id for log lines, and pick up id
changes immediately as they happen, mid-request. We'd have to make sure
the lookups weren't too expensive though, vs just saving a string.

fixes CNVS-15259

Test plan:
- start a server, make a request
- you should see log lines start with [session_id, request_id] and
  session_id should be present, not just "-"

Change-Id: I0289db255b2b0bc3b118e32fc1d0d9381455b1ec
Reviewed-on: https://gerrit.instructure.com/64092
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-10-02 19:33:50 +00:00
Ryan Taylor f4dd0b6440 Fixes a pesky error on live reloading in dockerized Rails 4
Prevents "A copy of LoadAccount has been removed from the module tree
but is still active!" on any changes to app/* code.

Change-Id: Ie539f99bc44c330902ab7c8f4abcd7d698d64f1f
Reviewed-on: https://gerrit.instructure.com/63718
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-10-02 19:31:27 +00:00
James Williams 1df0ef3bd1 add "access_restricted_by_date" field to courses api
test plan:
* restrict a student from viewing a course using
 course dates
* the courses api should return "access_restricted_by_date"
 for that course

closes #CNVS-22905

Change-Id: I5d5eada2e685ed18fd9ecbe474493c01818297ee
Reviewed-on: https://gerrit.instructure.com/63074
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-02 19:20:49 +00:00
James Williams f55725ae4c disable user/course search forms for accounts after submitting
stopgap measure to keep someone from calling the search page
over and over again

test plan:
* account user and course search (e.g. the "Find a User"/
"Find a Course" searchboxes on the right hand side of
 account pages) should be disabled and show an indication
 that they're loading a new page when submitted

refs #CNVS-23230

Change-Id: I41d765bd4a033885abd305093920fe7e0223a79b
Reviewed-on: https://gerrit.instructure.com/64336
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-02 18:48:54 +00:00
Ryan Taylor 955f9097c8 Closes N+1 query dependency for quiz submissions
Excludes a particularly expensive calculated attribute from the
calculations required for API index operations.  No known conflict here,
as this functionality was originally added when EMBER quizzes was being
built.

Closes CNVS-23388

Test Plan:
  - Confirm that all quiz submission API and UI interactions are
    unaffected.

Change-Id: Ic71c46fcf377ebc935dbc827dd1cf3be6726f0c0
Reviewed-on: https://gerrit.instructure.com/63776
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-10-02 18:40:07 +00:00
Clay Diffrient 4f3dd64ffe Make grade column reflect the selected provisional grade
closes CNVS-23035
closes CNVS-22917

Test Plan:
  - Set up a moderated grading environment
  - Make sure there are at least 2 provisional grades for a student
  - Selecting between the radio buttons for that student should
    update the grade column

Change-Id: I9af9ee94cc0815a350b883c5618b63034500f950
Reviewed-on: https://gerrit.instructure.com/64284
Tested-by: Jenkins
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-10-02 18:07:47 +00:00
Dylan Ross 544fae839b speech recognition icon displays in chrome
the speech recognition icon displays beneath
the add comment text area in speedgrader when
viewing the speedgrader in chrome

closes CNVS-23408

test plan:
  - in chrome, go to speedgrader
  - verify the speech recognition icon displays
    below the add comment text area

  - in safari, go to speedgrader
  - verify the speech recognition icon does not
    display below the add comment text area

Change-Id: I2f3f7147fe8464ad40f3340fd4fd70aeca2f377a
Reviewed-on: https://gerrit.instructure.com/64435
Tested-by: Jenkins
Reviewed-by: Cody Poll <cpoll@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Dylan Ross <dross@instructure.com>
2015-10-02 17:07:59 +00:00
James Williams 34cbc4cd43 moderated grading speedgrader final mark drop-down
test plan:
* create a moderated assignment with student submissions
* add the students to the moderation set

* as a moderator (teacher) go to speedgrader

* should be able to create
 a 2nd mark or a final mark through the drop-down

* should also be able to copy the 1st or 2nd mark
 as a final mark (and should get a warning if there
 already is a final mark)

closes #CNVS-23262

Change-Id: Ie51f378a8665ba78204ca65bb65f4286ada5337d
Reviewed-on: https://gerrit.instructure.com/64105
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-02 15:58:52 +00:00
Jennifer Stern a401d84e31 Fix fragile dashboard card spec
The tests were clicking on the icon element, whereas clicking
on the link element should be more stable. The changes in this
commit were required to add unique css classes to the link elements
to use as hooks in the selenium test.

fixes CNVS-23725

Change-Id: I581554f32a700d918454b76a78f8ab5b4c48d5d5
Reviewed-on: https://gerrit.instructure.com/64235
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
2015-10-01 21:52:38 +00:00
Matthew Berns bb7d6557eb add module sorting to epub
closes CNVS-21801

this adds module sorting functionality to ePub generation

to generate via console
- already have an .imscc file from an exported course
- in rails console
  ContentExport.include(CC::Exporter::Epub::Exportable)
  ContentExport.last.convert_to_epub  (for module sorting)
  ContentExport.last.convert_to_epub({sort_by_content: true}) (for content sorting)

Change-Id: Ie82db12a551ff338d616162211fa7bafcd9f29fe
Reviewed-on: https://gerrit.instructure.com/62681
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-01 19:59:17 +00:00
Jeremy Stanley 94eda6a3f9 spec: fix fragile "should validate numerical input" spec
Change-Id: Ic0a99893c9ba0d3afdb685d1bdd3cb89fb5d7ef4
Reviewed-on: https://gerrit.instructure.com/64408
Reviewed-by: Brian Finney <bfinney@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-01 18:27:14 +00:00
Josh Orr ad78d4c94e Enable self registration through api without a bearer token
Adds the following endpoint:
	POST api/v1/accounts/1/self_registration

Fixes MBL-4838

Test Plan:
1.  Enable self-registration on the test domain
2.  Call the above endpoints with all of the params necessary to create a user but without any bearer token.
3.  Ensure that user was created properly

Change-Id: Ia768516fec4f1dc8c55222375c9e26c9905e1ad8
Reviewed-on: https://gerrit.instructure.com/64064
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Josh Orr <jgorr@instructure.com>
2015-10-01 17:35:44 +00:00
Rob Orton 1400746cd7 change auth_filter from string to text
fixes CNVS-21313

test plan
 - db:migrate should pass

Change-Id: I0f61ad9d71a6d3fc4c5d31ecffa685bb7f699000
Reviewed-on: https://gerrit.instructure.com/64008
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2015-10-01 17:18:37 +00:00
Rob Orton 075c90cbad expand external_feed_entries urls to text
fixes CNVS-23676
refs CNVS-17774

test plan
 - db:migrate should work

Change-Id: I13633c077e2f1c0b9b9df521dc8942c9c87d0aa3
Reviewed-on: https://gerrit.instructure.com/64091
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2015-10-01 17:18:32 +00:00
James Williams 4ff8b7368e spec: fix gradebook_history_api_spec fragile failures
`date_string` collides with a method in text_helper

Change-Id: If7ab88a2abe5a0d890ae0b04059e92ad67b3be4c
Reviewed-on: https://gerrit.instructure.com/64319
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-10-01 16:07:53 +00:00
James Williams b68d3ca458 always allow students to progress in unlocked modules
even if they no longer have fulfilled the modules
 prerequisites (i.e. a requirement was added after
 the fact but the user was not relocked)

test plan:
* create two modules
* make the first a prerequisite for the second
* add a required module item to each

* as a student, complete the first module to unlock
 the second module
* as the teacher, add another required item to the first module
 but do not re-lock the modules (so module 2 should stay unlocked
 for the student)

* as the student, should be able to complete the second module
 even though the first one is now no longer complete

closes #CNVS-23640

Change-Id: Ic0c4c744d446ed0487172f819beafd186d335a09
Reviewed-on: https://gerrit.instructure.com/64316
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-01 12:42:25 +00:00