Commit Graph

2020 Commits

Author SHA1 Message Date
Ed Schiebel 59acf873aa Delete a troublesome modules spec
The modules spec was too fine-grained anywhay and has been deleted.
After that a gradebook js spec was failing many builds (including
this one), so I skipped it and created EVAL-2389 to address that.

closes LS-3096
flag=none

tet plan: passes jenkins

Change-Id: Ifa84eb77966f12caae6735024f1d3c47e6f78636
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/289275
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2022-04-08 13:27:05 +00:00
Ahmad Amireh 934692ac8d fix eager I18n.t() calls
fixes FOO-2800
flag = none

this addresses 17 phrases that were being looked up before the
translations were available which i'll list for the record:

    "cancel_caeb1e68" "close_d634289d"
    "community.admin_zoom_meetings_faq_add" "don_t_show_again_8c7b7297"
    "download_filename_781704f5" "expand_tutorial_tray_22630c49"
    "home_tutorial_tray_66826983" "modules_tutorial_tray_d58ac3cb"
    "next" "next_item_2d1ddc96" "next_module_item_19e835f3"
    "people_tutorial_tray_a87a6c48" "play_media_comment_35257210"
    "previous" "previous_module_item_a9e57348"
    "show_navigation_menu_34e7f441" "titles.external_link"

We got this list from Sentry. Most of the offenses were caused by
eagerly loading specific modules like the nav header, but then I
realized that the navigation_header feature was actually 2 things: the
nav header and a global jQuery blob that was touching everything under
the sun.

ui/features/navigation_header no longer contains that jQuery blob, that
is instead shoved into ui/shared/enhanced-user-content that gets run by
the initializer. I took the liberty to read through what's going on
there and re-arranged the blocks of jQuery into functions with names as
close to what I understood they were intending to do. Blobs that I was
certain to be dead code were removed entirely.

~ changes ~

- NewUserTutorial is now loaded when Canvas is ready and after the
  feature bundles are loaded
- features/navigation_header is no longer receiving special treatment to
  optimize Webpack's handling of it where it was being loaded before any
  other bundle
- features/navigation_header is no longer loaded unconditionally,
  only when the ERB asks for it, which is most of the time

~ test plan ~

the change should be caught by seleniums if there's a problem with them
so no manual QA is necessary, but FWIW I've tested them all locally:

- wiki page inside a module, to test ModuleSequenceFooter
- submit an assignment and as the teacher leave a comment that has an
  image, to exercise MediaCommentThumbnails
- enable the New User Tutorial feature and visit a course, verify the
  tray still behaves ok
- in a course, verify u can still toggle its menu using the (---) button

Change-Id: Ia626a8681158569db3bf6d735cc64d887d40164f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288710
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: Charley Kline <ckline@instructure.com>
2022-04-07 18:33:37 +00:00
Syed Hussain 75907eb741 Add gradebook setting to hide assignment group total columns
closes EVAL-2289
flag=enhanced_gradebook_filters

Test Plan:
With a gradebook with a few assignment groups and the FF enabled.
As a teacher:
1. Go to the gradebook and see that it shows assignment group total
columns.
2. Go to the settings, and check "Hide Assignment Group Totals" and
make sure that the gradebook does not show the corresponding columns
3. Go back to the panel and see that the setting is still checkeed
4. Refresh gradebook and see that the setting is still checked and
the corresponding columns do not show in gradebook.
5. With the FF disabled, there should be no view setting to hide
assignment group totals and the assignment group total columns
should show in gradebook.

Change-Id: I11e381fa5e206d3d0feaa3bc1472fa97f23e692a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287845
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
2022-04-06 16:31:05 +00:00
Jackson Howe fec1e2c943 Switch dashboard based off selected student
If the selected student is a k5 student, then show the k5 dashboard.
Otherwise, show the classic dashboard. When an observer switches
students, make a request to check if the newly selected student sees
a different dashboard then presently shown. If so, reload the page to
pick up the correct dashboard type. Users with teacher/admin
enrollments can still disable the k5 dashboard manually.

closes LS-3012
flag = observer_picker
[fsc-timeout=45]

Test plan:
 - Enable :observer_picker
 - Login as an observer who is observing some k5 and some classic
   students
 - Visit the dashboard
 - Switch between students - expect to see the k5 dashboard when
   selecting a k5 student, and the classic dashboard otherwise. The
   dashboard will reload if switching between k5/classic and will
   not reload if switching between students with the same dashboard
   type
 - Enroll this observer as a teacher as well
 - Select a k5 student in the picker
 - Choose "classic view" for the dashboard, and expect to see the
   classic view, even though the student is a k5 student
 - Expect to be able to switch between classic dashboard styles (i.e.
   card view, list view)

Change-Id: Ifa1388a7b8c802735c1d660a76506199886de32b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288259
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2022-04-04 22:14:14 +00:00
Noah 7d1d2038a2 Add final_grade_override to graphql
for context cards to determine status of override

flag = none
Closes OREO-1427
Closes OREO-1556

Test Plan:
  - make sure final grade override feature is enabled
  - Open gradebook, turn override on
  - Set override scores
  - Turn override off
  - Open context card, grade should not match override
  - Note: graphql/apollo caches the last query
        so change won't show up on same card
        open another, then go back to first

Change-Id: I2f95ee783e6f6dc11c66a1fad8bbf7323ff20369
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287601
QA-Review: Kwok Lam <klam@instructure.com>
Product-Review: Noah Rush <noah.rush@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Bryant Larsen <blarsen@instructure.com>
2022-04-01 20:12:16 +00:00
Eduardo Escobar ad9856354b include submitted classic quizzes in what-if scores calcs
fixes EVAL-2165
flag=none

