Commit Graph

62 Commits

Author SHA1 Message Date
Andrew Butterfield 9605d338a5 Make it more clear when entering external content
fixes PLAT-2552

Test plan:
* Install the test tool app with all placements checked

* For each of the following placements verify the following
  * Using the keyboard navigate forward through the page
  * Ensure there is a notice prior to entering external content that
    lets the user know they are entering partner content
  * Ensure there is a notice after exiting external content that lets
    the user know they have left partner content
  * Ensure the same with a screen reader

* Placement checks
  * Post grades
    * Go to the gradebook and click the sync grades button in the top right and select the test tool
    * Verify the modal
    * Enable the new gradebook and go to the actions menu and select the
      test tool
    * Verify the modal
  * Homework Submission
    * Go to submission page as a student and pick the tab for the test
      tool
    * Verify in page iframe
  * Content Import
    * Go to course import
    * Select the tool from the Content Type drop down
    * Click Find a Course button
    * Verify the modal
  * Collaborations
    * Select the tool from the drop down
    * Verify in page iframe
    * Send back a content item with a target url
  * Collaborations edit
    * Select edit icon on collaboration
    * Verify in page iframe
  * New Collaborations
    * Enable the External Tool Collaboration feature flag
    * Validate the previous collaborations checks
  * Assignment Configuration
    * Go to create an assignment for online submission file upload
    * Select the tool from the plagiarism drop down
    * Verify the in page iframe
  * Tool Configuration
    * Go to course settings and click the cog for the test tool and
      select configure
    * Verify the modal
  * LTI2 Registration
    * Go to course settings and install an LTI 2 tool
    * Verify the modal
  * Assignment Settings
    * Go to assignment index page
    * Select tool from cog menu next to new assignment button
    * Verify the modal
  * Module Item
    * Create a module
    * Add an external tool module item
    * Select the tool
    * Verify the modal
  * RCE
    * Click the LTI option from the RCE
    * Verify the modal
  * Assignment submission type
    * Go to create an assignment and select external tool as the
      submission type
    * Verify the modal

Change-Id: I365b9364d73a9fe3097031fffec79148e9671959
Reviewed-on: https://gerrit.instructure.com/112506
Tested-by: Jenkins
Product-Review: Nathan Rogowski <nathan@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
2017-08-21 15:55:07 +00:00
Jeremy Stanley b0bb886869 don't create graded discussions from the modules page
test plan:
 - create a discussion topic via the modules page
   - it should not be graded
 - regression test SIS-2854

fixes CNVS-38297

Change-Id: I2f89d50387aba494712573bdd388fde7df8a0b46
Reviewed-on: https://gerrit.instructure.com/119944
Reviewed-by: Nick Houle <nhoule@instructure.com>
Tested-by: Jenkins
QA-Review: David Mirabile <dmirabile-c@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-07-31 20:43:39 +00:00
Nick Houle 7e3c9b0e33 Allow new Assignments to save without validation errors in modules
Fixes: SIS-2854

Test plan:
- Enable the new Sync to SIS Feature Option, set a name length
  value and check the require due date option
- Navigate to a Course
- Navigate to the Modules page of the course
- Create a new Module
- Click the '+' button to left of the newly created module
- Click 'Add [New Assignment]'
- Enter a name longer than the length you set for the account
  setting
- Click 'Add Item'
- Confirm the Module Item is created
- Confirm when clicking on the module item name it navigates you
  to the Assignment
- Confirm when editing the assignment the 'Sync to SIS' option is
  not checked

Change-Id: I4d0732ff89e3b09e910b489083ee562ffb9ef6f5
Reviewed-on: https://gerrit.instructure.com/114668
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-06-09 17:58:36 +00:00
wdransfield a262310f5d Send `ext_lti_assignment_id` in assignment launches.
Closes PLAT-2618

Test Plan:
1. Create an assignment with submission type 'External Tool'
2. Do a content item selection request by clicking
   'find' and launching a tool that supports content item.
3. Verify that a param named 'ext_lti_assignment_id' is
   sent in the content item selection request set to
   the assignemnt's 'lti_context_id'.
4. Return an Lti Link through the tool via content item.
5. Save and publish the tool. View the assignment and verify
   the tool launches and also gets the 'ext_lti_assignment_id'
   parameter set to the same 'lti_context_id'

