Commit Graph

2250 Commits

Author SHA1 Message Date
Ryan Shaw d2a80c5fc7 send ie9 to the "not supported" page we send ie8 to
refs: CNVS-28781

...and remove fancy conditional comment
thing that adds the .ie & .ie9 classes to the page.
And now that we know that IE9 will never be using
the site, remove some css that specifically targeted it

test plan:
* try go to to canvas in ie9,
* it should redirect you to a "not supported" page

Change-Id: Ia4e020afeebe13bad730d7591736fd4e141bf387
Reviewed-on: https://gerrit.instructure.com/77318
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Tested-by: Jenkins
2016-05-06 19:28:52 +00:00
Steven Burnett 79fa758339 Fix right side scroll issues
closes: CNVS-26493

For some pages like Syllabus, in legacy the right side would stick to
the bottom of the page as you scroll large content. In new ui, we
disable this, and the sidebar sticks to the top, no matter its content
height.

Test Plan:
- See ticket for full test setup
- Go to Syllabus with long content, long sidebar, see how you can
now scroll down the page just fine, no jumping
- Go to Syllabus with short content, long sidebar, see same
- Legacy UI remains the same

Change-Id: I746f6c6e41865e5cd20b96bf3e7a518190055294
Reviewed-on: https://gerrit.instructure.com/78098
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
2016-05-05 23:25:09 +00:00
Amber Taniuchi ce5935df72 add a11y flash message for what-if grade changes
Previously on the Grades page of a course, if a student
using a screen reader clicked on the 'Show Saved "What-If"
Scores' button, there was no indication that anything on the
page had changed. The same happened for the "Revert to Actual
Score" button (which appeared once the "Show Saved" button
was pressed). Now there is a screereader-only flash message
that is read to indicate scores have been changed to reflect
what-if scores/original score. Focus should also be returned
to the what-if/revert button on the right pane.

fixes CNVS-27858

Test Plan:
1. Using VoiceOver in Safari, navigate to the Grades page
of a course as a student
2. Click on the "Show Saved 'What-If' Scores" button on
the right
3. The screenreader should now read "Grades are now
showing what-if scores"
4. Click on the "Revert to Actual Score" button
5. Screenreader should now read "Grades are now
reverted to original scores"
6. Ensure each time the buttons are clicked that the
focus is set back onto the button.

Change-Id: Iad31491a4de08cd3a16444c398b2e87373d6a95f
Reviewed-on: https://gerrit.instructure.com/76192
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Tested-by: Jenkins
2016-05-05 23:04:26 +00:00
Ethan Vizitei 72735330ad Keep eportfolio content on rce save
fixes CNVS-29066

TEST PLAN:
 1) use remote RCE
 2) edit eportfolio with rich content
 3) save eportfolio
 4) refresh eportfolio
 5) edited content should be present

Change-Id: I86b1cd058fcd51c4838f6c82fbf6f73975f1fd85
Reviewed-on: https://gerrit.instructure.com/78678
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-05-05 15:58:32 +00:00
Ryan Shaw d2db8a3692 fix some JS array iteration that was using for..in
all of these were iterating over an array using a
for...in loop. they should all be using normal
index-based array iteration. it was causing specs
to fail in chrome 50

test plan:
with latest chrome installed,
run bundle exec rake js:test
it should work

Change-Id: Icc8c6dae460f57a0008cf49565bf9ff0a0a96d38
Reviewed-on: https://gerrit.instructure.com/77906
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-05-05 00:06:27 +00:00
Davis McClellan 42e96465ab Fix the issue where firefox won't delete the access code
fixes CNVS-24622

test plan:
use case 1
- make a quiz with multiple attempts and an access code
- enter the access code, take and submit the quiz
- attempt to take the quiz again
- notice that the access code is requested again
use case 2
- make a quiz with multiple attempts and an access code
- enter the access code, and start the quiz
- navigate away from the quiz
- resume the quiz
- notice that the access code is requested again

Check on all supported browsers, each browser treats this issue
slightly differently. It never can be easy can it?

Change-Id: I31ade2501fc20945b8ff13f7f5a5071aca6d896e
Reviewed-on: https://gerrit.instructure.com/73582
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2016-05-03 16:44:56 +00:00
Joel Hough 1415d7bc7d render calendar events as paginated data is fetched
fixes PFS-3691