test plan:
- have a course with atleast 1 student and 1 teacher.
- create a classic quiz assignment with a question that
  requires manual grading.
- as the student take the quiz.
- navigate to grades and try to enter a what-if grade.
- notice that the total does reflect the what-if grade.

Change-Id: I95d536e9f9336893896252d5ee562485c8e55e48
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285863
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
2022-03-31 19:52:19 +00:00
Syed Hussain 7e4116c267 Do not show word count for lti or external tool assignments
closes EVAL-2328
flag=word_count_in_speed_grader

Test Plan:
1. As a teacher, create assignments:
- basic lti
- external tool
- online text entry
2. As a student, submit to these assignments
3. As the teacher, goto speedgrader for these assignments and
make sure that the word count only shows for online text entry
assignment

Change-Id: I5674fb4f7038a1803ee1fa28815e452213165014
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287140
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Dustin Cowles <dustin.cowles@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
2022-03-30 13:42:34 +00:00
Spencer Olson 8b70802bee fix speedgrader anonymous moderated bug
flag=none
closes EVAL-2131
closes EVAL-2332

Test Plan 1:
* Prerequisites: Published course with active teachers and students, and
  the anonymous grading feature option enabled.

1. Create an assignment. Enable moderated and anonymous grading.
2. Submit some content as a student.
3. Enter some grades as the graders.
4. De-activate the student that submitted.
5. Go to Gradebook and in the student header menu select to view
   'Inactive' students.
6. Go to SpeedGrader and verify the deactivated student and their
   submission shows up. Take note of the student's anonymous_id in
   the URL query params.
7. Go to the Moderate page for the assignment as the moderator, and
   verify the anonymous name for the student (i.e. "Student 1") matches
   their anonymous name in SpeedGrader. You can verify this by hovering
   over the student link on the Moderate page and seeing what their
   anonymous_id is, and comparing it to the anonymous_id you noted in
   step 6.

Test Plan 2: Legacy Support for Concluded Students
1. Switch to the 'master' branch.
2. Conclude a student that has only a single active enrollment (this
   student must not have other enrollments, not even soft-deleted ones).
3. Create an assignment that is due for everyone.
4. In a rails console, verify no submission was created for the
   concluded student:

   user = User.find(<concluded student id>)
   Assignment.find(<assignment id>).submissions.where(user: user).count
   => should be 0

5. Switch to the feature branch for this commit
6. As a teacher, go to Gradebook and in the student header choose to
   view 'Concluded' students.
7. Go to SpeedGrader for the assignment you made in step 3.
8. Verify the concluded student that does not have a submission does
   not show up in SpeedGrader.

Test Plan 3:
1. Conclude a student in a course. It's important that the student is
   concluded before any of the following steps. It's also important
   that the student only has a single enrollment in the course
   (including soft-deleted enrollments). You can make sure the student
   only has 1 enrollment in the course with:

   # should return 1
   Enrollment.where(course_id: <course id>, user_id: <student id>).count

2. Create an assignment.
3. In the gradebook, select the option to show concluded enrollments.
4. Launch the SpeedGrader for the assignment.
5. Enable the Hide student names in the SpeedGrader settings.
6. Refresh the page and verify SpeedGrader loads as expected. And verify
   you can navigate to the concluded student in SpeedGrader.

Change-Id: I265ee97953d1a9ebd098911ed4388b0e1da49af7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282581
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Dustin Cowles <dustin.cowles@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
2022-03-30 13:39:23 +00:00
Spencer Olson c501387c96 make anonymous_id sorting case sensitive
closes EVAL-2358
flag=none

Fixes a bug where the DB sort of anonymous_id was case insensitive
which could result in students being shown out of order in SpeedGrader
(where the front-end anonymous_Id sort was case sensitive).

Test Plan:
1. Create an anonymous assignment
2. In a rails console, manually set the anonymous_ids of 2 submissions
   to 'B' and 'a' (we're using these values because they sort
   differently using case-sensitive sort vs. case-insensitive sort).

   sub1 = assignment.submissions.first
   sub2 = assignment.submissions.second
   sub1.update!(anonymous_id: 'B')
   sub2.update!(anonymous_id: 'a')

3. Go to SpeedGrader for the assignment and verify the student with
   anonymous_id of 'B' is sorted above the student with anonymous_id
   'a' in the select menu (you can see the anonymous_id in the query
   params of the URL when you select a student).

Change-Id: I60bd17342cc74d40274658c62739f576140b5977
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287952
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2022-03-29 20:27:53 +00:00
August Thornton f258a0a164 update acceptance use policy to be an actual link
Included a non-empty href attribute to the Link component
so we generated the appropriate <a> tag. had to re-work how
we populate this compononent because rendering links within
links is not desirable behavior when working with React
components.

refs FOO-2754
flag = none

Test plan:
1. Account --> Settings
2. Acceptable Use Policy --> uncheck
   "Allow passive acceptance of Terms of Service"
3. Have a user with: user.preferences[:accepted_terms] = nil
4. At the login screen verify "Acceptable Use Policy" link
   looks formatted in-line with the other links in the footer
5. Log in with that user and verify that the
   Acceptance Use Policy modal links are underlined by default
6. Accept the policy and verify the links rendered in the footer
   of the user's Dashboard are also formatted appropriately,
   specifically the "Acceptable Use Policy" link that is now
   underlined by default for better accessibility.

Change-Id: I428911ec1fcacbb66c39e45a4fe5242bb694d39d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287852
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2022-03-25 15:03:58 +00:00
Kai Bjorkman 8fae5e4ecd spec: fix problematic JS coverage report specs
closes EVAL-2354
flag=none

Test Plan:
    -specs pass consistently
    -JS coverage report does not time out