Change-Id: I1be951b298aa04fd932fb62c8411f362afc599b2
Reviewed-on: https://gerrit.instructure.com/114253
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-06-09 13:37:41 +00:00
Ryan Shaw dde014778c convert public/javascript that export something to import/export
These files can only be converted to import/export
if we pass them through babel (so we can use the
interopRequireDefault and “addModuleExports” stuff
babel provides) to make it work with our coffeescript.

closes: CNVS-35466

test plan:
* nothing should change
* the build should pass
* pages that use this should still work

Change-Id: I994e84e26f081c3f5670c64027a285c6a0419529
Reviewed-on: https://gerrit.instructure.com/106265
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-25 16:22:35 +00:00
Landon Wilkins 1649b7e30c da licença part 51
add consistent license headers to all source files

Change-Id: Ie6f2d48e5615052512ee19bf090bcd06bcb8e11f
Reviewed-on: https://gerrit.instructure.com/110162
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 19:05:00 +00:00
Ryan Shaw b36f17b65b get public/javascripts ready for strict mode/babel
closes: CNVS-35872

this fixes some eslint errors in order to get us towards strict mode.

to find these problems I enabled babel and ran the qUnit specs and
fixed the errors that it had.

Then I enabled an eslint config that only checked for possible runtime
errors (mostly "no-undef") and did nothing about our code-style stuff.
(g/106222). I uploaded patchset 1 on top of that commit so you can see
in the gergich comments that there is no errors when just checking
those things.

test plan:
* specs should pass

Change-Id: I67b5f8e0d2bffdcf9f37e40e09ff40b1986f9fc0
Reviewed-on: https://gerrit.instructure.com/106223
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-24 16:58:41 +00:00
wdransfield 5927a24c98 Fix LTI launch modals don't contain focus.
Fixes PLAT-1781

Test Plan:
- Launch the LTI 2 registration modal and
  verify the modal contains focus when
  content is tabbed through.
- Navigate to the assignment creation page
- Launch a tool from the RCE and verify
  that focus is contained in the modal
  when tabbing through content.
- Choose submission type 'external tool',
  click 'find', and launch a tool. Verify
  that focus is contained in the modal when
  tabbing through the content.
- Repeat the test for module selection
  placement.
- Repeat the test for the assignment
  submission placement modal.

Change-Id: I8afc232987c2f60fd57ab2c722e1e3b4c9db0757
Reviewed-on: https://gerrit.instructure.com/98818
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-01-09 17:47:21 +00:00
Felix Milea-Ciobanu 8e9e194246 fix file usage rights bypass when publishing module
fixes CNVS-32602

test plan:
- enable 'require usage rights for uploaded files' in a course
 (first under account admin feature options, then in course settings)
- upload two new files to the course, but do not publish them
- add usage rights to one of the files
- create a new module and leave it unpublished
- add the two files to the module and hit the publish button
- note that a warning message stating that some module items could
 not be published should flash at the top of the screen
- refresh the page
- note that the module item with file with usage rights is
 published, while the other file module item is unpublished
- go to the files page and note that the file with usage rights is
 now published, while the other file is still unpublished
- as a student, view the modules page for the course and note that
 you can only see a module item for the file with usage rights
- note that the file is accessible to the student
- as a teacher on the modules page, click the publish button on
 the unpublished file
- a modal dialog should pop up asking you to specify usage rights on
 the file
- specify usage rights and publish the file
- refresh the page
- note that the file module item is now published
- check the files page and ensure the file is now published as well
- check the student view to ensure the file is visible by the user

Change-Id: I50ac6e9b398e5a0b901fbe2fa92b8e7a4683e2a6
Reviewed-on: https://gerrit.instructure.com/95253
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2016-11-23 15:01:28 +00:00
Nathan Mills 08c623a3a6 add iframe to the tabindex for lti modal launches
fixes PLAT-1837

test plan:
the modal for assignmets, modules, and homework submission should
allow a user to tab into the iframe from the modal

Change-Id: I748c2c9667d8800baeb8f66320dcf884cfc091c6
Reviewed-on: https://gerrit.instructure.com/92096
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-10-17 15:49:54 +00:00
Nathan Mills a0c3bf0b02 add alerts/onunload handlers for content-item
fixes: PLAT-1784
refs: PLAT-1805

