fixes CNVS-16454
test plan:
* test in the console
- `GradingPeriodGrade.all` should return `[]` (no error)
- `Enrollment.find(1).grading_period_grades` should return `[]` (no error)
- make a GradingPeriod:
`g = GradingPeriod.create(weight: 100, start_date: Time.now, end_date: 1.month.from_now)`
`g.save!`
- `g.grading_period_grades` should return `[]` (no error)
Change-Id: I7183d715dbfac3fcd89ab7e453237ad4ce6c650d
Reviewed-on: https://gerrit.instructure.com/45312
Product-Review: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
fixes CNVS-16010
This changes the icon on the modal so that it meets accessibility
standards.
Test Plan:
- As a student go to your profile and click to change your icon
- The 'x' that appears on the modal now passes
- Go to styleguide and click on Modal Dialog > Show Dialog to see
the change in the global modal as well
Note for UI:
These modals are legacy and although still used throughout canvas
it felt best to replace the image with an svg than a png instead
of figuring out how to put in an <i> tag within the modal html.
Change-Id: Ia893ecc7d2f891dc92e8902060504292f67e10f9
Reviewed-on: https://gerrit.instructure.com/45353
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
Currently you get a warning when you click the "Go to subtitle creation
tool" button because you are posting a form to an HTTP URL from an HTTPS
one (Canvas). This should fix that warning.
Test plan:
- On an uploaded video, click the subtitle tool and choose "Upload
subtitles"
- On the popup, click "Go to subtitle creation tool"
- There should be no warning message shown
Change-Id: I1743399d8a2ceb07740b8ca5948ea2741aa99594
Reviewed-on: https://gerrit.instructure.com/45077
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Paul Hinze <paulh@instructure.com>
fixes CNVS-8913
test plan:
- as a non-admin teacher
- request student profile from api (users/:id/profile)
- see that it works for your students
- not for others though
- as an admin
- request student profile from api (users/:id/profile)
- see that it works
- as a student
- go to profile page, see that it works
- go to another students profile, see that it doesnt
- request profile from api (users/:id/profile) see that
it works the same
Change-Id: Ic4b32bfa3beecf23ac95c75c948880306ef55d60
Reviewed-on: https://gerrit.instructure.com/45230
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
test plan:
* should be able to set the "Hide totals in
student grades summary" in course settings
and save properly
(side bonus: it should stay disabled while reloading)
closes #CNVS-17329
Change-Id: I3150654bf0b17a143c1ca8af004af9823aad731d
Reviewed-on: https://gerrit.instructure.com/45487
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-17104
test plan:
* turn on MGP feature flag
* using the submissions api
/api/v1/courses/1/students/submissions
* with the same parameters as gb uses
- grouped=1
- list of student ids (student_ids[]=<id>&student_ids[]=<id>)
- add the grading_period_id parameter with the appropriate id
- &grading_period_id=<id>
> the response should only include submissions
from assignments in that grading period
Change-Id: Ic1ff47564bf16cd1d158ee6a3307ed76a96915c9
Reviewed-on: https://gerrit.instructure.com/45404
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
closes CNVS-15868
Test Plan:
- Enable Usage Rights
- Go to New Files
- Search for something
- You should see usage rights reflected in the list of results
- Preview an item
- Open the info panel
- Usage rights should be shown in the info panel
Change-Id: Ie7388597e9f9819cf5853584dc79c1b71945ea1d
Reviewed-on: https://gerrit.instructure.com/44432
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
When a file is uploaded via the WikiSidebar,
it can be uploaded multiple times with the same
name. This commit adds an iterator to uploaded
files so that if the file has already been uploaded
or a file with the same name already exists,
an iterator is added to the newly uploaded file
to prevent duplicates (e.g. file.jpg, file-1.jpg, file-2.jpg).
fixes CNVS-17361
Test Plan:
* Enable "Better File Browsing" feature flag
* Go to any course's Pages section (as admin/teacher)
* Create a new page or edit an existing one
* On the create/edit page, select the "Files"
tab from the WikiSidebar on the right
* Click "+ Upload a new file"
* Select some file, then upload it
* Upload the same file again, multiple times
* Go to that course's Files page
* In the course files (or wherever you chose to
upload the file), the file you uploaded should be
there, along with additional files with the same name
followed by an iterator (e.g. yourfile.png, yourfile-1.png,
yourfile-2.png, etc)
Change-Id: Iaa1307305659bf3b1b38991f0981ac6e48423209
Reviewed-on: https://gerrit.instructure.com/45550
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
test plan:
- have a course with multiple levels of folders in the
file hierarchy
- click "upload a new file" in the wiki sidebar
- the "Folder" select box should
(a) contain all the folders in the course, and
(b) should show names for each (no "undefined")
fixes CNVS-13889
Change-Id: I0017ce3238046225545bba7d76d9b880d95eb093
Reviewed-on: https://gerrit.instructure.com/45515
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes CNVS-15649
This replaces the icons we had with color corrected ones so we
meet our contrast ratios for accessibility.
Test Plan:
- If you don't have any, navigate to your Rubrics page and add one
- Attach a Module outcome to a rubric and then view your Rubric
page
- There should now be a little flag that appears on it which should
meet our ratio
Reference screen: http://cl.ly/image/1j1E2l001O3A
Change-Id: Ie18ecd335fd350c4be6eda6845ebb17be7da71cb
Reviewed-on: https://gerrit.instructure.com/45365
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Fixes: CNVS-15578
Couple of small tweaks to increase foreground-
background contrast in the Assignments create
UI. Added new variable for Canvas secondary-action
links that contain only an icon glyph (mostly
Close links in Canvas).
IMPORTANT: This ticket is only for the high-
contrast UI. To enable the high-contrast UI, go
to Settings then scroll down and make sure
"Use High Contrast Styles" is set to ON.
Test plan:
- Enable high contrast UI in Canvas (see above)
- Go through each issue Nathan entered into the
JIRA and compare with the updated UI to make
sure it's fixed.
- The webAIM color contrast tester can be found
here: http://webaim.org/resources/contrastchecker/
Change-Id: I5655801f7b8f2060c763701a2857118ed7718e1d
Reviewed-on: https://gerrit.instructure.com/45428
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Test Plan:
* use the account api's courses endpoing
* the is_public property should be there
closes PLAT-797
Change-Id: Icf6f26bbff6ca0da0533700bb0cfd264fd833c12
Reviewed-on: https://gerrit.instructure.com/45483
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-16920
Change-Id: Ibca09a92a7d77782f33d0d766f6a2f7f3923c179
Reviewed-on: https://gerrit.instructure.com/45419
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
my theory is that all the students had the same name, so the order they
were being returned in the csv was not deterministic.
fixes CNVS-16278
test plan:
- the spec should not fail intermittently
Change-Id: I99a1f1c223b7f308ccb08d2439e4175b20228c50
Reviewed-on: https://gerrit.instructure.com/45549
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* basic regression test on assignments, discussion topics
gradebook, and modules (mostly make sure the basic
index/show/edit views aren't broken)
closes #CNVS-15563
Change-Id: I3411bfb7645b3c4bf8a4663e3e052b4402f899ba
Reviewed-on: https://gerrit.instructure.com/43609
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Now an LTI launch can list the section ids that a user has
enrollments in with: $Canvas.course.sectionIds and
$Canvas.course.sectionSisSourceIds
Test Plan:
* Create a user with enrollments in a section and multiple sections
* Configure an LTI tool to have the 2 new section variable subs
* The ids/sis ids of the section that the user has a direct
enrollment in should be substituted
* If a teacher is only enrolled in the main section all the other ones
will _not_ be listed.
closes PLAT-784
Change-Id: I0af6b674a710767f4f38693f86fac8b988a21f06
Reviewed-on: https://gerrit.instructure.com/45462
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
default course profiles are invalid in canvas_net accounts
due to additional fields with presence validators, so they
can't be assigned via `Course#profile=`
test plan:
- "reset course content" button in course settings should function
on a course in a canvas_net account that does not have a profile
fixes CNVS-17153
Change-Id: Id20289aed76d5ec3effbad96110c974682376589
Reviewed-on: https://gerrit.instructure.com/45234
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Fixes CNVS-17030
Test Plan:
- Using a screen reader visit conversations.
- Navigate to the type and course filters
- Verify that screen readers read the selected item and the filter label,
without you having to open the drop-down.
- Change the selected value and close the dropdown.
- Verify the label is updated with the new selection.
Change-Id: I27611cc5114a51bdf351ec76306337e0cb606825
Reviewed-on: https://gerrit.instructure.com/45051
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
QA-Review: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
test plan:
* create a non-graded discussion topic
* reply to the topic as a student
* edit the discussion to make it a graded assignment
that is locked (i.e. available until a past date)
* submissions for the student's entries should be
visible in speedgrader
closes #CNVS-8768
Change-Id: I1e93cb4d34138b4b37ac43681ba6d08eea89ec9b
Reviewed-on: https://gerrit.instructure.com/45461
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
- enable new files in a course
- create a wiki page in the course
- click "upload a new file" in the wiki sidebar
- there should not be an ajax error, and the select box
to choose the folder to uplod to should populate
fixes CNVS-17359
Change-Id: I1a996eecd10e101d27c391da5f1b7be65296bb5d
Reviewed-on: https://gerrit.instructure.com/45485
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
This commit also adds a way to specify a class to add to a tooltip.
All you need to do is "data-tooltip-class" and that class will be
applied to the tooltip when it opens.
fixes CNVS-17270
Test Plan:
- Enable Usage Rights
- Go to New Files
- Select a mix of files with different usage rights and folders
(You need at least 4 or 5 folders with different length names)
- The warning icon should be spaced away from the warning text.
- The tooltip text should be left aligned.
Change-Id: Ia5b9686dd870c50eca6c3ed778da8b2ba4305042
Reviewed-on: https://gerrit.instructure.com/45438
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
test plan:
- Use "Edit external tool" API and consult canvas logs
to verify that 15 nearly identical DELETE queries
are not sent to the database
fixes CNVS-17302
Change-Id: If6babf31e3c890c17be311ab39020414e53d006c
Reviewed-on: https://gerrit.instructure.com/45431
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes CNVS-17308
some callers will want to add stuff to the account chain or otherwise
modify it. some do it in place, which is sad when we return a cached
Array. cache it, but return a copy of the cache, not the cache itself,
to prevent errors from this. Account#account_chain already did this.
particularly, in this ticket, code in RoleOverride.permission_for pushed
siteadmin into the return value from Course#account_chain. this meant
that site admin was already in course.account_chain on the second time
through this code, but the code didn't handle the sharding implications
of that (and shouldn't need to)
test-plan:
- have multiple shards
- create a course in an account on a shard that's *not* the same as
site admin's shard
- create an AccountMembership role in site admin with permission to
manage courses
- create a site admin user with just that role and log in as that user
- should be able to manage the course in the other shard
Change-Id: Iaf3a19dc2a2c0c7372c82d2af197d9f936792625
Reviewed-on: https://gerrit.instructure.com/45463
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
For schools that have usage_rights_required,
this commit adds the UsageRightsSelectBox to
the WikiSidebar for when files are uploaded
from the files tab.
closes CNVS-17124
Test Plan:
* Enable "Usage Rights Required" feature flag
* Go to any course as a teacher or admin
* Go to the Pages section for that course
* Select a page to edit or create a new one
* On the WikiSidebar on the right, select
the "files" tab
* Click "Upload a new file"
* A form should appear that contains a
"Usage Right" select box that says
"Choose usage rights...", along with a
yellow warning below that says "If you do not
select usage rights now, this file will be
unpublished after it's uploaded."
* Choose a file from your computer to upload,
then click the "Upload" button
* The file should be uploaded but unpublished
* Choose another file to upload using the same steps above,
but this time select a usage right in the select box
and a copyright message
* The yellow warning should disappear when a usage
right is selected
* Upload the file; it should be published now
Change-Id: I5db6e9de794f8298082f79b955073c8307ed979b
Reviewed-on: https://gerrit.instructure.com/45331
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
test plan:
* regression test wiki pages
closes CNVS-16203
Change-Id: Ic37c69c8696151dc99f1df6f3cc9b013835b12a4
Reviewed-on: https://gerrit.instructure.com/42552
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Fixed the scroll bar on the outcomes screen for google chrome
users running yosemite.
fixes CNVS-16903
test plan:
- Create a course and go to the outcomes screen.
- Create an outcome and scroll within the outcome.
- Edit an outcome and try to scroll within the outcome.
- Create and outcome with long description and scroll
within the outcome pane.
- Do this for all browsers.
Change-Id: Icd4ce4d038bbd14ea18f675bcb02e039fd032390
Reviewed-on: https://gerrit.instructure.com/44747
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* import the package referenced in the ticket
* for the imported quiz, true/false questions
should have their answers in the same order
as ones created within the canvas ui
* therefore editing an imported true/false question
should not rewrite the answer texts (causing it
to be wrong)
closes #CNVS-16258
Change-Id: I18ac3d661502c17750108fc372fff2a59714dd42
Reviewed-on: https://gerrit.instructure.com/45395
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>