Change-Id: If4e11cbb7946293d9ac1026715b6657bf817292b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287796
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Bobby Buten <bobby.buten@instructure.com>
Product-Review: Kai Bjorkman <kbjorkman@instructure.com>
2022-03-24 14:57:03 +00:00
Ed Schiebel f4ad3b027b Downsize course image to fit course cards
sorry that there's no unit test, but jsdom just can't.

closes LS-3045
flag=none

test plan:
  - in course settings
  - select a large course image
  - click Update Course Details
  - open the card dashboard
  > expect the image in the card
  > expect the image to have been resized to fit
    - you can hover your mouse over the "div.ic-DashboardCard__header_image"
      background-image style entry in devtools and see that it's small
    - you can look at the network request for the image and see that the
      Content-size is smaller than the file you selected

  - back on settings, select an image that's smaller than 262x146
  > expect the image not to have been resized

Change-Id: I3b9d3619564c919066ca5c65c13200ca1f137493
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287583
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2022-03-24 14:38:07 +00:00
Aaron Shafovaloff f8458c8699 fix formatting from useScope commits
test plan:
 - all tests pass

flag=none

Change-Id: I50e858039081b8bd0c5a497cdf9e697710a54dc5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287364
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2022-03-17 21:07:06 +00:00
Aaron Shafovaloff 5fcb6fe04a spec: remove .js extension from spec imports
flag=none

Refs EVAL-2337

Change-Id: Id6515e4615ccdff496e308161b8204f8379a92fd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287343
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2022-03-17 18:39:17 +00:00
Aaron Shafovaloff 86dc7d6217 spec: gradebook spec formatting
flag=none

Change-Id: I97788bc0bed481c42c13c2b6ab3b2335cf4c4a48
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287345
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2022-03-17 18:39:13 +00:00
Xander Moffatt 15fd973d41 fix: adding external apps conforms to InstUI
why:
* a commit that removed and changed deprecated fields in InstUI
mistakenly changed the names of some props for this component that
_looks_ like an InstUI component but actually isnt
* this updates the fake InstUI component to match the actual InstUI api

closes INTEROP-7352
flag=none

test plan:
* check out this commit and run webpack
* go to /accounts/self/settings, click Apps, click + App
* all types including By Url, Manual, Paste XML, etc should all have
labels for their fields

Change-Id: Icdd75680027de764e9c7b9681b285c9091668fa4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287325
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2022-03-17 17:16:33 +00:00
Adrian Packel 9ac6a19274 fetch observers in new message-students dialog
closes EVAL-2060
flag=message_observers_of_students_who

Test plan:
- with a course w/ observers, test that the new message-students-who
  dialog shows them matched up with their respective students sorted
  alphabetically
- test with an observer observing a student with multiple section
  enrollments and ensure the oberver is only listed once

Change-Id: Ia48cfa913240ac47d5b5956ce206d18686b462e2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281105
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2022-03-16 16:27:45 +00:00
Ahmad Amireh 5581047a71 (instui8) port Metric and Progress
fixes FOO-2765
flag = none

according to https://instructure.design/v7/#v7-deprecated-props-and-components

~ test plan ~

the modified pages still show their Metric and Progress components

Change-Id: Ie2c8b147b267bbc8a24b42574bfb8c6feb49aabd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287050
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
2022-03-16 14:28:25 +00:00
Isaac Moore 139bfe60a7 Convert DashboardCard to TypeScript
refs DE-1083

Change-Id: I2df4456fd58878dbed4366f52e32acdccd141aa5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286065
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2022-03-14 18:38:12 +00:00
Syed Hussain 2f7063209f Apply score to ungraded with old and new gb filters
closes EVAL-2152
flag=apply_score_to_ungraded
flag=enhanced_gradebook_filters

Test Plan:
Have a gradebook with a teacher, some students and ungraded
assignments, sections, assignment groups and with:
apply_score_to_ungraded FF = ON
enhanced_gradebook_filters FF = OFF

1. As a teacher, create a filter e.g. assignment groups
2. Apply score to ungraded and make sure score is only applied
to the assignments and students which show up in the gradebook.
(You can disable the filter and check that score was not applied
to all ungraded assignments)
2.1. Apply for an assignment group
2.2. Apply for all assignments
3. Repeat step 2 with a different filter
4. Repeat step 2 with enhanced_gradebook_filters = ON

Change-Id: Ia937687350a030760a4c3087968e088e03a72767
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285917
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Product-Review: Jody Sailor
2022-03-11 20:05:29 +00:00
Ahmad Amireh 6ea74a0d0a rewrite i18n! to useScope in QUnit specs
refs FOO-2696
flag = none

see the related patch for JavaScripts for context, this is the same but
for typescripts

also, specs that were stubbing/spying on I18n.Scope prototype methods
had to be adjusted to reach out to the constructor since modules no
longer share the same (dynamically generated) instance

Change-Id: Ie0e4a2fcc97edb25f986c810a2196aa490341d7d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286751
Tested-by: James Butters <jbutters@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2022-03-10 21:38:32 +00:00
jake.oeding 863dbf9d39 migrate more ColumnHeader specs
migrate a missed file of ColumnHeader specs

refs MAT-653
flag=none

test plan:
-specs pass

Change-Id: I567f107561cdc1ab248ebf695b3de2e8deb694bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286649
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Scheiding <jon.scheiding@instructure.com>
QA-Review: Jon Scheiding <jon.scheiding@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2022-03-10 21:23:49 +00:00
Adrian Packel 4f72fcf0b5 don't clobber new quizzes submissions in SG
fixes EVAL-2055
flag=none

Test plan:
- Have a course with at least one student and a Quizzes.Next quiz with
  multiple attempts enabled
- As a student, make multiple attempts on the quiz that result in
  distinct scores
