Commit Graph

60 Commits

Author SHA1 Message Date
James Williams daef59589d rails4: fix view specs
rails4 removed the automatic initialization of a local variable
matching the name of a partial view
 (e.g. setting `course` to nil in _course.html.erb)

also helper methods are protected so they cannot simply be
delegated to the spec controller anymore

refs #CNVS-21596

Change-Id: I7ce8b8a0084602a93f8ac571ee5c98740cb861d1
Reviewed-on: https://gerrit.instructure.com/58718
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-17 20:41:55 +00:00
Ethan Vizitei 98f1f75bb3 remove dead file
closes CNVS-19321

Was going to make the datepickers here more accessible, but it
looks like this file just doesn't get used anymore (because I can't
turn on "old files" anymore, the featureflag is hard-wired off).

TEST PLAN:
 1) file browsing should not break

Change-Id: I8916cc0d88a1b444b0d7bf3da13856072ec25be0
Reviewed-on: https://gerrit.instructure.com/56572
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-06-17 16:23:25 +00:00
Aaron Cannon ffeec60c8e Accessibility: Improved labeling of many date fields.
Fixes CNVS-15542

Test plan:
- Visit all date picker fields in canvas in Canvas using a screen reader,
  including the following:
  - Calendar
  - Assignments
  - Files
  - Assignment Peer review
  - Quizzes
- Verify that each field's label (as read by the screen reader) makes it clear that the field takes a date.

Change-Id: Ib681168ef571c47994f0f834987d4a5861c7c3a1
Reviewed-on: https://gerrit.instructure.com/47933
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2015-02-18 18:11:11 +00:00
Dan Minkevitch 3f7280a43e Bugfix where student could view unpublished files
Bug Description: If a teacher marked a file in a course
as unpublished, the user could still access that file by
going to their legacy user files /files/:id (show) URL.

fixes CNVS-18256

Test Plan:
* Enable "Better File Browsing" Feature Flag
* Open two browser windows; one as a teacher
  and one as a student in a course that the
  teacher is enrolled in
* As the teacher, go to a course's Files page
* Select a file or upload a new one
* Make sure the file is unpublished
* Preview the file, then copy the number after
  "?preview=" in the URL that's in the address bar
* Go to /files/THAT_NUMBER_THAT_YOU_JUST_COPIED
* You should see a preview of the file
* As the student, go to:
  /files/THAT_NUMBER_THAT_YOU_JUST_COPIED
* You should see a message stating that the file
  is locked

Change-Id: I85759ec4d1642effbfdc98131238338b25ba598d
Reviewed-on: https://gerrit.instructure.com/48020
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-02-02 18:13:19 +00:00
Ryan Shaw 8af0fe3391 fix link to user files when newfiles is turned on
fixes: CNVS-16393

/dashboard/files did the same thing as /files
in old files. we don't want to continue to support
the /dashboard prefixed url and prefer to just
use /files.

test plan:
* with newfiles turned off:
* click your name in very top (next to "inbox settings logout")
* click the "Files" tab on the left
* it should render the oldfiles browsing interface

* now, with: User.find(<your_user_id>).account.enable_feature!(:better_file_browsing)
* do the same thing, and it should render newfiles

* they both should go to /files. not /dashboard/files

Change-Id: Ic18e6d93031b9ebc6798849cadc441c2a664e1f0
Reviewed-on: https://gerrit.instructure.com/44337
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-11-14 16:28:46 +00:00
Cameron Matheson a1f400e754 remove scribd
closes CNVS-13380
closes CNVS-8057
closes CNVS-5156

Test plan:
  * scribd should no longer exist
  * document previews should work in canvadocs

Change-Id: I5ac60c3e986f030c3aea88e32d2992ec7b1c7a08
Reviewed-on: https://gerrit.instructure.com/37895
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-09-11 18:42:15 +00:00
Aaron Cannon 538f1eedc5 Accessibility: Fix and add to heading structure across Canvas
Fixes CNVS-14293