note that the event source caching does not update as pages are fetched
 so switching between calendar pages while pages are fetching clears any
 already loaded events and effectively reverts to unpaginated rendering.

the changes to fullcalendar are unfortunate but if they are removed (in
 an upgrade, for example) then the calendar will revert to unpaginated
 rendering. also, the api is unchanged for anyone who does not want to
 use paginated rendering.

test plan
- have enough calendar events to have multiple pages of them.
 default page size is 50, but you can set per_page in the
 render_events_for_user Api.paginate call to lower that for
 testing
- view the calendar
- ensure that events are rendered as the pages are fetched. you
 can add a sleep statement to the calendar_events_api index action
 to make page loads more obvious for testing.
- regression test calendar

Change-Id: I758dfc0eda7f3ec93bcf1b9401b1024e8a8c6303
Reviewed-on: https://gerrit.instructure.com/74029
Reviewed-by: Kacey Roberts <kroberts@instructure.com>
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2016-05-03 16:08:56 +00:00
Michael Brewer-Davis ca63fdc0e4 add temporary conditional release popup to assignments
refs: CYOE-74

Test plan:
View conditional content on assignment, quiz, and discussion topic
edit pages.
- Button should be disabled before assignment has saved (though some
  assignments save before first edit)
- Button should be enabled after save
- Clicking button should bring up a modal (with an error page loaded
  in it)
- For discussion topics, saving here means "saved as a graded topic"

Change-Id: I3faed62567488c71067f94ff911b57ca71de9648
Reviewed-on: https://gerrit.instructure.com/77677
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
Reviewed-by: Christian Prescott <cprescott@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2016-05-03 16:00:24 +00:00
Derek Bender b1a0da0fb6 show inactive warning in speedgrader
closes: CNVS-28428

Test Plan:
  - create two enrollments, one of which is inactive
  - given an assignment in speedgrader, the inactive student has
    the following message: "Note: This enrollment is inactive"

Change-Id: I56dedc33d8f4562bbac3e3250aa27db9fa471f97
Reviewed-on: https://gerrit.instructure.com/77142
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2016-04-28 22:28:28 +00:00
Jon Jensen 393bc22317 make on-the-hour time formats the same in js <-> ruby
fixes SD-1051

some places in JS (handlebars) were already consistent w/ ruby, others
were not. now if the time is on the hour, we omit the minutes everywere
(e.g. 1pm, not 1:00pm)

also fix most (all?) brittle specs that fail on the minute, hour, at
midnight, around DST, and at/near the new year ... 30+ are fixed by virtue
of this change alone, others required a little more TLC.

problematic specs were uncovered by freezing and/or traveling time to
interesting timestamps (see earlier patchset builds w/ timecop and
timecop.js).

note that some spec changes weren't technically necessary (many of the
format_date_for_view), but they are being tweaked regardless so we can
add a linter to discourage strftime calls in specs.

test plan:
n/a, see specs

Change-Id: I9edd65226ff37f9a3d94e2e03e1a01ab36aad639
Reviewed-on: https://gerrit.instructure.com/77295
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-04-27 16:23:32 +00:00
Ethan Vizitei 1acd4412ef make a top level reference to QuizTakingPolice
fixes CNVS-28931

TEST PLAN:
 1) build a timed quiz
 2) take quiz in Chrome 50
 3) timer should work

Change-Id: I93d8f591197bd7d1efed5ef13fba0df44abca3f1
Reviewed-on: https://gerrit.instructure.com/77932
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-04-26 03:30:32 +00:00
Cody Cutrer 1a8f9f4bbb centralize locale conversions to locales.yml
refs CNVS-28112

test plan:
 * translations should still be correct, especially check
   - date and time pickers
   - calendar
   - RCE

Change-Id: I283c7eb1ee24bca3878ae331b8419379bef434db
Reviewed-on: https://gerrit.instructure.com/74823
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-04-25 22:46:30 +00:00
Clay Diffrient 9caa6b43e2 Remove react-router library
The library is no longer used anywhere in Canvas. This commit
strips the library and any remaining artifacts of its use
from the codebase.

closes CNVS-28551

Test Plan:
  - Automated tests pass
  - Files/External Apps still work

Change-Id: I2917d4d36e1fbbb4f94fff34b4344ecb47e81593
Reviewed-on: https://gerrit.instructure.com/76658
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-04-25 18:38:15 +00:00
Jon Jensen 2a7750197f spec: don't eat formSubmit errors in test/development
let the js error propagate up so we can fix any bugs; if/once no specs
fail, we should remove the try/catch altogether