- As a teacher, open SpeedGrader and change the grade for the latter
  attempt (for example, by adjusting fudge points)
- Check that switching attempts from the dropdown actually shows you the
  correct attempt, instead of them all showing the same attempt
- Smoke-test that updating a grade or a late/missing status for a
  regular old (non-Q.N) submission with multiple attempts doesn't break
  anything

Change-Id: I13b109eb3ae013908d864845f014fa217fdf857b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/280798
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
2022-03-10 18:07:50 +00:00
August Thornton a0863d6d75 update acceptance use policy links to be underlined
fixes FOO-2754
flag = none

Test plan:
1. Account --> Settings
2. Acceptable Use Policy --> uncheck
   "Allow passive acceptance of Terms of Service"
3. Have a user with: user.preferences[:accepted_terms] = nil
4. Log in with that user and verify that the
   Acceptance Use Policy modal links are underlined by default

Change-Id: I83e169ec3418c7e974caceac8fca29beaf64b7b1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286703
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2022-03-10 16:54:46 +00:00
Aaron Shafovaloff b6ec85c9c2 Fix statuses modal in Gradebook
Test plan:
  - With enhanced filters flag turned off
    - Click the "Action" menu
    - Click the "Statuses" option
      - The modal should open
    - Close the modal using the "Done" button
      - The modal should close
    - Do this again, but with the "x" close button
      - The modal should close

Fixes EVAL-2309
Closes EVAL-1920

flag=none

Change-Id: I414c7ee7c4795ae29c3c6ec5eb43994604aad58f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286582
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2022-03-09 19:45:46 +00:00
Aaron Shafovaloff 82c207863c Use InstUI Spinner in Gradebook
Test plan:
  - When loading the gradebook, the spinner should be displayed

flag=none

Closes EVAL-2284

Change-Id: Id3487ae95f2af7fea841e9e09ad82de7f3b37cf5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285544
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
Reviewed-by: Paulo Chaves <paulo.chaves@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
2022-03-07 19:28:22 +00:00
Ahmad Amireh 5b90b39cf5 [instui8] address deprecations
refs FOO-2645
flag = none

this applies the first two codemods: updatePropNames and updateV7Props.
We can still remain on v7 at this point.

To reproduce this:

- clone github.com/instructure/instructure-ui
- activate node 14 and run "yarn install"
- apply the first mod with this command:

npx jscodeshift \
 -t packages/ui-codemods/lib/updatePropNames.ts \
 --config=packages/instui-config/codemod-configs/v7/propNames.config.json\
 ~/src/canvas-lms/ui

- apply the second mod with this command:

    npx jscodeshift \
      -t packages/ui-codemods/lib/updateV7Props.ts \
      -fileName updateV7PropsWarnings.txt \
      ~/src/canvas-lms/ui

substitute ~/src/canvas-lms with the path to ur canvas installation

~ TEST PLAN ~
  ~~~~~~~~~

not sure if it's reasonable to be spot-checking all the affected sites,
we should be able to rely on the test suite for that, but it won't hurt
to look and click through things

Change-Id: Ie120b773550633f418fae5635d1943083a65005e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285028
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2022-02-28 19:04:05 +00:00
Ed Schiebel c6df32c76f Show observee data on the student planner
the planner used to rely on ENV.STUDENT_PLANNER_COURSES
it now makes a request to get dashboard_cards to
acquire the info it needs about the user's list of
courses.

closes LS-2919
flag=observer_picker

test plan:
  AS A NOT K5 STUDENT
  > expect the planner to load assignments
  - click the + and add a note to the user
  - click the + and add a note to a course
  > expect both notes to be in the planner,
    even after you refresh
  - click the grades button
  > expect grades to be loaded in the tray
  - have a missing assignment, and click the
    opportunities button
  > expect the missing assignment(s) to show up
  - dismiss one
  > expect it to move to the dismissed tab

  AS AN OBSERVER OF THIS STUDENT
  - and another student
  > expect the planner to load assignments
  > expect the planner to show grades
  > expect the planner to show opportunities
  - Don't bother adding notes or dismissing
    opportunities, those will eventually get
    disabled.
  - switch observed students
  > expect the planner to update with new data
  - switch to the card dashboar and expect it
    to be correct
  - refresh so the cards are the default, then
    switch to the planner
  - do ^that, but switch observees before switching
    dashboard views

  AS A K5 STUDENT
  > expect the Homeroom to show the right data
    - e.g. stuff due today and stuff missing
  > expect the Schedule tab to show the right data
   - e.g. assignments and missing items

  AS AN OBSERVER OF A K5 STUDENT
  - and another k5 student
  > expect it to work as it always has
  - switch observed student
  > expect the dashboard to update with new data
  - start from different default dashboards
    and switch dashboard views or switch observees
    then try the other way around.

  AS AN ENROLLED STUDENT OBSERVING A STUDENT
  > expect the dashboards to default to observing
    the current user
  - switch to observing your student
  > expect the dashboards to reflect the new observee
  - refresh
  > expect to be observing the student by default
  - switch to observing the observer
  > expect the right stuff to happen

  TURN OFF THE observer_picker FEATURE
  > expect all dashboards to still work correctly

  *** BONUS *****
  > expect the initial queries for dashboard_cards,
    missing_submissions, and planner/items
    to be the result of the prefetch.  On loading
    the planner page, you should see only 1 copy
    of the various requests until you start
    interacting with the page

Change-Id: I5a2b1eb2fbc812bbf6ee0bb9c037f21ab99cb007
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284754
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2022-02-25 18:51:18 +00:00
Eduardo Escobar d9dbe63967 rename params to match score to un ungraded api endpoint
closes EVAL-2235
closes EVAL-2254
closes EVAL-2256
flag=none