Test plan:
Visit the following pages and verify that each:
- has an unaltered visual appearance
- has exactly one level 1 heading which can be navigated to by screen readers
- When appropriate (I.E. when the length or organization of the page warrents
  it) has lower level headings which can be navigated to by screen readers
- when lower level headings are present, heading levels proceed in order, and
  logically

The following pages should be verified to confirm they meet the above criteria.
  Note that the URL fragments provided may not be reachable on all installs,
  and should be modified appropriately.
- /courses/1/assignments
- /courses/1/assignments/18
- /courses/1/discussion_topics (Sections should be level 2, individual
  discussions level 3.)
- /courses/1/users/prior
- /courses/1/pages/front-page
- /courses/1/pages/front-page/revisions
- /courses/1/assignments/syllabus
- /courses/1/outcomes
- /courses/1/rubrics
- /courses/1/quizzes/11/take?preview=1
- /courses/1/quizzes/11/moderate
- /courses/1/question_banks
- /courses/1/modules
- /courses/1/statistics
- /courses/1/confirm_action?event=conclude
- /courses/1/copy
- /courses/1/content_migrations
- /courses/1/content_exports
- /courses/1/content_exports
- /profile/communication
- /users/2/user_notes
- /courses/1/users/1/usage
- /courses/1/announcements
  - An additional heading can be seen by loading the page when no
    announcements exist.
- /courses/1/pages
- /courses/1/files
- /courses/1/quizzes
- /courses/1/settings
- /dashboard/files
- /courses/1/outcomes/users/1

Change-Id: I26d7dba115105c36026758cf55644139116224ec
Reviewed-on: https://gerrit.instructure.com/37669
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-14 19:57:43 +00:00
Jeremy Stanley 636b06fd28 use the draft state sequence footer for files, tools, links
test plan:
 - create a course with each type of module item
   (assignment, quiz, file, page, discussion, external url,
    and external tool)
   (and put the file into the sequence in two places)
 - with draft state off, ensure the old module item sequence footer
   appears and works properly for each item
 - with draft state on, ensure the new module item sequence footer
   appears and works properly for each item
   - and the old footer does not temporarily appear first
   - and the file shows the correct sequence each place it's used

fixes CNVS-11809
fixes CNVS-11978
fixes CNVS-11977

Change-Id: I52f07a8026cb6697aac24bc4027f6bf696a87239
Reviewed-on: https://gerrit.instructure.com/32352
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-03-26 18:12:22 +00:00
Landon Wilkins 5384fe4c3e converts files/full_index js_block into js_bundle
test plan:
* regression files full_index

Change-Id: I60c5e079e0dc513bcc40de5c6ff65c7b722767c0
Reviewed-on: https://gerrit.instructure.com/29147
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
2014-02-05 22:01:21 +00:00
Hannah Bottalla f1c1664041 hide preview button from files
We need to hide the preview button from screenreaders in the Files
section

fixes: CNVS-9249

Test Plan

With VO and JAWS:
1. Go to the files section of a course
2. Upload a PDF file, or any other file supported by the previewer
3. Using the screenreader, navigate to the file name
4. From the file name, try to navigate to the "Preview" link;
it should skip over it and not read it

Change-Id: I5c5c0d2aa6385981346562fda7d1fe4d2057c1e8
Reviewed-on: https://gerrit.instructure.com/25932
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-11-07 17:23:19 +00:00
James Williams 0fe0ba0180 change block helpers for rails 3.2 compatibility
closes #CNVS-5018