test plan:
install a tool that uses content item
during the content item selection flow it should prompt you if you
try and close the modal or navigate away
make sure you don't get an alert when adding via content item
test the following placements: external tool assignments, module items, 
and the homework submissions more tab

Change-Id: I20442079273cdd0898f2fcb717030727aa20bae3
Reviewed-on: https://gerrit.instructure.com/89181
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-09-20 16:21:29 +00:00
James Williams 587e5378c9 require title when creating external url and tool module items
test plan:
* "Page Name" should be required when adding External URL
 and External Tool module items
* also shouldn't be able to erase a name when editing

closes #CNVS-31526

Change-Id: Iaf3162c96c132cbbc0c408b6f51e034cfbf801bd
Reviewed-on: https://gerrit.instructure.com/90020
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-09-13 20:20:48 +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
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
James Williams be51970ea1 fix external url module item dialog with blank urls
test plan:
* try to create an external url module item with
 no url
* it should show an error

* try to edit an external url module item to
 give it no url
* it should also show an error

closes #CNVS-27115

Change-Id: I7448171dad64da9a80eb85772d002b375c37a132
Reviewed-on: https://gerrit.instructure.com/73477
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-03-09 16:48:48 +00:00
Sterling Cobb a8eb5c3677 fix tab issues on add module item dialog
fixes CNVS-25732

When you were on a select menu on this page and pressed enter, the tab
focus would disapear. This fixes two things on the page to solve the
problem.

1. It will disable the "Add Item" button by default, only enabling it
when an item has been selected.
2. Makes sure the focus doesn't change when pressing enter. If
something has been selected and enter is pressed, the form will now
submit like its suppose to.

Test Plan
Given you're on the modules page
And you have a module to add an item to
When you open the add item (+) dialog
You should see focus is on the "Assignments" select menu
When you press "enter"
Then focus should not change
When you select and item from the middle
And you press enter
Then the form should submit
And that item should be added to the module

Change-Id: Iec7427f68ae8c7037e607ef9fb30710a08f65f9a
Reviewed-on: https://gerrit.instructure.com/69154
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2016-02-19 18:39:14 +00:00
Jeremy Stanley 447fc28be8 return focus after adding module item
test plan:
 - use the keyboard to activate the + button in a module
   to add a module item
 - select an item to add (tab + arrow keys) and press Enter
   to submit the dialog
 - focus should be returned to the + button

fixes CNVS-25661

Change-Id: Id64ff086f38989469bf059ea40fc77cbf5d00e1d
Reviewed-on: https://gerrit.instructure.com/68808
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-12-16 20:49:17 +00:00
James Williams f07f83844d rename duplicate files uploaded through modules page
test plan:
* upload a file into a course
* through the modules page, re-upload the same file
* it should have a unique counter (e.g. "-2")

closes #CNVS-25623

Change-Id: I82a47e095ec5665fc1ebd42c7febc894e04041ef
Reviewed-on: https://gerrit.instructure.com/68434
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-12-08 20:39:41 +00:00
Weston Dransfield ea903c6b84 Update Content-Item LtiLink types to LtiLinkItem
Fixes PLAT-1125