test plan past due date:
- enable the feature flag “Score to ungraded“.
- create and publish a course with one teacher
  and two students.
- create an assignment A1 with no due date.
- create an assignment A2 with a past due date.
- create an assignment A3 with a future due date.
- go to the gradebook page.
- click in the total dropdown menu and select the
  "Score to ungraded option".
- in the modal choose "Only ungraded artifacts
  that are past due".
- wait some seconds until the process finishes.
- refresh the page.
- notice that the only affected submissions are
  those who belongs to the A2 assignment.

test plan excused:
- create three assignments A1, A2, A3.
- go to the gradebook page.
- Give a score to one of the students.
- click in the total dropdown menu and select the
  "Score to ungraded option".
- in the modal put "EX" in the grade for ungraded
  submissions input.
- wait some seconds until the process finishes.
- refresh the page.
- notice the ungraded submissions are marked as
  excused, the previously graded submissions is
  untouched.

test plan student group:
- create an assignment and check the option "This is
  a Group Assignment", create a new group set with
  the students splitted in two groups.
- go to the gradebook page.
- enable the student groups filter using the View
  dropdown menu in gradebook.
- use the filter dropdown to select one of the
  student groups.
- click in the total dropdown menu and select the
  "Score to ungraded option".
- put some percentage for the grade input in the
  modal and click on "Apply score".
- wait some seconds until the process finishes.
- refresh the page.
- notice the only affected submissions are those
  that belongs to the selected student group.

Change-Id: I8d6197c28cceb512db442d0365aa8e39ff4402e5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284965
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2022-02-24 22:29:39 +00:00
Spencer Olson 9b182c259c change anonymous student naming strategy
Changes anonymous student names (i.e. Student 1, Student 2) to be
consistent across pages/consistent regardless of teacher view
permissions or preferences.

flag=none
closes EVAL-2229

Test Plan:
1. Enroll at least 2 teachers in a course, each teaching a different
   section. As an admin, go to one of the teacher's user page for the
   course (/courses/:course_id/users/:id) and under the 'Privileges'
   section, click "limit this user to only see fellow section users".
2. Create an assignment assigned to all students in the course, and
   select "Graders cannot view student names".
3. As the teacher without section limitations, go to SpeedGrader for
   the assignment. For each anonymous student, take note of the student
   anonymous name (i.e. Student 1) and the corresponding anonymous_id
   query param in the URL.
4. As the section-limited teacher, go to SpeedGrader for the assignment.
   Verify that every student anonymous name + anonymous_id pair you see
   matches the pair that the non-section-limited teacher saw.

Change-Id: Ia22813ef38b3378d7c38a8cb3f12b53c8c9b7d42
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284822
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Product-Review: Jody Sailor
2022-02-23 02:28:05 +00:00
Jon Scheiding 156dcb0811 Revert "Fix equation image resize for quizzes"
This reverts commit 14544ba024.

Reason for revert: This change removes mathjax typesetting, reverting to image equations.

Change-Id: I7d5e7d8357ff94720181dd4e0b08750abb27e7ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284105
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jon Scheiding <jon.scheiding@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
2022-02-19 00:22:21 +00:00
Xander Moffatt 907f52795a messages: rename messageType to subject everywhere
refs INTEROP-7086
flag=none

why:
* subject was originally used everywhere, but then we switched to
messageType since it seemed more inline with IMS guidelines, so that
perhaps at some point we could suggest it for an IMS spec
* as part of the IMS LTI Platform Storage proposal, the spec uses
subject for all window.postMessage communication between LTI tools
* to keep things simple, switch all postMessage usage to use subject

test plan:
* specs should all pass
* deep linking should work
* A2 LTI 1.1 submissions should work
* RCE mentions should work

Change-Id: I10c04b3ba3b318dbb25e94ed83c3e7e9e3926f75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273937
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
2022-02-18 20:07:03 +00:00
Aaron Ogata d3ba157e43 remove translations/_core_en.js in production try 2
refs FOO-2720
flag = none

Short version: the "_core_en.js" file is no longer loaded in production
as its contents have been merged (there) with the super "core.js" file,
which is targeted for removal later in this series.

Change-Id: I05eb76a2f1cac12b4ab953bad0ca5a49b6ffd37b

---

The problem as I understand it: there are certain phrases that are
marked as "core" because they are used by shared/logic code like
DateTime formatters and are pre-defined in config/locales.yml. These
phrases were being supplied in two distinct files:

- _core_en.js, which includes only the phrases for the "en" language
- _core.js, which includes the phrases for the rest of the supported
  locales

_core_en was split because it was deemed necessary to be loaded always,
regardless of the active locale, and that is - as it appears to me, at
least - because some code attempts to look up those phrases at the
time their modules are evaluated. This patch corrects those modules to
defer their lookups until the point where the translations are used,
and when the translations have become available -- just like the rest of
the codebase does.

But if this is true, this begs the question, how come those modules
weren't presenting bugs by using translations for "en" and not for the
target locale? My thinking is that it is only coincidental that they
weren't: should _any_ module that uses I18n be evaluated _before_ any of
those modules, the Webpack plugin will have already loaded the "core"
file, which includes the translations for those phrases in the target
locale. _core_en may not have been loaded by then, but that doesn't
matter because the resolver is gonna look for what's in _core first when
it's available, and it is.

---

What happens in this patch is a slight change to prepare for the full
removal of both _core and _core_en: _core_en is now loaded only in
builds that don't load actual translations because we need the default
values that that file provides. The alternative would've been to go to
each call-site that looks up the phrases provided in _core_en and have
them supply default values, but it's untenable at this point.

