since we have the objects anyway
Change-Id: I41fd0b8e6a4ccbe5178bcf3f64a3768eaa47341f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269228
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>
refs INTEROP-6915
flag=none
Test plan:
- launch a tool in a place that returns data (content item / deep
linking), except RCE (that follows a different code path). For
instance: choosing a tool for a new assignment of submission type
"External Tool", or adding an External Tool to a module from the
modules page
- check that the tool launch still works
- 'inspect element' and check the title of the iframe. It should be the
name of the tool.
- without refreshing the page, close the dialog and choose another tool
with a different name.
- the iframe title should have changed names to match the new tool.
Change-Id: I02c5ae2586c4308bb661ef2e8e8992db66006447
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270394
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
why:
* API calls can query by lti_context_id, which on the User model is used
by LTI 1.1
* they can't currently query by lti_id, which on the User model is used
by LTI 1.3
* additionally, none of these lti id queries are documented
closes INTEROP-6971
flag=none
test plan:
* get a User, note it's id, lti_context_id, and lti_id
* make an API call to get details about the user:
/api/v1/users/:id, or /api/v1/accounts/:account/users/:id
* providing the id for :id should work
* providing lti_context_id:<the lti_context_id> should work
* providing lti_1_1_id:<the lti_context_id> should work
* providing lti_1_3_id:<the lti_id> should work
Change-Id: I38a7de393b70b55bba673a9f0c7cb38c8e1bb853
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270732
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
- not directly related to the RCE, but now preload the
3 lato-exended font variants likely to be used
on the page. this keeps font loading from blocking
- the big change is to make it possible to limit the number
of RCEs that will fully render on page load. This should
address the loading issues for quizzes with many essay questions
(the sample quiz from Harvard had 30 + other questions)
For now, the necessary property is only being set on the
take-quiz page
closes: MAT-355
flag=rce_enhancements,flag=rce_limit_init_render_on_page
test plan:
account flag.
- create a legacy quiz with > 5 essay questions. Feel
free to have other questions in there too if you like
- preview or take the quiz
> expect all 6 RCEs to be created on the page
- you could use React dev tools or
document.querySelectorAll('.rce-wrapper').length === 6
- turn the "RCE Limit number of RCEs initially rendered on th page"
account feature flag on
- take the quiz again
> expect only the first 5 RCEs to be fully rendered
- scroll down to the bring the 6th into view
> expect it to be fully realized
- while scrolled to the bottom, refresh the page
> not that the 6th RCE is in view, expect it to be
fully realized also
Change-Id: Idd76a56c4ea69e45a4f1cc28e3cd8561b40c2403
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270075
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Jon Scheiding <jon.scheiding@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Community links should never be added to the codebase itself anymore.
Instead they should be referenced as a translation with a key of
'community.#{key}'. The links should be stored in config/locales/community.csv,
which is a download of the 'canvas-import' tab of the
'Canvas Translated Guides Mapping' sheet managed by the community team.
There are a few links that the community team says should be updated, that
will be done in a followup commit.
test plan:
- Spot check the various types of files (js/handlebars/erb/plain js)
- Try English, Spanish (or another non-english language in community.csv,
and Catalan (or another language not in community.csv)
fixes FOO-1771
Change-Id: I67534204c2236a3ff05642cb2d13b8f546da9498
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270622
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
closes MAT-178
flag=rce_buttons_and_icons
Test Plan
- Open the Buttons and Icons tray from the RCE in a course.
- Create a distinct button.
- Click Apply.
- Verify that a folder named "Buttons and Icons" is created.
- Verify that the button was saved to that folder.
- Create another distinct button.
- Click Apply.
- Verify that the previous folder contains the new button as well.
Change-Id: I1d1ff9f49485ea684c7d1e031448a11a80328c6f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269775
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Guilherme Baron <gbaron@instructure.com>
QA-Review: Guilherme Baron <gbaron@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
no need to load the association if we are only using the id
test plan
- specs should pass
refs VICE-1793
flag=none
Change-Id: Ied40488a559d7464add4108d47577f0431b1ce20
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270400
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
since it gets set on user. just need to clear out a proc that we can
regenerate on the fly anyway
Change-Id: If6241a7836ab8db6897e87eb36ea05cb4cef194b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270716
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>
closes QUIZ-8603
flag=none
test plan:
- create a NQ with students
- assign a diff due/lock date for a student A
- launch the assignment from Canvas module
- both student with/without overrides should be
able to launch/start a quiz session
Change-Id: Iee5dab2443fdd6a86088724c47729cbf888606f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270375
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
closes FOO-2237
TEST PLAN:
1) fail to write to pulsar with a non-pulsar error
2) error report lives in same shard as message
Change-Id: I30a8bb7b3cdc7b86b2e4feb5c6794c853616457d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270671
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
closes FOO-2236
TEST PLAN:
1) make pulsar writes happen, and then fail
2) errors that pile up are just the pulsar
kind, no variable name errors
Change-Id: I167f232b691f78c7a95a9d209147331855332ce7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270667
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
closes: LS-2417
flag=none
test plan:
- Confirm the course image feature behavers as expected
Change-Id: I3b4c2a204418562a25f0512104e3964082393bd7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270197
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
This module fills in enough sample information to have
ApplicationController#content_tag_redirect run without errors,
filling in the instance variables that are needed for
app/views/lti/full_width_launch.html.erb to render.
This can be used to write tests for LTI launch views without always
relying on Selenium.
Change-Id: I8057069eb83d0282d5c9dfaa104515659ce07c7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269674
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alexandre Trindade <alexandre.trindade@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
refs INTEROP-6931, INTEROP-6951
flag = none
used to be that no queries existed on the subgraph except the special
Federation ones, `_service` and `_entities`. that's because we're
creating a federation schema by subclassing our normal schema, and the
apollo-federation gem doesn't properly support that. it _will_, once
https://github.com/Gusto/apollo-federation-ruby/pull/135 is merged, but
until then we can work around it by explicitly re-defining the query
type for the federation subgraph.
Change-Id: I0fff25295af1044047713a120b9204b2ba0ce106
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270592
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
background information:
----------------------
if you make an API PUT to
https://example.instructure.com/courses/123/pages/foo
and include links to e.g.
https://example.instructure.com/courses/456
canvas will rewrite the link in process_incoming_html_content
to look like
/courses/456
which helps in being able to serve the content from multiple
domains (including, for example, cross-listed courses or
vanity URLs).
when exporting this content, canvas plugs in the primary
account domain to make the link absolute. this is necessary
because the package may be imported into a different domain.
the problem:
-----------
on import, these absolute links are left alone. if the content
is viewed on a secondary domain, the links will appear to be
to external content and navigation will be impeded (the user
may need to log in again, etc.)
test plan:
---------
1. have a canvas + multiple_root_accounts installation, with
multiple AccountDomains for a single root account. we will
call these A and B.
2. create two courses under this account, C1 and C2.
3. from domain B, create a page in C1 that links to C2
(e.g. http://domain-b.local/courses/2)
4. notice in the HTML for the page (as viewed in the Rails console)
that the link is actually to /courses/2 (at least, it should be;
this PS hasn't changed this part)
5. export the course
6. import into a new course
7. ensure in the Rails console that the imported content
also looks like /courses/2, with no domain attached
8. when the content is viewed through the web in domain B,
the link appears to be in domain B and navigation is unimpeded
flag = none
fixes LS-2390
Change-Id: I767a7722baa06a00a9da46612bc2e1457485b98d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270541
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes VICE-1770
flag=react_discussions_post
Test Plan:
-go into graphiql (http://localhost:3000/graphiql)
-run a query similar to
query MyQuery {
legacyNode(_id: "<your discussion id>", type: Discussion) {
id
... on Discussion {
id
_id
title
searchEntryCount(filter: all, searchTerm: "<your search term>")
}
}
}
-should get the count of all entries regardless of pagination
Change-Id: Iad2a074cf7e4574d2874c43e313758895247ebe0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270532
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
Removes a 200ms delay on search input. There's no need
for a delay because all the sorting happens client-side.
closes EVAL-1835
flag=remove_gradebook_student_search_delay
Test Plan:
1. Enable the 'Remove Delay for Gradebook Student Search' Site Admin
Release Flag.
2. Go to Gradebook, and search for a student name. Note that the
Gradebook rows start filtering immediately on input (previously,
there was a 200ms delay)
3. Disable the 'Remove Delay for Gradebook Student Search' Site Admin
Release Flag.
4. Go to Gradebook, and search for a student name. Note that the
Gradebook rows start filtering after a brief (200ms) delay after
input.
Change-Id: I10ccb281eb7a750b8a6f6b78f0bf7f52d174a9a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270184
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Extra validations were added to the DISPLAY_SHOW_ALL_LINK
flag in the JS_ENV object. Now, in addition to the navigation
configuration, it is checked if the current user is a student in a k5
subject
closes LS-2404
flag = none
Test Plan:
1. Create a page in a k5 subject, publish it and add it to a module
2. As student go to the k5 course home and click the Modules tab
3. Click on the page you just created
4. Expect to be redirected to the page and the "View All Pages" link
not be there
5.Open any page in a non-k5 course and expect to see the "View All
Pages" link as usual
Change-Id: Id56ecff11205f9e903eaf0bb76959f6f887976b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270314
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
so that we're not re-implementing it at multiple callsites
also remove unused error classes
Change-Id: I938d705729f2208532b4522eddbc8edfa4f2031f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269561
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>
closes EVAL-1555
flag=annotated_document_submissions
Test Plan 1:
1. Create a student annotation assignment.
2. As a student, go to the assignment (make sure the 'Assignment
Enhancements — Student' feature flag is disabled). When the
page loads, you should see the document for annotating; you should
not see a "Start Assignment" button like you normally would.
3. Click "Cancel", and verify the "Start Assignment" button shows up
and the document is hidden. Then click "Start Assignment" and
verify the document shows back up.
4. Make some annotations and then submit to the assignment. Then go
back to the assignment page. Verify the document is _not_ shown
and that if you click "New Attempt" the document shows up.
Test Plan 2:
1. Create an assignment that allows 2 types of submissions: text entry
and student annotation.
2. As a student go to the assignment (make sure the 'Assignment
Enhancements — Student' feature flag is disabled). When the page
loads, you should see the document for annotating. The
'Student Annotation' tab should be the first tab, and the 'Text
Entry' tab should be the second tab.
Test Plan 3:
1. Create a student annotation assignment.
2. In ui/features/submit_assignment/jquery/index.js, modify the
POST request so that it will always fail (I changed
'/api/v1/canvadoc_session' to '/api/v1/canvadoc_sessionx').
3. As a student, go to the assignment (make sure the 'Assignment
Enhancements — Student' feature flag is disabled). When the
page loads, you should see the 'Student Annotation' tab, the
content should read 'There was an error loading the document.',
and there should be a "Cancel" and "Submit Assignment" button.
Click the "Cancel" button. The tab content should go away and
a "Start Assignment" button should appear in the top-right.
Change-Id: I45ad44658d954a96205e591aaf80b992ed422545
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270127
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
the ModuleSequenceFooter now is part of the
SubmissionManager component and the button
tooltips are rendered using the inst-ui
library.
fixes EVAL-1777
flag=assignments_2_student
test plan:
- enable the feature flag
“Assignment enhancements - student“.
- create and publish a course with one teacher
and one student.
- create at least three assignments and add each
of them to a different module.
- acting as student, go to the first assignment
- notice the 'Next' and 'Previous' buttons
are placed in the footer aligned with the
'Submit Assignment' button.
Change-Id: Ie384ff5acdc52c2f5c765742d4668dbdee4b0766
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269313
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
fixes QUIZ-8550
flag=none
test plan:
- create a classic quiz
- embed an image in the quiz description
- export the quiz as a QTI file
- import the quiz from the QTI file as NQ
- the import should generate a NQ
- open the NQ and see that it has instructions
with an image
- import the same QTI file with "import as new quiz" disabled
- the import should generate a classic quiz identical to
the original
Change-Id: I399698f367e016816475d51423b5d42ed5135da1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269449
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
Reviewed-by: Jared Crystal <jcrystal@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
fixes INTEROP-6931
most of these changes are based on the guide at
https://github.com/Gusto/apollo-federation-ruby#getting-started
there should be no functional difference to the existing graphql API
endpoint.
test plan:
- regression smoke test on the `/api/graphql` endpoint
- testing the new `/api/graphql/subgraph` endpoint would involve
spinning up an Apollo Gateway server and registering that subgraph
with it, then ensuring you can issue queries, especially ones that
involve extension of the "Course" entity.
Change-Id: Ib4266941d28c5a8dc7c279a2909257d0a330fa7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270041
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
fixes INTEROP-6951
upgrade required some tweaks including the following:
- `GraphQL::Execution::Interpreter` removed from CanvasSchema because
it is now included in GraphQL::Schema by default
- `BaseMutation.input_type` adds arguments properly instead of using
`merge!`, which blows up because `own_arguments` is a frozen Hash.
(see https://github.com/rmosolgo/graphql-ruby/commit/55a955a84)
- `NotificationPreferencesContextType` gets defined just once to avoid
errors from specifying dupicate enum values each time its reopened
- `.graphql_name` needed in a couple of places where `.name` (or
implicit `.to_s` from string interpolation) previously worked.
(see
https://github.com/rmosolgo/graphql-ruby/blob/master/CHANGELOG.md#breaking-changes-14)
- `GraphQL::Schema` uses the new `GrpahQL::Pagination::Connections`
connections by default (previously `GraphQL::Relay::BaseConnection`),
so our custom `PatchedArrayConnection` and `DynamoConnection` classes
got redone in accordance with the new interface.
- https://github.com/rmosolgo/graphql-ruby/pull/2792 made it so
argument names are used as-specified, while previously they were
automatically snake-cased. so the `gradingPeriodId` argument of
`AssignmentFilterInputType` is now specified in snake-case, and
everyone is happy. (note that in the generated GQL schema definition,
it remains camel-cased, so the client interface is unchanged).
- some sloppy queries in specs have been cleaned up because the GQL
parser has been tightened up and was no longer recognizing them.
also, unrelated to the gem bump, but the inst_access_tokens route was
typo'd as a singular. here it's corrected to the plural.
test plan:
- since it's just a version bump, spec coverage should be sufficient
Change-Id: Ib73eed4c1356833dfe245188b0841c98ae2c378a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270132
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
so that we can return the same one every time if called multiple times
for the same context
Change-Id: I2c5825ab115c50d1332d05d1e3cecbe45cbe7ea1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270297
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
When submitting comments via bulk update, check the posted status of the
submission instead of the muted status of the assignment when
determining whether the comment should be hidden. This fixes an issue
that could cause comments not to appear when the submission had already
been posted (or had just been posted, in the case of submitting both a
grade and a comment).
fixes EVAL-1815
flag=none
Test plan:
- Have a course with at least two students (you need at least two so
that posting a submission for one student doesn't flip the
assignment's "muted" status)
- Take note of the ID of one of the students
- Create an assignment
- Take note of the ID of the assignment
- Using a REST client or similar, send a POST request to the bulk update
endpoint for the assignment (see below)
- As the student, open the submission details page
- You should see both the grade and the comment
Sending the bulk update request:
- Send a POST request to the endpoint
/api/v1/courses/<courseID>/assignments/<assignmentID>/submissions/update_grades
The content of the request should be multipart form data. The following
two lines will send both a grade and a comment to the endpoint for the
student whose ID is given by <student_id>:
grade_data[<student_id>][posted_grade]=5
grade_data[<student_id>][text_comment]=HELLO
Change-Id: Id3b97bf18ca888da2a2a04c372ff596335665f17
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269833
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Teachers that are also students should not get the
K5 detail view.
fixes LS-2387
flag=none
Test plan:
- Have a user that is enrolled in a k5 subject course as
both a student and a teacher
- View the subject course and click Manage Subject
- The course nav should be visible
Change-Id: I7b2c381a61418cd95c5f911c3ae9f151bb7b8a03
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270149
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Nate Armstrong <narmstrong@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
* teacherless? method always returned false, and has since initial
commit in 2011
* removed any code that depends on that being true, including a
permissions grant (given/can) which was always false. (side note:
'manage' and 'update' course permissions appear to be
now identical.)
* RoleOverride.teacherless_permissions was only being used by that
permissions grant
* After that, TeacherlessStudentEnrollment also then unused in code.
* I have also verified there are no Enrollment records with
TeacherlessStudentEnrollment anywhere in all shards on prod
* div.teacherless_invite_message was removed in 70bcc947cb, so I removed
some Javascript that references it
* teacherless in JS_ENV apparently also unused
* side note: commits containing a certain commit can be found using e.g.
git log -S 'TeacherlessStudentEnrollment' --oneline
Test plan:
- hard to test, so review very carefully
- grep through code for 'teacherless'
- try a couple things in the UI like having a teacher create a student
just to make sure nothing is completely broken
flag=none
closes INTEROP-6954
Change-Id: Ibbbcacf64a87c29adc719b1d61f7b3e2241fc83e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270287
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
also convert to a prepended module, and handle a bit more common boilerplate
Change-Id: I01fcccb39224dfa69e26a8a3368977911bf881dd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270194
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>
Test plan:
- From the Account menu click "Permissions"
- In the "Course Roles" tab find "Users - add / remove students in
courses". Disable this permission for teachers.
- Go to a course with a teacher
- Masquerade as the teacher and make sure they can see the
"Integrations" tab in Course settings and enable/disable MSFT sync
- Masquerade as a student and go to
/api/v1/courses/123/microsoft_sync/group (where 123 is the ID of your
course) and make sure you cannot access it
closes INTEROP-6917
flag=microsoft_group_enrollments_syncing
Change-Id: I2e65905fd4e2f53790c92c64f0f7024080032867
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270217
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
the latter has to allocate a new hash of all the attributes
everytime it's called
Change-Id: If21ffaf494b290f8cf6d52c35d5c7dddd9a7ad31
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270288
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-6859
flag=none
Test plan
- Run /api/lti/courses/:course_id/membership_service
for a course with at least a few users set up
and ensure that you don't get one SQL call each
for pseudonym, enrollment and past_lti_ids
for each user
Change-Id: I6819b68ada52d42e4fc14268059c5d8b83a42d3d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269599
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Allows users with admin rights over K5 subject courses to set a
separate image on the settings page to be used on the home page of the
course. If no banner image is set, then the home page will use the
card image. If no card image is set, then the home page will use the
course color. If no course color is set, then a defauly blue-gray
color will be used.
closes LS-2351
flag = none
Test plan:
- Create a new subject in a C4E account
- Expect the home page to show the course name on a gray background
- Go to the settings page and select a course color
- Expect the home page to show the course name of background of the
color you just selected
- Go to the settings page and upload an image for the Card Image
- Expect that image to show on the home page
- Go to the settings page and upload an image for the Wide Banner
Image
- Expect that new image to show on the home page
- Go back to the settings page, click the upper-right menu on the
Wide Banner Image, and choose "choose image"
- Expect the replaced banner image to show on the home page
- Go back to the settings page, click the upper-right menu on the
Wide Banner Image, and choose "remove image"
- Expect the banner image to no longer show on the home page
- Go to the settings page of a course in a non-C4E account and
expect the Wide Banner Image setting to not appear
BONUS POINTS:
- Set up Unsplash at /plugins/unsplash
- Set a Wide Banner Image on a C4E subject via Unsplash
- Make sure replacing / removing images works with Unsplash urls as
well as uploaded ones
Change-Id: I24c162fb142c8d57760a52abd67e17dd0c30dd18
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269902
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Reviewed-by: Jonathan Guardado <jonathan.guardado@instructure.com>
QA-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
test plan
- specs should pass
flag=react_discusssions_post
fixes VICE-1789
Change-Id: I7bbfd520007e941d2114c75fad88f73c377376d8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270234
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
So that teachers in concluded courses can still see their stuff.
Also show the 'manage home' button on empty home tab based off
:manage, since you can only edit home if you have :manage
closes LS-2410
flag = none
Test plan:
- Put a k5 course into a concluded term
- Visit the course as a teacher
- Expect to still see the manage course button at the top
- Expect other manage functionality to be disabled (like editing
announcements, modules, manage home)
Change-Id: I78aa2d328a025d4f6c2aa059136f22f9877d8fff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270206
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
didn't realize that helper method would return the raw relation as
an optimization, which if the relation doesn't have an order by on
it would be bad.
also fix the enrollments_api_spec to actually test bookmarks
and non-bookmarks, and simplify some of the logic in
EnrollmentsApiController#index both to clean up the code, and to
allow the specs to easily test both cases
Change-Id: Ifbaf588f787de7b54f3a26c6412cca81e2f34c4a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270186
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
test plan
- reply to a discussion entry
- it should properly set parent_entry_id
- reply to the new entry
- it should still set parent_entry_id
refs VICE-1779
flag=isolated_view
Change-Id: Ia633696165d8eb84960ebd446ff6dbeff4797983
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270224
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
The Account > Settings > Integrations Page has been updated to include
new fields that lets admins input a suffix that they want to append to
the result of the login attribute for each user when associating Canvas
users with Microsoft users. An additional field was added that let's
admins also select what Active Directory attribute they'd like to use to
associate Canvas user -> Microsoft users. By combining and modifying
these two fields, admins should have much greater flexibility when it
comes to configuring Microsoft Teams Sync for their account.
In addition, added support for the new integration_id login attribute to
the UI.
closes INTEROP-6918
flag = microsoft_group_enrollments_syncing
test-plan:
* Set up Microsoft Sync for your local Canvas and enable the appropriate
feature flag.
* Navigate to the Account > Settings > Integrations page.
* First, try giving all valid values. A tenant must be a valid domain
name and the suffix can be anything, so long as it doesn't have
whitespace. Most schools will likely append a domain name to this
though, so the placeholder represents that scenario. Make sure that
updating your settings and toggling the feature on and off succeeds,
and that your values are saved to the `account.settings` hash for your
account.
* Next, try to do some garbage input, both for the tenant and the
suffix. Make sure that the UI doesn't let you toggle sync or update
settings and warns you about the errors in your input. Also ensure
that the previously saved settings on your `account.settings` remain
unchanged.
* See if you can think of anything else to try and break the UI :)
Change-Id: I006e4de7d3bf9e4e0449972dedb58875abd9f89e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269282
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Ryan Hawkins <ryan.hawkins@instructure.com>