this should hopefully help track down the new intermittent failures in
./spec/selenium/profile_spec.rb:174

Change-Id: Ie5111d971530979c78e10a5c2b574687c5994b18
Reviewed-on: https://gerrit.instructure.com/77756
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-04-22 23:58:59 +00:00
James Williams 12bd2627ab remove float rounding monkey-patch
used to turn 1.0.to_s to "1"

closes #CNVS-28310

Change-Id: I79106a4c0b42fe9b6d96097aaf9dd28a43024373
Reviewed-on: https://gerrit.instructure.com/75194
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-04-22 18:17:18 +00:00
James Williams eed3401759 remove a bunch of unused front-end files
not a comprehensive list by any means, but these were
the ones that stood out

refs #CNVS-27773

Change-Id: I209d983155e740fe1990b8fc4b1a10167eb149d6
Reviewed-on: https://gerrit.instructure.com/75134
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-04-21 20:36:15 +00:00
Ryan Shaw 80a7fb0941 remove "Tour" functionality. nothing used it.
closes: CNVS-28669
refs: CNVS-28781

Back in 2013 we came up with an awesome idea to have these
"Tours" to introduce new features and stuff. It was a
great idea but we don't use it anymore. it has been commented
out so it doesn't show up in the styleguide and all but one
(see below) were commented out of config/tours.rb.
so in the interest of not letting code hang around
that we don't use, I'm removing it (unless anyone is opposed
or has a good reason to leave it). If we want to do it in the
future, we can just add it back, because yay Git!

There was one place in quizzes that was still trying to
use a tour. if you go to create a quiz and edit a question
and then pick another option as the correct answer for a
multiple choice question it would try to show a tour telling
you that you could regrade all the existing submissions. but
in reality it just threw a javascript error and the tour never
popped up. So even though it was still in the code, it didn't
work. Since no one noticed that it stopped working, I'm assuming
we don't need it any more. Quizzes team and quizzes
product/QA, will you confirm this is ok?

test plan:
* no tours should show up anywhere in canvas
* read that paragraph above about the "regrade existing"
  thing in quizzes.
* try that feature, it should work but no tour should show up
  and no error should occur in the console

Change-Id: Ib2d6bbb80f93fd7ca0a33d20c1f57ee16e7027ea
Reviewed-on: https://gerrit.instructure.com/76875
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-04-21 18:25:05 +00:00
Clay Diffrient a554a5bd5b Merge branch 'rutger1413-master' from https://github.com/rutger1413/canvas-lms
Reviewed-on: https://gerrit.instructure.com/77488
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>

Change-Id: I8bbeca313f9106190d5de20c543d4f06c1b8aa8f
2016-04-21 10:26:05 -06:00
Jeremy Neander 7f7510b481 use a button for "Show All Details" on Student grades
When a screen reader user logged in as a student navigates to the Grades
page of a course and focuses on the "Show/Hide All Details" button, it was
previously read as a link. It should be read as a button. This change
implements that.

closes CNVS-28045

test plan:
1. In Safari with VoiceOver enabled, log in as a Student
2. Navigate to the "Grades" page of a Course
3. Move VO focus to the "Show All Details" button
4. Verify that the button is read as a button

Change-Id: I7b7a86194c11eb97a237879c3d607c1170b35944
Reviewed-on: https://gerrit.instructure.com/75890
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2016-04-20 16:27:48 +00:00
Jeremy Stanley 460ae7a64f fix linking to a specific module with previous modules collapsed
test plan:
 - do the following as a teacher enrolled in a course:
  - have a few screenfuls of modules in a course
  - collapse one or more early modules
  - link to a later module in a wiki page or something
  - follow the link and ensure the target module is visible

previously, the target module could be scrolled out of view
when earlier modules in the list get collapsed.  this commit
forces the page to (re-)scroll to the target module after
we collapse modules.

fixes CNVS-28750

Change-Id: I06e8164ced5b84d4ea0a88028a29d989c378458e
Reviewed-on: https://gerrit.instructure.com/77296
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-04-19 16:00:20 +00:00
Jeremy Stanley e8fffc8381 fix localized dates in global announcements
test plan:
 - set your account locale to something other than English
   (say, Spanish)
 - create a global announcement and enter localized start/end dates
   (e.g., "1 Enero 2017", "28 Julio 2017")
 - ensure the creation succeeds and the dates are as expected