This is the list of call-sites and the phrases they look up:

    ui/features/calendar/jquery/index.js: time.formats.tiny_on_the_hour
    ui/features/quiz_statistics/util/parse_number.js: number.format.delimiter
    ui/features/quiz_statistics/util/parse_number.js: number.format.separator
    ui/shared/day-substitution/backbone/views/DaySubstitutionView.coffee: date.day_names
    ui/shared/syllabus/jquery/calendar_move.js: date.month_names
    ui/shared/datetime/jquery/DatetimeField.js: date.formats.medium
    ui/shared/datetime/jquery/DatetimeField.js: date.abbr_month_names
    ui/shared/datetime/jquery/DatetimeField.js: date.day_names
    ui/shared/datetime/jquery/DatetimeField.js: date.abbr_day_names
    ui/shared/datetime/jquery/DatetimeField.js: date.datepicker.column_headings
    ui/shared/datetime/react/components/render-datepicker-time.js: datepicker.titles.hour
    ui/shared/datetime/react/components/render-datepicker-time.js: datepicker.titles.minute
    ui/shared/datetime/react/components/render-datepicker-time.js: datepicker.titles.am_pm
    ui/shared/handlebars-helpers/dateSelect.js: date.order
    ui/shared/handlebars-helpers/dateSelect.js: date.*
    ui/shared/i18n/i18nObj.js: number.format
    ui/shared/i18n/numberHelper.js: number.format.delimiter
    ui/shared/i18n/numberHelper.js: number.format.separator

dateSelect.js is the gnarly one because it seems to be passing through
everything under date.* to God knows who.

The list above was generated with a command similar to this:

    grep -rnP "I18n.(t|lookup)\(['\"](date|datetime|number|support|time)\S" ui

---

~ test plan ~
  ~~~~ ~~~~

- you can still activate a different locale and use something like the
  datepicker to normal effect

[change-merged]
[build-registry-path=jenkins/canvas-lms/foo-2720-01]

Change-Id: Ifd5d2d888edc9b89a9930824f2c55fd9c275b03f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284102
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2022-02-18 00:08:38 +00:00
Jackson Howe 784329f008 Support observes on recent activity dash
Add support for an observed_user param on the stream items API. Also
adds the picker to the recent activity view and updates the items
when the user changes.

closes LS-2918
flag = observer_picker

Test plan:
 - Enable observer_picker flag
 - Load dashboard as an observer with at least 2 linked students
 - Switch to the recent activity view
 - Expect to see the selected student's recent items (only for the
   courses in which observer is observing student)
 - Switch students and expect the new items to load
 - Load dashboard as a teacher or student and expect the recent
   activity view to work as normal (with no observer picker)
 - Disable observer_picker and expect to not see the picker on the
   recent activity view

Change-Id: I31080a9e5032eb9387059ee8712a10d31b1c07e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285005
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2022-02-17 20:52:25 +00:00
Aaron Shafovaloff 0895470516 spec: normalize Gradebook Spec imports
flag=none

Change-Id: I5b4c9b5b792575d37d10ae05859481b6565c5b87
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285433
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Paulo Chaves <paulo.chaves@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2022-02-17 19:51:52 +00:00
Ahmad Amireh 0d644dffa8 Revert "remove translations/_core_en.js in production"
This reverts commit 70976cc7f8.

Change-Id: Iae38dbb199b66bdc5f45123b65a8494d5a1b8557
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285348
Tested-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-02-16 23:01:07 +00:00
Ahmad Amireh 70976cc7f8 remove translations/_core_en.js in production
refs FOO-2720
flag = none

Short version: the "_core_en.js" file is no longer loaded in production
as its contents have been merged (there) with the super "core.js" file,
which is targeted for removal later in this series.

Change-Id: If97f75066aea32dd74c3899db7aec8fcf4cd93db

---

The problem as I understand it: there are certain phrases that are
marked as "core" because they are used by shared/logic code like
DateTime formatters and are pre-defined in config/locales.yml. These
phrases were being supplied in two distinct files:

- _core_en.js, which includes only the phrases for the "en" language
- _core.js, which includes the phrases for the rest of the supported
  locales

_core_en was split because it was deemed necessary to be loaded always,
regardless of the active locale, and that is - as it appears to me, at
least - because some code attempts to look up those phrases at the
time their modules are evaluated. This patch corrects those modules to
defer their lookups until the point where the translations are used,
and when the translations have become available -- just like the rest of
the codebase does.

But if this is true, this begs the question, how come those modules
weren't presenting bugs by using translations for "en" and not for the
target locale? My thinking is that it is only coincidental that they
weren't: should _any_ module that uses I18n be evaluated _before_ any of
those modules, the Webpack plugin will have already loaded the "core"
file, which includes the translations for those phrases in the target
locale. _core_en may not have been loaded by then, but that doesn't
matter because the resolver is gonna look for what's in _core first when
it's available, and it is.

---

What happens in this patch is a slight change to prepare for the full
removal of both _core and _core_en: _core_en is now loaded only in
builds that don't load actual translations because we need the default
values that that file provides. The alternative would've been to go to
each call-site that looks up the phrases provided in _core_en and have
them supply default values, but it's untenable at this point.