Change-Id: If1cef73759f090efe2a58dc97c351410a552ae1d
Reviewed-on: https://gerrit.instructure.com/25109
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2013-10-11 23:09:37 +00:00
Jeremy Stanley 5db7cf8d3d Optionally use Scribd HTML5 document viewer
test plan:
 - create a course in a sub-account
 - in the sub-account's scribd plugin settings, check the
   "Enable HTML5 Document Viewer" checkbox
 - verify a document in a course outside this sub-account
   renders with the Flash scribd viewer
 - verify a document in a course inside this sub-account
   renders with the HTML5 scribd viewer
 - verify that the Attachment's last_inline_view attribute
   is set either way
 - verify that viewing a document from the files page
   in HTML5 mode, entering full-screen, and then leaving
   full-screen returns to the files page and not to
   a wall of JSON

refs CNVS-6370
fixes CNVS-8605

Change-Id: Iaf486feb3dd29548df32b1876975b20eb94668d0
Reviewed-on: https://gerrit.instructure.com/24121
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2013-10-09 17:26:25 +00:00
Jeremy Stanley 4cc01282e1 request scribd re-render when no preview available
test plan:
 1. work in an account with scribd enabled
    and google doc previews disabled
    (in console, add "-google_docs_previews" to the
     Accounts's allowed_services)
 2. upload a scribd-previewable file type in the files tab
    (it needs to be a new file that is not already in
     the canvas instance)
 3. make sure it previews properly (it may take a minute
    after uploading for the scribd rendering to complete)
 4. delete the file
 5. undelete the file (/courses/X/undelete)
 6. reload the files tab, and click on the filename on the
    left side.
    - on the right, you should see a message like
      "the preview for this document is unavailable;
       please try again later".
 7. reload the files tab again, then click on the filename.
    - if the scribd rendering has completed, you should see
      a scribd preview.  if you don't, wait a few minutes and
      reload the files page again, to give scribd some time.
 8. test other areas documents can be previewed.  (it's
    permissible to simply delete the scribd_doc in the console
    via attachment.delete_scribd_doc, then try to preview,
    see that a "try again later" message appears, and the
    scribd preview appears in later page views.)
   a. documents embedded in rich text via the wiki sidebar
   b. student submissions, as viewed by the student
      ("submission details" button, "preview" icon)
   c. student submissions, as viewed by the teacher
      in SpeedGrader(TM)

fixes CNVS-7019

Change-Id: I37be820a776637252e14b6a28a1be389b718ff9f
Reviewed-on: https://gerrit.instructure.com/22438
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2013-07-25 21:47:07 +00:00
James Williams 92867eaed4 show media preview for media files in file show view
test plan:
* upload a media file (video/audio) to a course
* when either:
 * linking the file to a module item and
 clicking on the item link
 * or, directly going to the file show page
 (e.g. '/courses/:course_id/files/:attachment_id')
* confirm that the media preview appears (rather
 than a failed document preview), just as on
 the main 'Files' page

fixes #CNVS-2529

Change-Id: Ic8701c28a7ea0382de84e36fc363c0cff8cc2ac6
Reviewed-on: https://gerrit.instructure.com/21616
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>
2013-06-25 16:06:56 +00:00
Jeremy Stanley aa120ecd78 record last_inline_view time for attachments
to collect data about when scribd (or crocodoc) documents
are not being used and can be purged from third party servers
to save money

fixes CNVS-5310

note: this data is not yet exposed; it can only be queried
from the database manually for now

test plan:  make sure the last_inline_view attribute for an
Attachment is updated whenever the attachment is viewed via
scribd or crocodoc. this can be done in several ways:
 - via the preview icon that appears next to a document link
   in rich text
 - on the files page
 - for student submissions on SpeedGrader

the easiest way to check this is in the Rails console.
get the attachment id from the canvas url, then,
in the console (after switching to the correct shard),
do

  Attachment.find(id).last_inline_view

Change-Id: I137ab631ad4eefdf4d9af353dd11191b7f2ca140
Reviewed-on: https://gerrit.instructure.com/20810
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
2013-05-24 14:56:40 +00:00
James Williams d8d074e500 bootstrap files/folders lock dialog fixes
test plan:
* visit the files page
* confirm that the dialog for locking a folder
and the dialog for locking a file have checkboxes
that are properly aligned.

fixes #CNVS-4874

Change-Id: I64cdd479a3d7027384b3b3eb1eaf66f0b2ed7d31
Reviewed-on: https://gerrit.instructure.com/18940
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
2013-03-27 18:47:17 +00:00
Sterling Cobb d56b33d354 Fix formatting when viewing files with bootstrap
Files needed the clear fix class added.

Steps:
 1. View a course or personal files page.
 2. When there are multiple files, it should all
be formatted correct.
 3. Preview and image on the files page.
 4. The header should be formatted correctly.

Change-Id: I54de8758a0f169695a0e2c6066c13bbc19615b91
fixes: CNVS-4305
Reviewed-on: https://gerrit.instructure.com/18219
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-03-13 08:41:51 -06:00
Jeremy Stanley 4a8ea01a50 remove broken collaboration functionality from files page
viewing and editing collaborations on the files page has
been broken for some time now (although it still slows down
the page load by including a complete list of enrollees in
the HTML).  this functionality is redundant with the
"Collaborations" tab anyhow, so consensus is it should be
removed instead of fixed

fixes CNVS-4464
fixes CNVS-4469

test plan:
 - files page should no longer have a "collaborations" folder
   (this is no loss, because it was broken before)
 - files page should not embed the names and IDs of every
   student in the course in invisible HTML elements
   (inspect/search source to confirm; this vestigial data
   added over 3MB to the page and ~30 seconds to the page
   load in a course with 10,000 students)
 - other files page functionality should still work
 - collaborations tab should be unaffected

Change-Id: I389d351d3988e8aed9b9ddd6c353082441f5d9f7
Reviewed-on: https://gerrit.instructure.com/18399
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-03-12 14:03:06 -06:00
Ryan Florence 926cb0ca24 Fully adopt Bootstrap & update css to work with it, closes: #CNVS-1344
this commit does the following:
* upgrade bootstrap-sass gem to most recent version
* switches to using bootstrap's normalize.css and forms.css
  which fixes a whole bunch of misformatting of how bootstrap
  stuff is supposed to look, but changing those 2 affects
  a lot of our old stylesheets.
* gets rid of unified_buttons.sass and just uses bootstraps buttons.
  .ui-button @extends these because we still have to support .ui-button
  for modals & buttonsets. but .button is no longer supported.
* a lot of css file reorganization (there's no more 'blue' and
  'normal canvas', there's just canvas)
* a bunch of files had to be tweaked to look good with these changes.

test plan:
This change touches every page in canvas so, no kidding, we need to make
sure every page looks OK. In order to do that:
1. each sprint team needs to give a +1 after they make sure all the
   pages in the features they are over look good.
2. the QA person on each team needs to look at the pages for their
   teams features for a QA +1

things to look for specifically when testing:
* buttons: this gets rid of all those red 'cancel' links
  that are actually buttons, make sure all the buttons you see
  look right.  if you see 2 plain gray buttons next to each other
  like [Save] [Cancel], we should make the primary one blue (by
  adding the .btn-primary class)
* Forms: a lot of this change has to do with how form elements look,
  especially <select>s, <input>s and <label>s. look at the diffs
  for the ones that have the most changes and make sure those look
  good, but also check for the ones I missed and make sure those
  look good too.
* and just random style changes, if something looks ugly or broken
  (and it didn't before), we should fix that.

Also:
just use a link instead of a drop-menu for adding event from sidebar

we used to have a drop down menu for adding events
to cal2 from the sidebar where you'd hit a cog
and it'd ask you if you wanted to add an event or
an assignment.  this just simplifies it to an add
icon.

this: http://cl.ly/image/133a2A3q3q1M
instead of: http://cl.ly/image/46463o2s3W0g

Change-Id: I384fe273934bca96bf28423afb1402c7792d8766
Reviewed-on: https://gerrit.instructure.com/15422
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2013-02-28 21:06:45 -07:00
Zach Pendleton f828b6be88 remove collaborations editing from course files page.
fixes CNVS-3404

test plan:
  * navigate to course files page and click the
    collaborations folder;
  * verify that 'Manage collaborations' link is present in
    the files interface header;
  * click the link and verify that it links to the
    collaborations page.

Change-Id: Id1a67ced14d220f98b10c1e63b6b651c97d2b473
Reviewed-on: https://gerrit.instructure.com/17633
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-14 08:38:22 -07:00
Ryan Shaw 713d0b8c91 replace all .button(s) with .btn
in order to not have to support buttons with .ui-button AND
.button AND .btn classes this simplifies and and makes our
codebase more consistent by deprecating the .button class
with .btn

Change-Id: I4802d785a47b36aa477f302e6ac8c87715db8a62
Reviewed-on: https://gerrit.instructure.com/15194
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-11-14 13:29:30 -07:00
Chris Hart 171b05a4f7 update dialog box button appearance to conform with styleguide
fixes #10236

test plan:

check each updated form to ensure it looks correct and works

Change-Id: I073c3bff5860bab0b892fecbf61a41a8e9c5ec76
Reviewed-on: https://gerrit.instructure.com/13904
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-11-13 13:00:36 -07:00
Bryan Madsen e31c8292dc Revert "delete scribd.view.js since we don't use it any more"
This reverts commit 90b75dad5d.

Conflicts:

	public/javascripts/instructure.js

Revert "use HTML5 for scribd embeds"

This reverts commit 2efbc84b05.

Conflicts:

	public/javascripts/jquery.doc_previews.js

Change-Id: I801bb27ef405e1f81d0180a4560545c01a9a4f5f
Reviewed-on: https://gerrit.instructure.com/15048
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-11-08 14:27:33 -07:00
Bracken Mosbacker b25e0b01ad show google previews on file show page if supported
Google previews weren't being shown

Test Plan:
 * only enable google docs locally
 * upload a pdf to the course
 * link a module to that file
 * click the module link
 * the file should be previewed with google docs

refs #11219

Change-Id: I75da7ba9fbfbd4051f3d5493a4bbb99c076cddc5
Reviewed-on: https://gerrit.instructure.com/14653
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-10-25 09:28:18 -06:00
Ryan Shaw 90b75dad5d delete scribd.view.js since we don't use it any more
when I switched scribd previews from using
the flash viewer to html5 I forgot to clean up
references to scribd.view.js

Change-Id: Iee01271699afa29e728b6fd87f7f388326223e02
Reviewed-on: https://gerrit.instructure.com/14560
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-10-24 16:41:30 -06:00
Jake Sorce c4ee3dedf8 fix folder name text box size
fixes #11054

test plan:
  1. login as a teacher
  2. go to a course and click Files in
     the left hand nav
  3. click Add Folder
  4. verify that the name text box does not overflow out
     of the right hand frame

Change-Id: I07e9f87a101091f74a8e23a1d38de9667554f801
Reviewed-on: https://gerrit.instructure.com/14400
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
2012-10-18 10:32:33 -06:00
Jake Sorce eb49f9b1c8 add data validation to new folder creation, fixes #10906
test plan:
  1. login as a teacher
  2. go to a course
  3. click on files on the left nav
  4. click 'Add Folder'
  5. try to give it a name over 255 characters
  6. text stops at 255 characters, press enter to add
     the folder
  7. folder is saved with no DB error

Change-Id: I1da8595350b3d0c6f23e3052e514bcb55446f141
Reviewed-on: https://gerrit.instructure.com/13982
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-10-02 15:54:37 -06:00
Sterling Cobb 3b0fada705 Alphabetize files and folders
fixes #10036

This commit removes the ability to sort files and folders by
dragging and replaces it with a default of alphabetizing every
item.

Test plan:
  *Folder
    1. Go the to files page http://localhost:3000/dashboard/files
    2. Create a folder named "d_folder" then add a folder named "a_folder"
    3. Ensure "a_folder" is before "d_folder"
  *Files
    1. Go the to files page http://localhost:3000/dashboard/files
    2. Upload a file named "d_file.txt" then add a file named
"a_file.txt" (must have characters in the file"
    3. Ensure "a_file.txt" is before "d_file.txt"

Change-Id: I3776ff996e338f8aa6fc3858b59e1460b8b1cdf0
Reviewed-on: https://gerrit.instructure.com/13554
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-28 14:49:05 -06:00
Cameron Matheson b5f566f1f6 crocodoc integration
Adds support for optionally viewing documents with Crocodoc.

closes #9865

Test plan:
  * configure the crocodoc plugin
  * add an assignment that allows file uploads
  * make a submission for that assignment with a pdf or doc or ppt
    - on the 'submission details' page, opening a preview of the
      assignment should display it in crocodoc
    - speedgrader should display the submission in crocodoc too
  * make a submission with odt or rtf
    - the submission should be displayed with scribd or google docs
  * if you disable the crocodoc plugin, submissions could continue being
    previewed in google docs or scribd

Change-Id: I7dd2547f8e2d907c98ebe894a7f1ee9d58f1e030
Reviewed-on: https://gerrit.instructure.com/13668
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-09-21 12:57:02 -06:00
Zach Pendleton 15f6b914e9 improve accessibility of files page. fixes #9271
this commit marks up the file list as a tree and makes it
keyboard navigable. it also adds labels to each of the file
sections to make them easier to understand.

test plan:
  * using a screen reader, navigate to the files page and
    attempt to click a file in the tree navigation;
  * verify that it opens in the preview pane as expected;
  * do the same with a folder and verify that it displays as
    expected.

Change-Id: Icc9ad33973882f35d6aca0219a2b77e0358d3cb3
Reviewed-on: https://gerrit.instructure.com/13638
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-09-19 09:39:10 -06:00
Ryan Shaw 81dc9b769e don't call jquery UI methods an elements with no widget initialized
aka: no more .dialog('close').dialog({}).dialog('open')
(does not actually change any behavior visible to end user)

test plan:

as far as manual testing goes, try to go to a bunch of pages that have dialogs
and open and close them.

For engineers, if you can think of other places where we might try to set options
on a UI widget before we initialize one (like sortables or something), check that too.

Change-Id: I7415c00d8c15b562ac12eeef83fa041aff1dfb35
Reviewed-on: https://gerrit.instructure.com/12810
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-13 10:16:54 -06:00
Ryan Florence 855bbf6bc0 added rce for editing html files closes #9667
test plan:
1. Go to a course files page
2. Upload an html file
3. click edit content
4. note the tinymce editor
5. toggle back and forth between views
6. save changes
7. make sure it changed

Change-Id: I4950b87728c728008ee548bc41d09513b80caed6
Reviewed-on: https://gerrit.instructure.com/12557
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-03 09:44:23 -06:00
Ryan Shaw 605231a418 upgrade jquery to 1.7.2
when you require ['jquery'] you are now getting the
version of jquery that has our patches applied to it
you should not need to think about the patching as
you write code.

this also applies to jqueryui/dialog, that will return
the patched version of it.

test plan:
make sure javascript still works on our site ;)

Change-Id: I237fa8da5f93167140c4d42b80eb3ef17d95c1e6
Reviewed-on: https://gerrit.instructure.com/9878
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-04-24 10:57:38 -06:00
Zach Pendleton 30a747995c increase height of swf files on module pages. fixes #5991
change hard height of 500px for swf files to a 600px min height
and change height to 80% of the container to allow larger browser
windows to display larger swf files.

all of this is to hopefully avoid or delay having to determine the
height and width of swf files on upload (because we'd have to read
the swf into memory and store it somewhere and it's nasty).

Change-Id: I6686dd7291e659599e8a84720e1c2717ab60afab
Reviewed-on: https://gerrit.instructure.com/9152
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-05 10:38:28 -07:00
Zach Wily accee8cc6b make zip file processing asynchronous
also fix/enable zip file uploads in group and user contexts -- they were
partially enabled, but broken. This required generalizing
UnzipAttachment to work for any context, not just courses, though that
was mostly just a matter of renaming things.

The zip file uploads in accounts are still not enabled, as the accounts
file section is not implemented yet, though it's referenced in the
routes file.

fixes #5913
fixes #5728
fixes #5463
fixes #5012

test plan:
  * upload a zip file to a course, to a group, and to a user's files. in
    each case, try uploading the zip both through the button in the file
    browser, and by dragging a zip file into the file browser (in a
    capable web browser)

Change-Id: I6c648ef677d2bd61ae41a2b8fe0f89be43d63375
Reviewed-on: https://gerrit.instructure.com/7402
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-02-29 14:04:53 -07:00
Zach Wily e9f22cc52f show display_name as filename to download
Change-Id: I993bbf0ae190cd68a71b22315c842c7ac1a22b97
Reviewed-on: https://gerrit.instructure.com/8923
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-02-22 21:48:28 -07:00
Ryan Florence a1e31c8c9a AMD Conversion
"Trivial" JavaScript / CoffeeScript changes
--------------------------------------------------

For the most part, all javascript was simply
wrapped in `require` or `define`. The dependencies
were found with a script that matched regexes in
the files, it errs on the side of listing too many
dependencies, so its worth double checking each
file's dependencies (over time, anyway).

i18n API changes
--------------------------------------------------

No longer have to do I18n.scoped calls, just
list i18n as a dependency with the scope and it's
imported already scoped

  require ['i18n!some_scope'], (I18n) ->
    I18n.t 'im_scoped', 'I'm scoped!'

JS bundling now done with r.js, not Jammit
--------------------------------------------------

We don't use jammit to bundle JS anymore. Simply
list dependencies for your JS modules in the file
and RequireJS handles the rest.

To optimize the JavaScript, first make sure you
have node.js 0.4.12+ installed and then run:

  $ rake js:build

The app defaults to the optimized build in
production. You can use non-optimized in
production by putting ?debug_assets=true in the
url just like before.

You can also test the optimized JavaScript in
development with ?optimized_js=true.

Significant changes
--------------------------------------------------

These files have "real" changes to them (unlike
the JavaScript that is simply wrapped in require
and define).  Worth taking a really close look at:

- app/helpers/application_helper.rb
- app/views/layouts/application.html.erb
- config/assets.yml
- config/build.js
- lib/handlebars/handlebars.rb
- lib/i18n_extraction/js_extractor.rb
- lib/tasks/canvas.rake
- lib/tasks/i18n.rake
- lib/tasks/js.rake

Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7
Reviewed-on: https://gerrit.instructure.com/6986
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-02-06 16:41:40 -07:00
Jacob Fugal ce63808952 be explicit about inline vs. download in safe files redirect
if we're redirecting to safe files and it's not for download, it's for
inline and we need to include that in the redirect url. also, be
explicit about wanting to download when clicking a link labeled
"Download".

fixes #5433

test-plan:
  - have s3 storage enabled and a safe files domain
  - upload an image as a file submission
    - view the submission in speedgrader; image should be displayed
      inline rather than being downloaded
  - upload an image on the files tab
    - click the download link; should download the image rather than
      being shown in browser
    - preview the uploaded image from the files tab; it should display
      inline
  - upload a flash file on the files tab
    - preview the uploaded image from the files tab; it should display
      inline (independent check necessary because flash is touchy about
      content-disposition headers)
    - click the download link; should download the file rather than
      being shown in browser

Change-Id: Ibd48eb4629aa26052d3d1bce90444146033b9eeb
Reviewed-on: https://gerrit.instructure.com/8275
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-27 09:15:19 -07:00
Zach Wily 54bab9db59 prompt to overwrite/rename new files with duplicate names; refs #5131
Added a step to the flash upload process in the Files section to do a
preflight check to see if there are any duplicate filenames. If there are, the
user gets the option to either rename the new files, or overwrite the existing
ones. (Overwrite means deleting them - we already have code that will redirect
to new files with the same name as deleted files if they're linked directly by
id.)

Change-Id: I926631aadcebec3cae1607f818044f7cd4b74cea
Reviewed-on: https://gerrit.instructure.com/5091
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-16 09:10:55 -06:00
Cody Cutrer 8bd62648aa s/TA's/TAs/g fixes #5062
Change-Id: I50a9212d11ab8e872c8d2d548c1cacd55d3ea98d
Reviewed-on: https://gerrit.instructure.com/4951
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-04 14:17:08 -06:00
Jon Jensen cb864c6ae0 misc view i18n
Change-Id: I9cd27dd9d6d3daa8c1fe70cb0de21b82d1980de7
Reviewed-on: https://gerrit.instructure.com/4586
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-07 10:37:38 -06:00
Jon Jensen 6f0e2a18a3 misc title/alt attribute i18n
Change-Id: Ifb9d24d913df0fc8a03350b96e949d0204024d30
Reviewed-on: https://gerrit.instructure.com/4590
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-07-07 09:36:03 -06:00
Jon Jensen 35705ee7bc various i18n fixes/deduplication
added checks to extractor for some common typos/oversights (and more line numbers)

Change-Id: I7a2b080cf2a26cb6711539220fe2486a1a4f04b5
Reviewed-on: https://gerrit.instructure.com/4581
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-07-06 17:29:33 -06:00
Jon Jensen 7928b695a2 fix a few i18n issues
Change-Id: If5fd5dd4ffb848ba2a09b29d36c2a08b9859f83f
Reviewed-on: https://gerrit.instructure.com/4409
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-07-06 10:49:20 -06:00
Brian Palmer 6a1bddc9bc enable "download zip" link for students, closes #4305
Change-Id: Ifd22d7d79e21d0cc8a4d1326b062058f06f6a0dc
Reviewed-on: https://gerrit.instructure.com/4357
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-06-29 14:17:23 -06:00
Jon Jensen 46f093f171 update js extractor (and views) for new js_block scoping usage
Change-Id: Ic614e156b90175eced2bb28102c219bd66c08f7b
Reviewed-on: https://gerrit.instructure.com/4341
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-23 17:08:27 -06:00
Cody Cutrer 6d7a5abbcf i18n collaborations
Change-Id: Id300f665039f13f27f4300da7ba75753367fdbf6
Reviewed-on: https://gerrit.instructure.com/4243
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-06-16 15:02:30 -06:00
Jon Jensen edcefd9299 remove sti and controller action scoping
also fixed a couple dup key issues and other weirdness

Change-Id: I48272a136783c95819de3863f05be4250a4a6102
Reviewed-on: https://gerrit.instructure.com/4223
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-16 08:25:51 -06:00
Cody Cutrer 758d1662de i18n files part 2
Change-Id: Id0fe7c86f355f2645c36249637c010a03c67cec4
Reviewed-on: https://gerrit.instructure.com/4226
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-16 07:18:28 -06:00
Cody Cutrer ef719f39a6 i18n attachments/files part 1
Change-Id: Ic8b08c237a50b15cd9cc489a98929063c56d50d7
Reviewed-on: https://gerrit.instructure.com/4216
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-15 15:00:40 -06:00