Test Plan
 - Add the example test tool (https://github.com/rivernate/lti_tool_provider_example)
   to a course using Editor Button, Link Selection, and Module Menu placements.
 - Add the tool as a module item. While adding make sure to add a new content item by pressing the green '+' in the modal that pops up.
   This content-item should 'Lti Link' set as the type.
 - Click on the tool module item and make sure the link works.
 - Using similar steps add the tool in the RCE and make sure the link works as expected.

Change-Id: I91681d6b6937467ef1aadf3029ccbfd566ba3a71
Reviewed-on: https://gerrit.instructure.com/57296
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2015-07-20 20:49:13 +00:00
Weston Dransfield 25540dd05a Support window presentaiton_document_target for module items.
Fixes PLAT-1128

Test Plan:
 - Install lti test tool (https://github.com/rivernate/lti_tool_provider_example) and make sure the module item placement is selected
 - Add a module item and choose 'External Tool' as the type.
 - Find the app you just installed and click on it.
 - When the modal pops up click the green '+' in the top right cortner to add a content-item
 - Fill in the values however you want, just make sure 'Presentation Target' is set to 'window'
 - Click 'submit' and then 'Add Item'
 - Click the link in the module item and make sure it goes to a page with a button that says 'load <tool name> in a new window.'
 - Click the button and make sure the tool loads in a new tab
 - add another content item but this time set 'Presentation Target' to 'frame'. Make sure this tool loads in an iframe rather than a new tab

Change-Id: Ic6654bf40dd5aef0141aa4199b13bb58e03906eb
Reviewed-on: https://gerrit.instructure.com/56971
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2015-06-24 15:16:16 +00:00
Ethan Vizitei d066f4b7f2 remove dead code
closes CNVS-19331
refs CNVS-15543

The plan was to make date pickers in shared/_add_assignment accessible,
but when I tried to use the partial in the one place it still
gets included (context module inline assignment creation), it
doesn't even get used anymore.  Removing
this code entirely.

TEST PLAN:
  1) context module editing and assignment adding should not break
  2) tests should all pass

Change-Id: Ib1c88a963aecbbe4f15f3b6824ffb6a9e9eea4e9
Reviewed-on: https://gerrit.instructure.com/56673
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-06-18 19:20:19 +00:00
Nathan Mills 9beb9efc70 fix bug that prevented lti2 tools from being added
fixes PLAT-1047

test-plan:
you should be able to add an lti2 tool as a module item and assignment
you shoujld be able to add an lti 1 tool as a module item and assignment

Change-Id: Iece31cb76096f1fa42a4358fc2a9a3f411e3b18c
Reviewed-on: https://gerrit.instructure.com/55250
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-06-02 18:49:44 +00:00
Nathan Mills 3c57214378 add content-item to module items
refactor the external content controller to pass the new content-item format

fixes: PLAT-968 PLAT-1008 PLAT-967

test-plan:
*the new content-item should work in module items
*regression test all of the resource selection placements, all
of the enabled resource selection return values in the old
test tool should still work in module_item selection,
homework_selection, editor_button, course migration, and
homework submission.

Change-Id: Ic6de04effb5fde311f91778a316f9c229072f275
Reviewed-on: https://gerrit.instructure.com/52926
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-05-11 16:48:30 +00:00
Jeremy Stanley af2d7b6505 fix file chooser in add-module-item dialog
test plan: when adding a file to a module itme, the "Choose File"
button should not appear until "[ New File ]" is selected

fixes CNVS-19748

Change-Id: I4dea0e5c6f79dd81c090c58b810cfe9b032b2091
Reviewed-on: https://gerrit.instructure.com/52479
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-04-17 22:58:07 +00:00
Jeremy Stanley bd3d187e5c fix adding external tool items to modules
test plan: ensure that, when adding external tool items to
  a module, and before refreshing the page,
   (1) external tool items use the "link" (chain link) icon, not
       the document icon;
   (2) completion requirements can be set on an external tool
       module item added to an empty module;
   (3) the item appears in the "External Tools" header in the
       add-requirement dialog

fixes CNVS-19398
fixes CNVS-19401

Change-Id: Ie16c017430b180ff64418f28a0c03fbfcde9eb49
Reviewed-on: https://gerrit.instructure.com/50669
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-03-23 15:30:02 +00:00
Dan Minkevitch 21b738177b Updated React for New Files
fixes CNVS-17166
closes CNVS-17944
closes CNVS-17945
refs CNVS-17946
fixes CNVS-18230
closes CNVS-18162

Upgrades New Files (used by the Better File
Browsing feature flag) to the latest versions
of React, react-router, and react-modal.

Test Plan:
* Enable "Better File Browsing" feature flag
* Full regression test to make sure that no
  previous functionality was broken

Change-Id: I5e5029b361f51cfad445cf696027e9482e8a04a9
Reviewed-on: https://gerrit.instructure.com/49577
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-03-13 16:34:11 +00:00
Clay Diffrient fa343f9715 Refactors Add Module Item for Files
Converts the "Add File" portion of the "Add Module Item" dialog
into a React component.  It also sets up a Folder and File store
for interacting with the API.  It also modifies the behavior
so that folders that do not contain any files are not shown in
the select box.