This is the list of call-sites and the phrases they look up:

    ui/features/calendar/jquery/index.js: time.formats.tiny_on_the_hour
    ui/features/quiz_statistics/util/parse_number.js: number.format.delimiter
    ui/features/quiz_statistics/util/parse_number.js: number.format.separator
    ui/shared/day-substitution/backbone/views/DaySubstitutionView.coffee: date.day_names
    ui/shared/syllabus/jquery/calendar_move.js: date.month_names
    ui/shared/datetime/jquery/DatetimeField.js: date.formats.medium
    ui/shared/datetime/jquery/DatetimeField.js: date.abbr_month_names
    ui/shared/datetime/jquery/DatetimeField.js: date.day_names
    ui/shared/datetime/jquery/DatetimeField.js: date.abbr_day_names
    ui/shared/datetime/jquery/DatetimeField.js: date.datepicker.column_headings
    ui/shared/datetime/react/components/render-datepicker-time.js: datepicker.titles.hour
    ui/shared/datetime/react/components/render-datepicker-time.js: datepicker.titles.minute
    ui/shared/datetime/react/components/render-datepicker-time.js: datepicker.titles.am_pm
    ui/shared/handlebars-helpers/dateSelect.js: date.order
    ui/shared/handlebars-helpers/dateSelect.js: date.*
    ui/shared/i18n/i18nObj.js: number.format
    ui/shared/i18n/numberHelper.js: number.format.delimiter
    ui/shared/i18n/numberHelper.js: number.format.separator

dateSelect.js is the gnarly one because it seems to be passing through
everything under date.* to God knows who.

The list above was generated with a command similar to this:

    grep -rnP "I18n.(t|lookup)\(['\"](date|datetime|number|support|time)\S" ui

---

~ test plan ~
  ~~~~ ~~~~

- you can still activate a different locale and use something like the
  datepicker to normal effect

Change-Id: I12ff180da35dcf916137818ab91296dab469f3c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284582
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2022-02-16 20:48:16 +00:00
Aaron Shafovaloff 90c8a1cf94 Harden & TypeScriptify SpeedGrader
This brings out lint warnings and errors in SpeedGrader to 0.

It brings TypeScript to SpeedGrader.

This will make working in speed_grader.tsx easier.

test plan:
 - all automated tests pass

flag=none

Refs EVAL-2220

Change-Id: If889723923f78061c9908ef780542debb1b289a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284307
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: Spencer Olson <solson@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
2022-02-16 19:36:44 +00:00
Aaron Shafovaloff 67f1124358 Move GradebookGrid to child component
This makes it easier to test Gradebook in Jest.

Test plan:
  - Gradebook grid successfully displays

flag=none

Closes EVAL-1953

Change-Id: I8812383b8db84aa2cecf90bbf166a7d314524dd5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283394
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
2022-02-14 20:29:10 +00:00
Ed Schiebel 1326e10888 Show observee picker on the student planner
closes LS-2920
flag=observer_picker

test plan:
  - become an observer of a non-k5 student.
  > expect the picker to show up on the List View dashboard.
  - don't expect it to do anything. don't even expedt the
    planner to have data.

Change-Id: I4a8c57a1b16628adffe2bf92b2dbcff33f7aa9db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284554
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2022-02-10 22:20:49 +00:00
Ahmad Amireh 05dce63b6b babel independence(2): karma
refs FOO-2697
flag = none

webpack config for karma is also independent now and no longer tied to
the main build config, you can find it under ui-build/webpack-for-karma

there are no notable changes outside of breaking that config into a few
files

~ TEST PLAN ~
+-=---------!

- karma/QUnit suite actually runs and passes

Change-Id: Iff474a3d0068441dc8a7c4de605765d936e8ab6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283377
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2022-02-07 18:48:18 +00:00
Jackson Howe 2130e275ef Switch dashboard sidebar on observed user change
The sidebar api was previously updated to support an observed_user
param. This change implements the switching in the UI. The currently
selected student's data is prefetched and loaded in the sidebar. When
the observer picker is updated, fetch the new student's data and show it
in the sidebar.

Note: the student todo list is not supported for observers until the
observer planner work is complete.

closes LS-2967
flag = observer_picker

Test plan:
 - Enable observer_picker flag and open dashboard as an observer with
   several linked students
 - Open network requests developer pane; expect to see only one request
   to /dashboard-sidebar
 - Expect to see the correct data in the sidebar for the currently
   selected student
 - Switch the student
 - Expect the sidebar to reload with correct data
 - Expect to see one new /dashboard-sidebar request
 - Switch back to the original student and expect the sidebar to show
   their data once again
 - Disable observer_picker flag and expect the dashboard to work as
   before

Change-Id: Id8a078e0510ef54cd98279992406fce4bff9c9c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283955
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>
2022-02-04 18:15:06 +00:00
Syed Hussain bce89a6354 Consider "Enter Grades as" setting with grading schemes
Do not match grading scheme values if the Gradebook setting for
"Enter Grades as" is set to "Points". See the community post in
the ticket to get a better understanding of the issue.

closes EVAL-2117
flag=none

Test Plan:
As a teacher:
1. Select/create a grading scheme that includes numbers e.g.
Name                         Range
5                            100% to 90.0%
4                            < 90.0% to 70.0%
3                            < 70.0% to 50.0%
Revision
required/Komplettering       < 50.0% to 25.0%
U                            < 25.0% to 0.0%
2. Create an assignment worth 100 points and set "Display grade as"
to Letter grade
3. In gradebook, grade the assignment for students using names in
grading scheme and other values  and see that totals correspond to
those values e.g. (5 -> 100%), (4 -> 89%) and (6 -> 6%)
4. Switch "Enter Grades as" option to "Points". Award 5 points to
a student and see that it does not assign the value from grading
scheme but the actual percentage. Try different values matching and
not matching grading scheme names.

Change-Id: I1312c6bfb5070c0b08e7590232e86d609e446025
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283437
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Product-Review: Jody Sailor
2022-02-03 21:01:52 +00:00
Charley Kline 9c73bb73b0 Rewrite GradeSelect for grade moderation using InstUI Select
Closes FOO-2060
flag=none