fixes CNVS-28439

Change-Id: If27cb6160d364a5bf310ea42446f9bfed916eeb2
Reviewed-on: https://gerrit.instructure.com/76736
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-04-18 20:28:44 +00:00
Clay Diffrient 95bcd321ba Convert files to use page.js instead of react-router
This keeps our routing layer independent from our view
layer, thus shielding us from changes in the view layer
affecting the routing layer and vice versa.

closes CNVS-26296

Test Plan:
  - Regression test everything in files, because this
    seriously touches every aspect of files

Change-Id: I127623569cb3a63be0b29ab7ecd0e9051a960558
Reviewed-on: https://gerrit.instructure.com/76267
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-04-18 18:16:46 +00:00
Pam Hiett 8f3363ae2c fix course favorite "icon-star-light" for windows users
Fixes: CNVS-28725

test plan:
- as a user with the new UI using a windows machine (any browser)
- navigate to "Courses" in the left-hand nav
- select "All Courses" from the sub-nav
- there should be an obvious difference between items that have
  been favorited vs those that have not (ensure the deliniation
  remains when turning on "high contrast")

Change-Id: I6bc9b2eca4a7524e0e5e0f82727875e7dc9442ae
Reviewed-on: https://gerrit.instructure.com/77090
Tested-by: Jenkins
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Pierce Arner <pierce@instructure.com>
2016-04-15 17:04:36 +00:00
Clay Diffrient 59e8291196 Scope RCE toggle while taking quizzes to current RCE
This makes it so not all RCE instances get toggled when
clicking on the HTML mode link.

closes CNVS-28676

Test Plan:
  - Set up a quiz with multiple essay type questions
  - Preview the quiz
  - Toggling the HTML/RCE mode on them should only affect the
    RCE it is next to, not all of them.

Change-Id: Ia93d7f4842315112528114f3742cfb2a99903ea2
Reviewed-on: https://gerrit.instructure.com/76899
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-04-12 21:43:03 +00:00
Clay Diffrient 68ec842ceb Add HTML mode toggle to quiz essay answers
closes CNVS-28225

Test Plan:
 - Create a quiz with an essay question
 - Take that quiz
 - There should be a toggle link to switch between
   RCE mode and HTML mode.
 - Toggling between the two should work
Change-Id: I06bfad7a01deeb13293bbae4c748337ca1797d17
Reviewed-on: https://gerrit.instructure.com/76485
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2016-04-11 19:48:45 +00:00
Tim B 97b89d6362 Remove iframe size limit on frame resize 2016-04-08 09:59:14 -04:00
Cameron Matheson 646f1080b0 fix accessibility issues with "message students who"
fixes CNVS-28203

Test plan:
  in srgb, check the message students who feature:
    * the "out of" field (scored more than/less than) should include
      the points possible in its description
    * when buttons are disabled, they should still be focusable (and read
      by the screenreader)

Change-Id: Ibd06f9ef2286c5993673f2f07e1b24cda8c4f166
Reviewed-on: https://gerrit.instructure.com/75373
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2016-04-05 21:21:34 +00:00
Cody Cutrer 1d307dfa5e remove deprecated languages
Change-Id: I1f3173565cb74b1e356ab84f757793ddb602dc6f
Reviewed-on: https://gerrit.instructure.com/57152
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-04-04 19:34:18 +00:00
Ryan Shaw 019f8895fa don't swallow JS errors in production.
closes: CNVS-27680

this chunk of code effectively makes it so we
swallow all js errors in production, so you
never see the error in the web developer console.
that's kinda lame if you are trying to debug things
and figure out what went wrong.

I found this while trying to look for problems with
the webpack build. if I looked at the "console"
tab of the developer tools, nothing would show up
but if I had the js debugger turned on and open in the
"script" tab it would.

does anyone know why we do this? can you think
of a good reason to leave it there?