fixes CNVS-13036
closes CNVS-18302

Test Plan:
  - Go to the modules page in a course that has some files.
  - Add a file to a module via the file menu.
  - Create 200+ folders with at least one file in each.
    You can import and expand this zip to make this a lot easier:
     http://goo.gl/lNtfx5
  - All files should be visible.
  - Create another folder, with no files within it.
  - That folder should not be visible.

Change-Id: I93e520135acb66bd821b3d19cc387eec59b347c7
Reviewed-on: https://gerrit.instructure.com/49028
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-03-10 23:57:38 +00:00
Mark Severson 1a245e6bdd remove non-draft state wiki pages
test plan:
* regression test wiki pages

closes CNVS-16203

Change-Id: Ic37c69c8696151dc99f1df6f3cc9b013835b12a4
Reviewed-on: https://gerrit.instructure.com/42552
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-12-09 20:12:24 +00:00
Eric Berry 71d7f63ae1 Fixed missing description and poor placement of magnify glass background image
Fixes PLAT-782

Test steps:
- Go to 'modules' tab
- Click the '+' next to a module name
- Select 'External Tools'
- Ensure that the description appears and magnify glass icon is
  right aligned

Change-Id: I111d368182a8f1d8b410a4894531fc0f680e8695
Reviewed-on: https://gerrit.instructure.com/44898
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
2014-12-02 01:51:05 +00:00
Nathan Mills 6ffeddcc46 setup default lti2 placements
fixes PLAT-691

test-plan

install a test provider using this url template:
/accounts/{account_id}/lti/tool_proxy_registration?tool_consumer_url=https://lti-tool-provider-example.herokuapp.com/register

during install select no placements
it should show up in the assignment and module item selection

regression test module and assignment lti launches

Change-Id: Ie8a3bee8ddb9a8e9cb8671545448a4bb73caae73
Reviewed-on: https://gerrit.instructure.com/42623
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-11-24 23:34:28 +00:00
Clay Diffrient d9e22160f1 a11y: Gives reason for failure to create item
On the modules page this makes it so a reason is given
for why the failure occurs when it is from a blank assignment
title.

Modifies application.html.erb to have flash messages rendered
outside of #application so that they are read by screenreaders
when modals are open since everything in #application gets
aria-hidden when dialogs get opened.  Also changes
$.fn.errorBox from using '#aria_alerts' in favor of
$.fn.screenReaderFlashError. This necessitates a change in the
spec for login_logout as well.

fixes CNVS-14964

Test Plan:
  - Go to the modules page
  - Add an item
  - Choose assignment type and a new assignment
  - Finish the form without a title
  - A popup tooltip should appear saying that a blank title can't be used.

Change-Id: I7647721cf95d522d61b929ef5e948610ff67f9c8
Reviewed-on: https://gerrit.instructure.com/43799
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2014-11-14 21:32:09 +00:00
Sterling Cobb 8b528e45eb make external tool list accessible
fixes CNVS-14932

Items should have been displayed in a link and list. They are now
displayed that way so should work in screen readers.

Test Plan

Given you have an external tool configured for a course
When you go to the modules page
And you add a new module item
When you select the "External Tool" dropdown option
Then you should see the external tool listed
And you should be able to click on it whith a mouse
And you should be able to select it with the screenreader and keyboard

Change-Id: I3ace34739c0eda3e45dc53df2d13f48cdf69077b
Reviewed-on: https://gerrit.instructure.com/44229
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2014-11-12 17:27:45 +00:00
Nathan Mills 639ca7075f lti2 launches from module items and assignments
fixes: PLAT-635 PLAT-652 PLAT-654 PLAT-655

test-plan:
*setup:
register an lti tool using the following url template
/courses/#{course_id}/lti/tool_proxy_registration?
tool_consumer_url=http://lti-tool-provider-example.herokuapp.com/tool_proxy

ignore the canvaception during the registration

testing:
*add some lti tools to module items, including 'default tool'
*make sure all launches, and selecting tools still works
*test the same things for assignments external tools

Change-Id: I0642c10c9b416057764b327d925cb6158fbf5cc9
Reviewed-on: https://gerrit.instructure.com/41726
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-10-24 16:30:59 +00:00
Aaron Cannon a3f7896656 A11y: Add content to Module dialog now resets focus after close
Fixes CNVS-15552

