Commit Graph

9 Commits

Author SHA1 Message Date
Clay Diffrient c893bf9d12 Run prettier and add in public/javascripts to prettier whitelist
This also adds things in this directory to the whitelist
to make sure nothing ugly gets introduced.

Test Plan:
  - Automated tests pass
  - Make a non-pretty change in a js file within public/javascripts
  - Commit it
  - Notice it has been prettierfied

refs COREFE-347

flag = none

Change-Id: I554c5fd455ebc5690aa88b3b9858adbc11e2a966
Reviewed-on: https://gerrit.instructure.com/212575
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-10-10 22:09:33 +00:00
Ryan Shaw 59401789ce make js bundles smaller by splitting up 18n scopes
closes: CORE-2923 CORE-2736

these are just low hanging fruit, because a bunch of different files
included in different chunks used the same i18n scope, that means that
all of those strings were included in multiple chunks even though they
weren't needed by that page.

test plan:
* in a canvas where you have run a weback build with translations
* as a user that uses a non-english language like spanish
* click around a few pages like gradebook and make sure they work the
  same as before.
* you should also notice that our prod js webpack bundles are smaller

Change-Id: I937d3268769ca50ef3416e4cc05fcb33a42a0c17
Reviewed-on: https://gerrit.instructure.com/192684
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-05-09 15:23:47 +00:00
Carl Kibler 253a77b24e make file chooser in submissions awesome
When submitting file for an assignment the file tree wasn't keyboard-
focusable or even usable. It was an ancient, never-worked mess. Now it
sports the React-based FileBrowser with brand-new keyboard-handling.

fixes ADMIN-1547

test plan:
 - Need assignment wtih File Upload submission type
 - Go to submit as student and:
 - Tabbing with keyboard focuses 'Add additional file' and
   also 'Choose an existing file'
 - Click/enter on Choose existing and screenreader says Collapsed
   or Expanded appropriately
 - File tree works well with keyboard and mouse, loading user files
 - Selecting a file with Enter key says 'selected <filename>'
 - Submitting after a file has been selected works
 - Switch to RCE element on like a Page or discussion topic and do
   Upload file->Canvas and make sure file tree there works still and
   has new keyboard enhancements.

Change-Id: I338b458fd331116b3245f0196b9e026b96739a22
Reviewed-on: https://gerrit.instructure.com/170417
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
2018-11-28 22:15:18 +00:00
wdransfield 619a647771 Add EULA timestamp to LTI tool file submissions
closes: PLAT-3109

Test Plan:
* Verify you can still create an online_upload submission via API
  withouth specifying a eula timestamp
* Install a plagiarism detection tool
* Install https://lti-tool-provider-example.herokuapp.com/xml_builder
  using all placements
* Create a single assignment with submission types 'onine upload' and
  'text entry.' The assignment should be associated with the
  plagiarism detection tool

File Upload & Text Entry
  - As a student visit the assignment. Click the 'File Upload' tab
    and upload a file.
  - Verify the tool's EULA is displayed by a checkbox
  - Verify the checkbox must be clicked before submitting
  - Verify the page allows submitting once the checkbox is
    clicked.
LTI Homework Submission Placement
  - Click the LTI submission tab
  - Go through the content item flow and return a
    File Item
  - Verify a link to the plagiarism tool's EULA
    is shown.
  - Verify the checkbox must be clicked before submitting
  - Verify submission is successful once box is checked
* For all submission types verify the the `eula_agreement_timestamp`
  is set in the DB in the submission's 'turnitin_data' (i.e.
  turnitin_data: {:eula_agreement_timestamp=>"1522430904822"})
* Verify if the plagiarism detection tool has no EULA offered the
  checkbox does not appear in the LTI submission tab.

Change-Id: Idb08d3c5d37c8c05ebf075f3c95c33c4c531aabf
Reviewed-on: https://gerrit.instructure.com/145314
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2018-04-03 19:19:08 +00:00
wdransfield 46eb7560a3 Properly record EULA timestamps when online upload and text entry
Fixes PLAT-3035

Test Plan:
- Create an assignment that uses the plagiarism platform and has
  a submission type of both "text entry" and "file upload"
- As a student submit to the assignment by text entry.
- Verify you must agree to the tool's EULA
- Verify that as the tool you can use the LTI Submission API
  to retrieve the timestamp of when the user agreed to the
  Eula.
- Submit via text entry and verify the same things.

Change-Id: I6af8d4158849b5232a4bba9dd9e126481a74d067
Reviewed-on: https://gerrit.instructure.com/139249
Tested-by: Jenkins
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2018-01-26 21:19:13 +00:00
wdransfield 053ffc39ca Store EULA agreement timestamp
Closes PLAT-2879

Test Plan:
- Install a plagiarim tool that offers a service named
  'vnd.Canvas.Eula'. Example:
  {"endpoint"=>"http://originality.docker/eula",
   "action"=>["GET"],
   "@id"=>"http://originality.docker/lti/v2/services#vnd.Canvas.Eula",
   "@type"=>"RestService"}
- Associate the tool with an assignment.
- As a student go to the assignment submission page.
  Verify and verify the page requires agreeing to the
  Eula before submitting.
- Retrieve the submission via api using the plagiarism
  tool and verify the submission object returned contains
  a timestamp showing when the user clicked the checkbox.

Change-Id: I2a8cac02666b66fbb76d4b55f980a45dfdac2fa6
Reviewed-on: https://gerrit.instructure.com/129858
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Karl Lloyd <karl@instructure.com>
2017-11-02 19:43:35 +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
wdransfield 9b51eb1c50 Use content item in 'more' tab HW submission
Fixes PLAT-1549

Test Plan:
- Create an assignment with all online entry options
  set for submission type.
- As a student navigate the assignment
- Select the 'more' tab and choose an external
  tool.
- Verify that submission succeeds for the Lti Link
  type.
- Resubmit the assignment using a tool from
  the more tab, this time using FIle Item
  as the content item type.

Change-Id: I3f5b763cad97ddf5cf19bbcb7ea299b1354cbb94
Reviewed-on: https://gerrit.instructure.com/89916
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2016-09-15 21:50:18 +00:00