test plan:
* do something that causes a javascript error
  (like having the canvabadges turned on with webpack,
  sorry I can't think of an easier way to do it)
* if you have the chrome developer console open,
  you should see the error.

Change-Id: I3e8ab3d5876b48c807a22777048a25e0f7f6d522
Reviewed-on: https://gerrit.instructure.com/73240
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-04-01 22:39:44 +00:00
Cody Cutrer 8b2e35d76c remove unused SSO buttons
SCIM was never implemented, and FB is an incorrect alias of facebook

Change-Id: I07fcbae975b1418aedc5396b7ca4e8b2b41a3612
Reviewed-on: https://gerrit.instructure.com/75778
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-04-01 02:46:34 +00:00
Jeremy Stanley b82ff5a867 fix editing LTI assignment submissions
test plan:
 - have a course with an LTI tool installed
 - create an assignment:
   - set its submission type to 'external tool'
   - click 'Find' in External Tool Options
   - select or enter a tool URL
   - click 'Select' and ensure the dialog closes
     and the URL is populated on the assignment settings page

fixes p2 spec "external tool assignments should allow editing",
whose failure exposed this bug

fixes CNVS-28344

Change-Id: Ie85f01f86b890089f01566ae70ba5fd9729817bf
Reviewed-on: https://gerrit.instructure.com/75768
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
2016-03-31 14:51:15 +00:00
Ryan Shaw f725bcf813 remove 'firebugx.js'
closes: CNVS-28272

This was just here because ie <=9 did not have a 
'console' object on the window. so doing any 
console.log(...)s would throw errors. all the 
browsers we now support don't have that problem

test plan:
load our site on the lowest IE version we support.
it should work

Change-Id: Ib4505fc8661eae966250c599f8789e0fd8e050b6
Reviewed-on: https://gerrit.instructure.com/75264
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-03-30 22:25:58 +00:00
Jacob Fugal 79861cf20d clean up RCE abstraction layer and service sidebar
refs CNVS-26704, CNVS-26707

RichContentEditor and RceCommandShim:

* move risk level management all to the server side; just one flag in JS
  is set contextually in the server response based on server chosen risk
  level for the page

* flatten the RichContentEditor and RceCommandShim modules to singleton
  method collections, rather than instances

* add RceCommandShim.focus and .destroy methods that more gracefully
  divide the implementations vs. just using send(target, 'focus') or
  send(target, 'destroy')

Editor Loading and Focus

* replace attachSidebarTo calls -- which always (see one exception
  below) paired with a loadNewEditor call -- are replaced with the
  focus:true option to loadNewEditor. when on, the editor is explicitly
  focused after load; it no longer turns on tinymce auto_focus

* on internal tinymce events that trigger 'editor_box_focus' events,
  explicitly focus the editor. this was an attachSidebarTo call (the
  exception) only registered for quizzes, but now more generally.

Editor Destruction

* replace callOnRCE(target, 'destroy') and target._removeEditor() calls
  with new RichContentEditor.destroyRCE(target). destroys the editor as
  before, but does so through new RceCommandShim.destroy and also hides
  sidebar (so no need for explicit hideSidebar calls, which only ever
  accompanied editor destruction)

Sidebar

* add remoteSidebar.show() and remoteSidebar.hide() polyfills

* separate sidebar abstraction into Sidebar module. public interface is
  still through RichContentEditor: initSidebar calls Sidebar.init and
  show/hide are only called from RichContentEditor implementation in
  response to editor focus and destruction.

* allow registering callbacks during initSidebar for when the sidebar is
  shown/hidden. so the desired action doesn't have to be coupled with
  individual calls to loadNewEditor and destroyRCE.

* ensure initSidebar, when present, precedes loadNewEditor. so if
  there's going to be a sidebar, it's initialized before the editor load
  tries to show it.

* add initSidebar calls to discussions/Reply.coffee and
  editor/EditorToggle.coffee so that they get automatic focus, sidebar
  show on editor load, and sidebar hide on editor destruction,
  previously provided by util/wikiSidebarWithMultipleEditors.coffee.

* cache wikiSidebar elements as soon as initSidebar is called, rather
  than waiting for domready, so that initSidebar doesn't have to be in a
  domready itself.

Miscellaneous

* replace calls of target._justGetCode() and target._setContentCode(...)
  with RichContentEditor.callOnRCE(target, 'get_code') and
  RichContentEditor.callonRCE(target, 'set_code', ...), respectively

* remove a dead legacy bundle and d dead module only used by that dead
  bundle

* clean up dependencies to remove unnecessary references to wikiSidebar,
  compiled/tinymce, and tinymce.editor_box outside of the abstraction
  layer or legacy-only code.

* fix idGenerator fragile spec bug

test-plan:
  there should not be significant changes in _what_ the RCE or sidebar
  does. but significant changes in _how_. so no new features to test,
  but a thorough regression on RCE and sidebar behaviors is probably in
  order (sorry)

Change-Id: I4e0cbcb3dcb28152750bf9267d795a179822a601
Reviewed-on: https://gerrit.instructure.com/75469
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-30 18:03:24 +00:00
Jeremy Stanley 23a86b27c6 sync aria-disabled with css style in add-module-item dialog
test plan:
 - the "Add Item" button should have aria-disabled=true
   when it is visually disabled because no content is selected

fixes CNVS-28198

Change-Id: I995dc2df7e792325be153cea2115539e837591c4
Reviewed-on: https://gerrit.instructure.com/75561
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-03-30 14:40:35 +00:00
Jon Jensen f924d80fc6 fix arrows for user-generated incorrect answers
fix a regression in a38da13. this fix will make
`rspec ./spec/selenium/quizzes/quizzes_teacher_questions_spec.rb:16`
stop failing (it currently fails once on most builds)

also remove unnecessary html-escaping introduced in that commit

test plan:
1) Create a new quiz with the type 'Graded Survey'
2) Add a multiple choice question to the survey
3) Take the survey as a student
4) As a teacher, view the student's submission in
   Speedgrader.