Test plan:
- Open modules page.
- Click the button to add content to a module.
- Close the modal that appears.
- Verify that the focus returns to the triggering control that was used to
  open the dialog.

Change-Id: Ibbf93a4fdf6e3eeb56e0e2dcf15881059e247d28
Reviewed-on: https://gerrit.instructure.com/41308
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2014-09-22 16:19:42 +00:00
Jeremy Stanley dcb5ddedf3 fix 'C:\fakepath\' in files uploaded via add-module-item
test plan: using Chrome 36, upload a file via the "Add Module Item"
dialog on the modules page. the module item should match the file name
and should have any path, fake or otherwise, stuck in front of it.

fixes CNVS-14380

Change-Id: I050ea93797468636b3d35846cf54ebe3d6c302cc
Reviewed-on: https://gerrit.instructure.com/38047
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-07-29 14:08:56 +00:00
James Williams dea0db86d4 add option to open external url module items in new tab
test plan:
* should be able to create and edit external url module items
 with an option to require the urls to be opened in a new tab

* on the modules index page, clicking on these items should
 directly link to the url in a new window, but also redirect
 the open canvas page to the module item page (so to register
 progression, and show the sequence footer)

* navigation through the sequence footer should be unaffected

* should work with draft state enabled and disabled

fixes #CNVS-12579

Change-Id: Ic0b33014acd43f72b05258705a87221c4b8d61c3
Reviewed-on: https://gerrit.instructure.com/35123
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-05-21 11:55:54 +00:00
Sterling Cobb 991858da2e allow pressing enter to add module items
fixes CNVS-12660

Test Plan
As a teacher
Given I have a module
And I've clicked the add module item + button to add a module item
When I fill out any of the forms
And I press enter
It should add a module item
And it should add the module item once.

As a teacher
Given I have a module
And I've clicked the add module item + button to add a module item
When I select an existing module item with my mouse
And I press enter
It should add a module item
And it should add the module item once.

Change-Id: Iebc25a1906519f16af36686e0d20ba3094ed6ba3
Reviewed-on: https://gerrit.instructure.com/34515
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-05-09 17:06:28 +00:00
Michael Ziwisky ed8d9c6be4 fix "New Assignment" option in module content dialog
refs CNVS-10771

this was first addressed in g/32653, but the "New Assignment" option was
misplaced in the template. as a result, the option didn't show up for a
Course without any AssignmentGroups.

test plan:
- same as g/32653
- specifically, in a new Course without any assignments, ensure the
  "[ New Assignment ]" option shows up in the dialog.

Change-Id: I5c41111477312a0c0e974b06b231a35404f6ca40
Reviewed-on: https://gerrit.instructure.com/33954
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2014-04-30 17:27:01 +00:00
Sterling Cobb 00736c5fb0 change width and height of select content dialog box
fixes CNVS-10042

When adding a new module item to the modules page, the select content
dialog box was much to small. This commit both makes the select content
dialog box larger and allows for the 'height' and 'width' option for
future implemenations. I also added test coverage to ensure options are
being used in the dialog box.

-- Test Plan --
draftstate/non-draftstate
- go to the modules page and click the button to create a new module
  item
- notice that the dialog box that pops up is now much larger that it
  once was, it should be 770px wide and 550px tall.
- also notice that the multi select boxes are full width now and
  margins have been taken away from the left hand side.
- also notice there is appropriate padding around the dialog window

Change-Id: I6e6507c19b3a7a9125cdaab12c1acad83eb62108
Reviewed-on: https://gerrit.instructure.com/32518
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-04-02 17:23:12 +00:00
Jacob Fugal 5d4ddfc68c convert legacy/add_assignment from bundle
the only place it was used as a bundle was in a partial only required by
another partial that includes another bundle that also required this
directly (phew). then once it's not a bundle, attachAddAssignment
doesn't need to be a method on window, and the $(document).ready hook
can move into the requiring bundle.

