auto-corrected, with post-review checking for possible nilness
Change-Id: I89c30b92691a2a5f73d98d9c8ac721c50d3a4ba7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278014
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
[skip-stages=Flakey]
auto-corrected (with manual post-review looking for possible non-array,
non-string slices that might go bad, with none found)
Change-Id: I00feba96f58f701ed1f668f86928b8871d0d8ef2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277991
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
During user deletion, workflow_state was changed to
'deleted' on the Pseudonym, but deleted_at property
was not set. This change fixes this, deleted_at
will be set to the current time.
Closes SOS-2378
Test plan:
- Do a SIS import with one active user in it
- Change the status of the user to 'deleted' in CSV
- Run SIS import again
- Check the deleted_at property for the given user
in the pseudonyms table of the Canvas database
flag = none
Change-Id: I6ea6cfedc5e2889ff8ce6914978137025f49cd68
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277663
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
[skip-stages=Flakey]
auto-corrected, with manual review to identify possible nilness
Change-Id: I205436e5c3cb37aae99ea552c7d14e6d1a04ef06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277893
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This provides an API for several actions that make moderating
ePortfolios easier. You can list all ePortfolios for a user, show
details, moderate spam status for 1 or all of a users' ePortoflios, and
delete or restore an ePortfolio
Listing and deleting can be done by the owning user, but all the
moderation actions require the user to have the moderate_user_content
permission.
There is currently no support for creating a new ePortfolio or updating
the content of an existing ePortfolio.
closes FOO-2188
flag = none
test plan: run through the new API endpoints, make sure permissions and
functionality are correct.
Change-Id: I3ffa58adb00c466a601a41a05307c24bb406fa42
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273956
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
[skip-stages=Flakey]
the balance. mostly. Lint/UriEscapeUnescape is put in the pending
block because it's so touchy, and I didn't want to deal with it
right now
all manual
Change-Id: Ibeb81e013f56f160d51f7d237a9bcfe98daa1e53
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277569
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
at least get them much closer.
1. typeset math using svg by default, which is how the image is generated
2. size the image so it matches the surrounding font-size
Also, still typeset math from images even if the image fails to load.
closes MAT-501
flag=new_math_equation_handling
SIZING MATH REQUIRES A COMPANION CHANGE TO MATHMAN (the other stuff doesn't)
- clone git clone ssh://<yourid>@gerrit.instructure.com:29418/mathman
and follow the instructions for building.
- checkout https://gerrit.instructure.com/c/mathman/+/277389
- build it (once built, you don't have to run in in docker)
- in a canvas rails console:
Setting.set(
'equation_image_url,
'http://localhost:8000/svg?tex='
)
http://localhost:8000 is where mathman is via `node app.js`
it's at http://mathman.docker if in docker (at least that's
what the README says, I don't really know)
- test mathman by requesting `http://<mathman-url>/svg?tex=17`
and expect an image of "17". now try with `request /svg?tex=17&scale=2`
and your "17" shoul be twice as large.
- restart your canvas server
test plan:
Updated typesetting:
- have a question_bank quetsion with math and answers with math
- include the question in a quiz
> verify that the question looks the same in the question bank
as it does when previewing/taking the quiz
- if your math includes a "g", it should look the same
- the size of the equation should be pretty close
Sizing to match:
- turn on scale_math_equations site admin feature
- put an equation w/in a paragraph with a large font, or
add an equation to the rce, select it, and change the font size
- click on the equation, edit equation, click insert equation
w/o changing anything
> expect the equation to match the larger font.
- extra credit: DO THIS WITH AND WITHOUT MATHMAN PLUGIN ENABLED
(yes, there are 2 paths canvas takes to mathman)
make sure to update dyanmic-settings.yml's math-man entry
math-man:
base_url: 'http://localhost:8000'
use_for_svg: 'true'
use_for_mml: 'false'
- at /plugins, enable mathman plugin and ensure use_for_svg istrue
Error handling:
- change the URL to mathman to a dead end
- load a page with math equation images
> expect the math to be typeset by mathjax
Change-Id: I354e98a0a0256740ce5b4937f5b4e3adc690fe51
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277245
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
and gems that have strict dependencies on it
needed to rework BasicLTI::BasicOutcomes to avoid YAML serializing
Nokogiri::XML objects, since it will now raise an exception when
trying to deserialize. it didn't need them before, I just needed
to adjust the call to be a class method to avoid bringing along
the unnecessary context
also, nokogumbo was folded into nokogiri as of 1.12, so no need
to have it explicitly
Change-Id: I6f95ee897f4764b9703d4f09ff3182710a267c6f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274652
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes INTEROP-4606
flag=none
Given "Tool 1" is the last tool on a page, Canvas currently uses the
downcase'd name for the bookmark, e.g. "tool 1". When using the bookmark
(in restrict_scope()), The collation key for the tool in the database
(collation key for "Tool 1") is greater than the collation key for "tool
1", so it is included in the output for the second page as well.
I thought at first we could just not downcase the tool name in
bookmark_for(). However, for the tools page, we create bookmarkers for
the LTI 2 tools and LTI
1 tools and merge them by comparing the bookmarks for each object.
So the essential problem is: merging bookmarks needs to use same
collation technique as fetching. Canvas::ICU() appears to be _mostly_
the same collation algorithm as postgres uses, with these exceptions:
* I found a Unicode collation test and did find some _extremely_ rare
characters that caused different orderings between Canvas::ICU() and
public.collkey(), but I'm confident they would never be used in an LTI
tool name and probably almost never any text of any language.
* We may soon be moving from public.collkey() to COLLATE
public."und-u-kn-true" but I tested these too and it only differs for
extremely rare characters.
* I did not test different locales.
However, the worst-case scenario is the bookmark merging doesn't get the
last key in the PG collation and we get duplicates again; we would never
skip (not show) any tools in the pagination.
Test plan:
- Have some tools with both lower- and upper-case letters, ideally a mix
of LTI 1 and LTI 2 tools.
- Open ui/features/external_apps/react/lib/ExternalAppsStore.js and edit
the PER_PAGE constant to force a page break before the end of your
tools. Break in a place near the tools with both lower- and upper-case
letters.
- Open the Apps listings page in account or course settings and make
sure there are no duplicate tools listed where the page breaks (two
different API calls are made).
- For the ultimate test try changing PER_PAGE to 1 and make sure the
tools are still in the same order and there are none skipped or
duplicated
Change-Id: I3169692a16f9bc0eac7bdbba94beebf73df6490d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276660
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
all manual
note that for any methods moved/re-indented, I made no other changes
(except possibly a remove of a `self.` on a method call to call another
now-private method) for ease of review
Change-Id: I0cca6644264a0b46a45a1a5c99021c9deb64fca0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277532
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This moves the inst_access gem to the public repo and references
the now published inst_access gem instead.
Github:
https://github.com/instructure/inst_access
Rubygems.org:
https://rubygems.org/gems/inst_access
Test Plan:
- Specs pass
flag = none
Change-Id: I6002b118723e5a329202085a6c649a857e34d0e3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277527
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
[skip-stages=Flakey]
all manual
the fixes are a little scattered, since the same method doesn't work
everywhere depending on requirements. mostly I changed to `let`, but
some required `stub_const`. For `let`, I eventually settled on
avoiding a dedicated `let` for the class if it's only used one, and
it's a trivial class just to include the module. otherwise there's
a separate `let` for the class, and if there's only one it's named
`klass` instead of something contrived.
Change-Id: I84734c963d4789be3ec3cd852cca623e7c2a08df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277285
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes INTEROP-7116
flag=none
Test plan
- Have a course with new quizzes set up
- Have a new quiz set up for testing
- Ensure student view student can see
the quiz when the course is active
- The student view student should
get a concluded message if the
course is concluded
Change-Id: Id160cc51fe37337baf65c36e46ce9947a05c5776
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277149
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
fixes MAT-374
flag=none
test plan 1:
- Upload a pdf to course root folder.
- Set visibility of the file to unpublished.
- Create a page with a link to the file (using
RCE course links).
- Replace the pdf (same name, without changing
visibility).
- As a student, navigate to the page and click the
file link.
- Verify that there is no error and Canvas doc
viewer is opened (saying that the file is locked).
test plan 2:
- Upload a pdf to course root folder.
- Set visibility of the file to date-locked.
- Create a page with a link to the file (using
RCE course links).
- Replace the pdf (same name, without changing
visibility).
- As a student, navigate to the page and click the
file link.
- Verify that there is no error and Canvas doc
viewer is opened (saying that the file is locked).
Change-Id: I91c79dd1ec1ab362eb387ac39dab9a638fc275f0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275803
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Juan Chavez <juan.chavez@instructure.com>
Gradebook csv export should work for both student name or
separate first and last names
closes EVAL-1989
flag=gradebook_show_first_last_names
Test plan:
With the siteadmin FF ON, and the account admin setting to allow
showing student first/last names enabled, as a teacher:
1. Select "Split Student Names" option from the view options menu
2. Verify the gradebook grid shows separate columns for student
last and first names
3. From the gradebook actions menu, select export
4. Verify the exported csv has values for student last and first
names (in this order, comma separated) and rest of the values are
correct.
5. Unselect the "Split Student Names" option
6. Verify the grid has 1 column for student name
7. Export the csv, and verify the csv has 1 column for student
name and rest of the values are correct
Change-Id: Ia38e9d47333414e3fdac67eddc820547126ea345
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276073
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
all manual
several instances I noticed that the entire method was unused, so removed it
Change-Id: I14ffe7d4b6966ee790e32410f1dbaf5b26ea7f21
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276513
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This flag is useful for if an LTI tool needs to provide a grade
passback, but would prefer to use the grade in canvas already if a
teacher graded via the gradebook instead of the tool.
An example of where this comes into play is if an LTI tool's grade
passback is delayed, during the delay a teacher manually grades in
canvas's gradebook, and then later the grade passback happens. We know
that certain institutions would prefer the teacher grade stay. (Why the
teacher is giving a different grade than the LTI tool? No idea.)
test plan:
- specs pass
Change-Id: I2b166f892cc11bfc64522a850944a91aa4d94a96
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274389
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
closes INTEROP-7069
flag=lti_deep_linking_line_items,lti_deep_linking_module_index_menu
why:
* a new addition to the IMS LTI spec is to accept line items as part of
a deep link response, and the Canvas way of handling line items is to
create an assignment
test plan:
* with a 1.3 test tool set up, launch the tool from either the modules
or assignment index menu (3-dot button in top right of page)
* fill in the line item box in the test tool with:
```
{"scoreMaximum":10,"label":"line item test","resourceId":"id","tag":"test"}
```
* fill in the available box in the test tool with:
```
{"startDateTime":"2021-10-18T14:32:07Z","endDateTime":"2021-11-18T14:32:07Z"}
```
* fill in the submission box in the test tool with:
```
{"endDateTime":"2021-11-18T14:32:07Z"}
```
* send the content items back to Canvas
* the page should reload
* you should have one new assignment, titled "line item test"
* it should be worth 10 points, and launch the test tool when opened
* it should unlock on Oct 18 and lock on Nov 18, and be due on Nov 18
* launch the tool from the index menu again and this time fill in the
line item box with:
```
{"label":"this should do nothing"}
```
* submit the content items back to Canvas
* the page should reload
* you should not have any new assignments, since scoreMaximum is a
required field and was not present
Change-Id: I5a7cd02f20da23f162efc7705ac1d98cf1bffe8b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272069
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alexandre Trindade <alexandre.trindade@instructure.com>
QA-Review: Alexandre Trindade <alexandre.trindade@instructure.com>
refs FOO-2529
flag=none
TEST PLAN:
1) sentry error goes away
Change-Id: I32305a316832fa21bd1edb8550cba309a3222c35
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276823
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>