5) Verify there is no 'Correct Answer' flag next to
   any of the radio buttons on the multiple choice
   question
6) Repeat steps 1-4 but make the quiz with a type
   of 'Graded Quiz'. Also make sure that you select
   an _incorrect_ answer when taking the quiz. Verify
   there _is_ a 'Correct Answer' flag and an 'Incorrect
   'Answer' flag on multiple choice questions.

Change-Id: I9c9cd9ad8d9deabc9484efb8928a306305750280
Reviewed-on: https://gerrit.instructure.com/75587
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2016-03-29 20:27:11 +00:00
Pam Hiett 57d9781b4a fix contrast for course listing favorite icon
Fixes: CNVS-27871

test plan:
- as a user with the old and/or new ui
- navigate to the course listing page /courses ("all courses")
- there should now be an outlined version of the star and once
  clicked it will fill to a solid golden
- example: http://screencast.com/t/g1vpLc78NSbZ

note:
- product design asked that the dashcard cog icon be swapped
  out for the paper/pencil icon so that was addressed on
  this ticket as well (http://screencast.com/t/hKw3AHLi)

Change-Id: Iab9048db7bfd8a8ec3672cc00a5c50dafd729992
Reviewed-on: https://gerrit.instructure.com/74220
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
QA-Review: Pierce Arner <pierce@instructure.com>
Tested-by: Jenkins
2016-03-29 18:09:42 +00:00
James Williams d36c9aa0a5 fix issues with common cartridge module importing
fixes problem with migration ids having dashes
and not being used on sub-module headers

test plan:
* import the package referenced in the ticket as a
 common cartridge type, with "Select specific content"
* select and import just the first "Week 1" sub-module
* it should work and the imported module should
 include a "Day 1" header at the top

closes #CNVS-27889

Change-Id: I40a9a23cbde7a38c96f097012c8c0c1be3905de6
Reviewed-on: https://gerrit.instructure.com/74223
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-03-28 19:46:10 +00:00
Brian Park 34caff40e3 Add Microsoft Login
Commit from Siimpl

Fixes OI-3, OI-4

test plan:
 * register an application with Microsoft
 * configure microsoft as an authentication source
 * login with microsoft
 * it should complain about a missing user for an ID
 * add that ID to your user
 * login again, it should work
 * delete microsoft authentication
 * reconfigure at /plugins/microsoft
 * add authentication again; this time it shouldn't let you configure the integration
 * login with microsoft again
 * change to email attribute
 * login and it should show your e-mail, instead of an opaque ID
 * change tenant to "organizations"
 * login with a regular Microsoft account
 * it should give an error about not being able to log in
 * login with an organization account (@instructure.com works)
 * it should show your email
 * change tenant to "consumers"
 * login with your regular Microsoft account; it should work
 * login with an organization account; it should give an error

NOTE: Microsoft requires https. so if you're testing locally, and don't have
https, you'll need to change oauth2_controller.rb and add (protocol: 'https')
to both oauth2_login_callback_url calls; during the login flow it will
redirect you back to the app over https; edit the url and connect to
http and it will work

Change-Id: I578df7c2865b8775752ead28a1153918cd24aaa6
Reviewed-on: https://gerrit.instructure.com/72971
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2016-03-28 16:28:39 +00:00
Pam Hiett 804c8cd930 fix contrast issues with turnitin similarity scores
Fixes: CNVS-27384
note:
- this fix does *not* address the actual gradebook
  table/image portion - this will need to be a new
  ticket that is assigned to gradebook team

test plan:
- as an admin/teacher using the old and/or new ui
- ensure you have an assignment set-up using the
  turnitin tool
- as a student submit to said assignment so both
  you as the student and you as the teacher can
  view the turnitin similarity score
- as a student click on the "grades" link in order
  to see which assignments have been run through
  the turnitin comparison tool
  (example in new UI: http://screencast.com/t/UPrWxja90I)
- as teacher click the "grades" link in order to see
  which assignments have a similarity score
  example: http://screencast.com/t/IORJWgjmfcP (*not
  addressed in this area but the following process
  should be addressed)
- from this point the turnitin notification is clickable
  so the score can be seen ... at this point click the
  "more details in speedgrader" text link
- once in speedgrader the turnitin similarity score will
  appear to the right of the grade field example:
  http://screencast.com/t/btZb3iUR9  *note regarding
  examples... to save time from submitting various
  assignments that would fall within the varying score/color
  levels the class names were manually adjusted to show
  the different color combinations
  examples:
    - failure = http://screencast.com/t/K7U3Ep16CpgZ
    - problem = http://screencast.com/t/nnI3Z6TC
    - warning = http://screencast.com/t/cBFmZdpMxMx
    - acceptable = http://screencast.com/t/8dSPqey7zE
    - none = http://screencast.com/t/14o6k62A
    - pending = http://screencast.com/t/qAHsGYKC3

Change-Id: I656bff29050fb765e3bcdd55db1f866e23f498f5
Reviewed-on: https://gerrit.instructure.com/73229
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2016-03-28 16:09:40 +00:00
Jeremy Stanley fb6ff265be add-module-requirement a11y fixes
test plan: in the Edit Module dialog,
 - after clicking the "Add requirement" button, the newly
   added requirement should be focused
 - the dropdown boxes for the requirement subject (left side)
   and the requirement type (right side) should have aria-labels
 - the delete-requirement X button should have a focus
   rectangle in Firefox

fixes CNVS-28199
fixes CNVS-28206

Change-Id: I612e1c2226ffd0c05068116b418876b83f62d2a5
Reviewed-on: https://gerrit.instructure.com/75275
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-03-25 19:37:48 +00:00
Jeremy Stanley b7deacaef1 set aria-hidden=true when closing modal dialog
because aria-hidden=false set by g/24502 overrides display: none
as far as JAWS is concerned

test plan:
 - go to the modules page
 - click the "+ Module" button, then cancel out
 - ensure JAWS doesn't still show the "Add Module" and "Cancel"
   buttons in the now-closed modal

fixes CNVS-26508

Change-Id: I6c103ee242922737d676b5e570dce1f222e58fec
Reviewed-on: https://gerrit.instructure.com/74896
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-03-24 20:19:17 +00:00
Spencer Olson a38da13955 don't show 'Correct Answer' tag for graded surveys
when a teacher is viewing submissions for a graded
survey in speedgrader, there should no longer be a
'Correct Answer' flag showing for multiple choice
questions.

closes CNVS-27084

test plan:
1) Create a new quiz with the type 'Graded Survey'
2) Add a multiple choice question to the survey
3) Take the survey as a student
4) As a teacher, view the student's submission in
   Speedgrader.