This had been temporarily fixed to use a superclassed <SimpleSelect>
in order to get it to work, but that's not a good long-term solution as
it relies on <SimpleSelect> being a class component in InstUI, and it
will likely get turned into a function component at some point. The real
answer is to rewrite <GradeSelect> entirely to use the main <Select>
component.

I also had to make browser confirm dialogs asynchronous in order to
address a Chrome bug (that I'm not sure how I triggered but it seems
to be pretty clear), and as a result of that had to adjust several
specs to expect those confirms to appear asynchronously. I also had
to skip several Selenium specs that have become flakey. I was unable
to reproduce the flakiness locally and unable to figure out what
might be going on in the time box I set for myself.

Test plan:
* Enable moderated grading for your account
* Have a course with multiple teachers / graders
* In a course, create an assignment and enable moderated grading
* Have each of the teachers submit a grade for every student in the
  assignment
* Then as the "final grader" go to the grade moderation page, where
  you should see a list of each student and the provisional grade
  that each of the graders gave.
* The selection on the right should allow you to pick the score from
  one of the graders, or you should be able to type in a totally
  different score (a "custom score") and that should get added to the
  list of available scores and can be selected
* This should provide all the same functionality as the previous
  component and should work almost entirely the same way (there may
  be tiny differences due to the rewrite)
* A full set of Jest tests was written for this component using the
  same list of spec descriptions from the old component, so the
  functionality is quite well tested in the automation

Change-Id: I9fe21b72f8c92ae39a4ba2717182df146f6b3a08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283270
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2022-02-03 18:06:31 +00:00
Eduardo Escobar ba70cd032a prevent running more than one apply scores to ungraded job
fixes EVAL-2039
flag=apply_score_to_ungraded

test plan:
1-)have a course with some students and assignments.
2-)for the course's account, enable the "Apply Score to Ungraded"
  feature flag.
3-)have some assignments(create atlest one group assignment)
  and students, and make sure some of the submissions are
  ungraded.
4-)as an instructor in said course, go to the gradebook view.
5-)click on the "Total" column header dropdown menu, then
  select the "Apply Score to ungraded" option.
6-)a flash messsage "Request successfully sent." should appear.
7-)the "Apply Score to ungraded" option should update it's text
  to "Applying Score to ungraded" and it should be disabled.
8-)after some seconds a flash message "Score to ungraded process
  finished successfully" should appear and the "Applying Score
  to ungraded" option should be enabled again.

Change-Id: I2020e6251104681557735db37444b38a29cc73cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281720
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2022-02-01 21:56:04 +00:00
August Thornton fb20b3beeb retain focus when filtering users via accounts/self/users
fixes FOO-2646
flag = none

Test plan:
• Verify focus is kept when filtering users via the account's
  People page (/accounts/self/users)
• See associated Jira for more info

Change-Id: I798ee6e24806694089877094a321856bc7ec1bb8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283560
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
QA-Review: Ben Rinaca <brinaca@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2022-01-27 14:59:49 +00:00
Aaron Shafovaloff 3ff9432b2a More enhanced filters
Enhanced filters for submissions, sections, grading periods.
Closes EVAL-2005
Closes EVAL-2016
Closes EVAL-2014

No more sluggishness in filters tray
Closes EVAL-2096

Conditionally remove "View options" menu
Closes EVAL-2074

Test plan:
 - Gradebook option menu
    - Enable enhanced_gradebook_filters flag
        - In Gradebook in the old options menu should hidden
    - Disable enhanced_gradebook_filters flag
        - In Gradebook in the old options menu should visible
 - Enable enhanced_gradebook_filters flag
    - Grading periods
        - Create a course with a grading period set and a few periods
        - Set one of the periods to cover the present day
        - Open filter tray in gradebook
        - Selecting different grading periods will show different
          assignments
    - Sections
        - Create a course with multiple students
        - Put students in different course sections
        - Open filter tray
        - Select "Section" filter type
        - Student rows should update when selecting each section
        - Switching filter type from section to another type
        should cause all students to show
        - Deleting the filter should cause all student rows to show
    - Submissions
        - Create a course with multiple students
        - Create a few assignments
        - As student
            - Submit two assignments
        - As teacher
            - Enter grade for one submission
            - Leave the other submission ungraded
            - Open filter tray, select "Submissions" filter
            - Select: Ungraded submissions
            - Only assignment columns with ungraded submission should show
            - Select: Has submissions
            - Only assignment columns with submissions should show
    - Filters tray should not suffer sluggishness when doing the above

flag=enhanced_gradebook_filters

Change-Id: Ifa43e7ea95ddf9f810e54ab248d76aec71f21635
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281749
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Product-Review: Jody Sailor
2022-01-27 00:36:44 +00:00
Aaron Shafovaloff c41d314102 Don't escape first and last names
Test plan:
 - Enable allow_separate_first_last_names
 - Enroll a student with ` character in first and last name
 - Open the View Action menu in gradebook
   - Enable Split Student Names
 - First and last names in columns should display correctly

Fixes EVAL-2198

flag=allow_separate_first_last_names

Change-Id: I901ffcda07e9b820842e01286974f004401a46cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283452
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2022-01-25 21:39:36 +00:00
Aaron Shafovaloff 1f44a90083 Gradebook TypeScript - round 2
Test plan:
 - All automated tests pass

Refs EVAL-2190

flag=none

Change-Id: I01c364e994aa8299f3af93f12eded3921aa767e0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283077
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2022-01-20 15:10:07 +00:00
Caleb Guanzon ecda088a57 display partially anon discussion indicator
fixes VICE-2422
flag=discussion_anonymity
flag=partial_anonymity

test plan:
- do the steps in this video: https://share.getcloudapp.com/geud459d

Change-Id: I329166139acdb0521f83a54a00c3abbcec41d0e3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283119
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
2022-01-19 20:04:52 +00:00