Change-Id: I5a0059543066933b299d58311e0a7b5cb87235ee
Reviewed-on: https://gerrit.instructure.com/31807
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-03-13 23:25:41 +00:00
Aaron Shafovaloff 20f692c884 upgraded requirejs to 2.1.10
- upgraded raphaël to 2.1.2
- upgraded FileAPI to 2.0.4
- amd-ified files
- removed unnecessary shims
- removed "use!" usage
- removed "order" requirejs plugin
- using new shim configuration format
- replace deprecated require.resourcesDone with !window.requirejs.s.contexts._.defQueue.length
- using UglifyJS separate from r.js
- added keep_trying_until in selenium specs to fix timing issue
- fix race condition in take_quiz.js with .file-upload-question-holder

Change-Id: I8c205ef4c80115fa0cbd662c184490f1b9626336
Reviewed-on: https://gerrit.instructure.com/29683
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2014-03-10 22:27:53 +00:00
Brad Humphrey 45f3bb468b lti configuration refactor
this commit is to help make canvas extensions more robust by
allowing tool level defaults and allowing both tool domains and launch
urls. Also added some helper methods for getting the correct properties,
and refactored to use the new helper methods.

Test Plan:
- Add a tool with both a domain and an launch url
- It should not give an error

- Add a tool configured with defaults for for canvas extensions
(such as icon_url, url, selection_height, selection_width, etc)
- Add a canvas launch (resource_selection, editor_button, course_navigation, etc)
with minimal configuration
- The canvas launch should inherit the properties from the extensions default
- Add an launch that has its own properties
- The launch should prefer its properties over the defaults

* should test that all launch types are accepting defaults

closes #CNVS-4498

Change-Id: I0dd4e78efb54db9c0cd1204383934db50f402674
Reviewed-on: https://gerrit.instructure.com/17715
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-04-29 21:05:58 +00:00
Brad Humphrey 49c6521ad8 turning in homework from LTI tools
adds a new LTI extension, "content", that
defines the interaction for sending content from
a tool provider to the tool consumer.  This extension
will replace the "embed_content" and '"select_link"
selection_directives, as well as adding allowing
am external tool to submit content for a homework
submission.

also starts sending intended_use, return_types, return_url
and file_extensions as part of the LTI launch with the new
extension.

test plan:
- make sure the "more" tab only shows up when there are valid tools

- install at least one valid tool
  (make a homework_submission tool by taking the xml for
  a resource_selection tool and replace "resource_selection"
  with "homework_submission")
- click "more"
- make sure you can't submit the assignment when no
  resource has been selected

- set an assignment that only allows file uploads
- try selecting a url from the tool
- make sure it errors out

- set an assignment that only allows file uploads
- limit the file types
- try selecting a file with a non-supported file extension
- make sure it errors out

- set an assignment that only allows file uploads
- try selecting an invalid file from the tool
- try submitting the homework
- make sure it errors out gracefully

- set an assignment that only allows file uploads
- try selecting a file from the tool
- make sure the submission works correctly

- set an assignment that only allows urls
- try selecting a file from the tool
- make sure it errors out

- set an assignment that only allows urls
- try selecting a url from the tool
- make sure the submission works correctly

Change-Id: I8df682bc73087681159110ab02f77f0e5a2b3911
Reviewed-on: https://gerrit.instructure.com/13419
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2013-03-27 14:52:12 +00:00
Jacob Fugal 1bfe209a77 remove circular dependency in ajaxJSON/instructure_forms
circular requirement dependencies break qunit for some reason now
(recently started). they appear to be fine in production, but we lose
test coverage. this circular dependency was one of the worst offenders.

each defined methods that made more sense in the other, and depended on
things from the other. since only one of the methods moved actually
depended on anything from the current host, this resolves the
dependency.

most of the files that needed one or more of these three methods already
included both, so it was just a comment change in which file is
providing which method. a handful added a new require. one file dropped
a dependency (yay).

jquery.ajaxJSON no longer pulls in jquery.instructure_forms, so if
something was depending on instructure_forms implicitly through
ajaxJSON, that may be broken (and should be fixed by making the
requirement explicit).

meanwhile, take advantage of touching the zip_file_import_form partial
to extract its js into a bundle.