5) Verify there is no 'Correct Answer' flag next to
   any of the radio buttons on the multiple choice
   question
6) Repeat steps 1-4 but make the quiz with a type
   of 'Graded Quiz'. Verify there _is_ a 'Correct
   Answer' flag on multiple choice questions.

Change-Id: Id5fe779a476d6602d8dbade88e2167f1ab99f31d
Reviewed-on: https://gerrit.instructure.com/74406
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2016-03-21 15:18:54 +00:00
Robert Lamb f6975caefd Remove unreachable code after return in stripTags
closes CNVS-28152

Test plan: All tests should run without the JS Error:

JS Error: unreachable code after return statement
(http://192.168.1.52:58496/javascripts/str/stripTags.js:20)

Change-Id: I233d7be67f442a644dd9b27133bd4190dc0a5402
Reviewed-on: https://gerrit.instructure.com/74928
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2016-03-19 01:22:22 +00:00
Jacob Fugal f85d668ae9 only pass one editor to callOnRCE at a time
refs CNVS-26704, CNVS-26707

also clarify some of the related code where it was only passing one
editor but _looked_ like it could have been passing more.

test-plan: smoke test RCE in eportfolios

Change-Id: I837c3dd74edba94e158a13fb1999fec7911943c4
Reviewed-on: https://gerrit.instructure.com/74304
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2016-03-18 19:39:03 +00:00
Ethan Vizitei c20a2aaf4d wrap some global utils in RCE flagged shims
closes CNVS-27650

catching all the non-feature specific use cases
to wrap direct "editorBox" uses in our
abstraction layer.

TEST PLAN:
 1) no behavior change
 2) high index of suspicion for testing that plugins work for tinymce
    in a couple different feature areas (embed an equation, embed
    an image, insert a link, those are the ones we touched)

Change-Id: I5e89b6b9b5d437a17a12b804dad77398dea5e32c
Reviewed-on: https://gerrit.instructure.com/73920
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-17 19:00:11 +00:00
Ethan Vizitei 13380ac8fb fix multi-textarea bug in global annoucements
fixes CNVS-28006

TEST PLAN
 1) load global announcements with RCE flag enabled
 2) rce editor should load
 3) should not break functionality of Global Announcements

Change-Id: I3ae8989719646fab4cf3359bdba452f900ef80a3
Reviewed-on: https://gerrit.instructure.com/74476
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-17 17:11:45 +00:00
Ethan Vizitei 7c31ccb92e Quiz Authoring RCE flag
closes CNVS-27648

Start RCE service integration with granular
feature flags for high risk areas

TEST PLAN:
 1) regression test creating/editing a quiz with a question needing RCE entry,
    to make sure we didn't break the normal case
 2) with RCE service in the mix and the RICH_CONTENT_HIGH_RISK_ENABLED
    flag on (the high risk flag), test editing the quiz again
 3) NOTE: the sidebar will be a dummy sidebar for now, we don't expect
that to work fully yet, just to show up when the flag gets flipped

Change-Id: I890d61c5af7c8b3e78ad0632536626d179e4cd54
Reviewed-on: https://gerrit.instructure.com/73910
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-17 15:22:16 +00:00
Ethan Vizitei 39b4757a55 submit assignment RCE flag
closes CNVS-27647

Start RCE service integration with granular
feature flags for high risk areas

TEST PLAN:
 1) regression test submitting an assignment with a text entry
    type
 2) with RCE service in the mix and the RICH_CONTENT_HIGH_RISK_ENABLED
    flag on (the high risk flag), test submitting the assignment
 3)  note there will be no sidebar here.  We expect there to be no
    regressions using the remote editor.

Change-Id: I606a6c4004eea9656b6f4eaf3d883024801f177b
Reviewed-on: https://gerrit.instructure.com/73887
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-15 23:11:46 +00:00
Max Thom Stahl fcd99f9826 Add more accessible icon for post to SIS status
The previous icon for displaying whether an assignment in the
assignments list view is set to post to SIS wasn't accessible for
colorblind people in that it changed color but not shape. This has now
been replaced with a slightly different icon now so that the shape as
well as color change when it is toggled.

Fixes: SIS-1740

Test plan:
    Look at the list assignments view.

    Toggle the "post to sis" button for some assignments.

    The new icon is filled in with a clear "S"; the old icon is not
    filled in with a solid "S". See the Jira ticket for more info.

    Confirm all other accessible cases work as expected

Change-Id: Iff4f9bac77081959fb8c8cfb55181f7b3c9ce46a
Reviewed-on: https://gerrit.instructure.com/72597
Reviewed-by: Jayce Higgins <jhiggins@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Ken Romney <kromney@instructure.com>
2016-03-11 23:47:41 +00:00
Ethan Vizitei adf0fc5736 Quiz-Taking RCE Feature flag
closes CNVS-27646

Start RCE service integration with granular
feature flags for high risk areas

TEST PLAN:
 1) regression test taking a quiz with a question needing RCE entry,
    to make sure we didn't break the normal case
 2) with RCE service in the mix and the RICH_CONTENT_HIGH_RISK_ENABLED
    flag on (the high risk flag), test taking the quiz again

Change-Id: I0b26a246aa3260e1ab40ccd7eee5f8a08729a8fa
Reviewed-on: https://gerrit.instructure.com/73890
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-11 21:36:03 +00:00