Change-Id: I3b85ab267748a7492662e4e3281820d749d3fe08
test-plan:
 - primarily a refactor. no new behavior, just check for regressions,
   particularly around zip_file_import_form
 - rake js:test should include most if not all javascript specs now (a
   large percentage didn't run before)
Reviewed-on: https://gerrit.instructure.com/15411
Reviewed-by: Ethan Vizitei <ethan@12spokes.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clare Hetherington <clare@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-11-26 16:19:37 -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
Zach Pendleton 7021bbca63 display error when adding an external tool w/o url.
fixes #11009

the dialog to add an external tool to a module previously allowed
users to add a tool w/o a url, which threw an unmanaged error. now,
display an error to users who try to add a tool w/o a url.

test plan:
  * attempt to add an external tool to a course module, but leave
    the url field blank;
  * verify that an error is displayed;
  * verify that properly formatted external tools can still be
    added successfully;
j

Change-Id: I4d4218d4346d4bb3c3910ab336d7b07fb939abd5
Reviewed-on: https://gerrit.instructure.com/14292
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-10-11 14:28:29 -06:00
Zach Pendleton 3a3918f7da fix "add item to module" link. fixes #10423
previously, clicking the "add item to module" link would throw
an error, preventing the new assignment dialog from launching
and breaking js execution on the page. now this links works as
expected.

this commit also updates the button styles on the add module item
and new assignment modals.

test plan:
  * as a teacher or site admin, navigate to the course modules
    page;
  * using a new or existing module, click the "add item to module"
    link, and then select "[New Assignment]" from the multi-select;
  * verify that the new assignment form appears;
  * close the modals and click "add item to module" again; verify
    that the dialog displays as expected.

Change-Id: I9bce2fd50cbbb14afa8c5473d299ab3c4f8a125b
Reviewed-on: https://gerrit.instructure.com/13980
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-10-09 12:31:02 -06:00
Ryan Shaw ac9eebb275 new discussion topics/announcement index, edit and create
closes: #7172

test plan:

* open discussion topic index page:
  - see how it looks in blank course
  - full course
  - try graded & unread filters (make sure you see things you expect to and not those you don't)
  - do bulk actions by clicking checkbox for a few and hitting delete and lock buttons
  - verify infinite scroll works
  - verify that as a student you don't see posts that had delayed posting
  - click "create new" button to make a new one, make sure it works
  - do all the above in the announcement index page

* while viewing announcements index:
  - verify teacher can create external feed on right
  - no right side unless external feeds exist or they are teacher
  - external feeds are listed
  - only teacher can delete external feed

* while editing/creating new discussion/announcement
  - verify that announcement cant be made into assignment
  - for discussion topic, set as assignment and make sure the assignment settings set.
  - cant change discussion -> announcement (& vise versa)
  - type crazy & blank input, verify that it validates it for you
  - title cant be longer than 254
  - make sure these features work:
    - podcast feed
    - student posts in podcast feed
    - delayed posting
    - toggling threaded/unthreaded
    - must post before seeing replies
  - attach file, remove file attachment, upload new attachment should work

* make sure announcements/discussions look & behave right in other places they show up
  (like course, user dashboard)

* if you can think of any other places where you can edit/create discussions/announcements, make
  sure that still works

Change-Id: Ib0acaff8542bf09f99cd7aa99fb3ed16c999d224
Reviewed-on: https://gerrit.instructure.com/12655
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-17 09:26:04 -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
Brian Whitmer ab2dceb7b8 don't require url or domain for canvas lti-extensioned tools
When tools have one of the Canvas LTI extensions set, they
shouldn't be required to have a url or domain. In that case
they also shouldn't show up in the list of tools that can
be used to add items to a module.

test plan:
- try adding a tool by hand with no url or domain
- make sure canvas doesn't let you

- try adding a tool using xml (examples at lti-examples.heroku.com)
  that doesn't have url or domain, but does have a canvas lti
  extension (any extension other than resource_selection)
- make sure canvas lets you
- this non-url non-domain tool shouldn't show up in the add modules list

- try adding a tool using xml (examples at lti-examples.heroku.com)
  that doesn't have url or domain, but does have a canvas lti
  extension (specifically resource_selection)
- make sure canvas lets you
- this non-url non-domain tool should show up in the add modules list

Change-Id: Ie575c52da610f41b1afe09fbd838b0fd0da39ff2
Reviewed-on: https://gerrit.instructure.com/10251
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-05-25 08:35:07 -06:00