fixes#10556
users with :manage_grades permissions that don't have
:view_all_grades permissions should be able to view and
use the gradebook without receiving permissions errors.
test plan:
* create a custom role that has :manage_grades permissions
but not :view_all_grades permissions;
* as that user, attempt to load gradebook2 and verify that
it loads as expected.
* smoke test other roles to ensure that they continue to
work as expected.
Change-Id: Ifbf2c2d9352fe6429497b5c54c269c4973ba7a26
Reviewed-on: https://gerrit.instructure.com/13781
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
it was a has_many :through that is broken for auto-created wikis
existing specs cover all changes except /undelete page, which
is unsupported
test plan:
* ensure user's rss feed can be opened correctly
* ensure wiki sidebar loads and has wiki pages in it
Change-Id: I7c3f0f68641b67f602e6b412ab5a386140bb68b2
Reviewed-on: https://gerrit.instructure.com/14023
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
test plan:
* check the documentation:
* the module position should read "1-based", not "0-based"
* the module item position should read "1-based", not "0-based"
* the completion_requirement should be visible to all types
of users; the applies-only-to-students comment should apply
only to the "completed" item inside it
* there are no behavior changes
Change-Id: I24a60df3d79d7185349751723488d7ec8eb64e2e
Reviewed-on: https://gerrit.instructure.com/13985
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Marc LeGendre <marc@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Including renaming the actual file on disk / in S3
refs #10841
test plan: from the console, call change_namespace on a root attachment,
passing in the new namespace (new_account.file_namespace normally).
verify that the file is moved in storage, and all child attachment
namespaces are updated as well.
Change-Id: If0463344c52fbd52e45047a4c0794da44d1e19b2
Reviewed-on: https://gerrit.instructure.com/13972
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
the max-height was set on message section of both the right and left
side of the inbox to fix an overflow bug on the left side. The right
side was then not displaying the full conversation.
test-plan:
* send a conversation with a large message
* check message on both right and left sides of the inbox, the left side
* should not overflow, the right should display in full
* check with a large window size and a small window size
Change-Id: I0954ed1e32186e0907cf3a044ef3b30b876afa5e
Reviewed-on: https://gerrit.instructure.com/14049
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
Test plan:
* turn off scribd submission filtering
* upload a document to your course files
* make sure the document is previewable in scribd
Change-Id: I3f5cc1b4971d901407a0665edeef9af40b68092b
Reviewed-on: https://gerrit.instructure.com/14044
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
test plan:
1. login as a teacher
2. create an assignment
3. go back into that assignment after it is created
and edit it
4. try to change the assignment title to be longer than
255 characters, notice the text box stops you at 255
5. update the assignment
6. make sure the assignment saves with no DB errors
Change-Id: I71ac0b58cdd1a906fd62bdd7fc66ad8d28ebf41d
Reviewed-on: https://gerrit.instructure.com/14032
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
fixes#10036
This commit removes the ability to sort files and folders by
dragging and replaces it with a default of alphabetizing every
item.
Test plan:
*Folder
1. Go the to files page http://localhost:3000/dashboard/files
2. Create a folder named "d_folder" then add a folder named "a_folder"
3. Ensure "a_folder" is before "d_folder"
*Files
1. Go the to files page http://localhost:3000/dashboard/files
2. Upload a file named "d_file.txt" then add a file named
"a_file.txt" (must have characters in the file"
3. Ensure "a_file.txt" is before "d_file.txt"
Change-Id: I3776ff996e338f8aa6fc3858b59e1460b8b1cdf0
Reviewed-on: https://gerrit.instructure.com/13554
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
test plan:
* in script/console, do Account.count, and then
a slaved { Account.count }; there should be two connections now
* ActiveRecord::Base.connection_handler.clear_all_connections!;
both connections should be gone now
* repeat for Delayed::Job.count with a separate queue config
Change-Id: I4858221e959fb91207470b84943843687751b2ee
Reviewed-on: https://gerrit.instructure.com/13889
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
fixes#11004
Test plan:
* open a crocodoc submission in speed grader, and/or the submission
details page
- you should be able to see/make annotations
* open the same submission in the user's files area
- you shouldn't be able to see or make annotations
Change-Id: I2755079dedd057a1db326cf4cc865ac5a36debd0
Reviewed-on: https://gerrit.instructure.com/14029
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
clean up update code style to not use $.proxy,
like we talked about in our meeting and a couple
other minor fixes
Change-Id: I9537f7e40bc63fe17b14fac20e80111fbd48af24
Reviewed-on: https://gerrit.instructure.com/14021
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
test plan: set some notification preferences to daily/weekly for a few
different users. after the SummaryMessageConsolidator job runs, the
messages should still get sent, and DelayedMessage.summarize jobs should
be created in batches rather than individually.
Change-Id: I81c0404ad641ef0e89e585b104c7727b16cd800a
Reviewed-on: https://gerrit.instructure.com/13775
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
refs #9548
test plan:
* create a course with two sections and a quiz
* enroll a student in each section
* enroll a TA in one section, with privileges limited to
that section
* take the quiz as each student
* log in as the TA
* verify that the "Show Student Quiz Results" button
does not let you see the results for the student
outside your section
* verify that the "Moderate This Quiz" button
does not let you see the results for the student
outside your section
Change-Id: I5f25f3b8272790366c9213ba4e1d58abbdfd6752
Reviewed-on: https://gerrit.instructure.com/13979
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
fix regression caused by #8684 where recipient/course popovers (e.g.
"3 others" link) would get clipped. move popover up a bit in the dom and
change how it gets positioned (now we clone the hidden contents).
test plan:
1. in each supported browser, go to conversations
2. if you don't already have any, create conversations with many
recipients and many courses (so you get those links)
3. ensure the popovers work in the left-hand pane
1. they should not get clipped
2. they should be positioned under the link
3. they should scroll
4. ensure the popovers work in the right-hand pane (when the conversation
is selected)
1. they should not get clipped
2. they should be positioned under the link
Change-Id: Icfb3ce3686e664b13edcf1d4f6e7ef261bf360de
Reviewed-on: https://gerrit.instructure.com/14020
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
on the student grade summary page, notify users using
screen readers of assignments that will be dropped.
test plan:
* as a student using a screen reader, navigate to a
course grade summary page that has dropped assignments;
* navigate to the points column of a dropped assignment and
verify that a notice that the assignment will not be
considered in the final calculation is read.
Change-Id: Iad2bb9ef60bf14cfc39dbab0867592fd34a6761a
Reviewed-on: https://gerrit.instructure.com/14017
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
closes#10956
Test plan:
* make a crocodocable homework submission
* preview the file in the user file's page and make sure it opens in
crocodoc (not google docs)
Change-Id: Ifa9557dbfba2f1253fa02b99ece20de7a7f9cd21
Reviewed-on: https://gerrit.instructure.com/14006
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
fix inline js translation helper (jt) so that it works with absolute keys
test plan:
1. change the locale for the root account
2. log out
3. follow the "forgot password" link
4. put in your email and submit
5. the green "email sent" notification that pops down should be translated
Change-Id: I3f8cf0cb3ac87823c44482bba1f4dcf1cc601c0c
Reviewed-on: https://gerrit.instructure.com/13960
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
fixes#10969
test plan:
1.Create a new course
2.Navigate to Calendar2
3.Double click one of the dates on the month calendar
4.Try to add some text that is greater than 255 characters
5.Notice the text stops at 255 characters, click 'Submit'
6.Notice that the assignment is created without a DB error
Change-Id: I4566e2b1756bd1984554eb35fda7094fa00ea2f4
Reviewed-on: https://gerrit.instructure.com/14014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
notifications were happening on monday because
TimeWithZone.advance(:days => x) does nothing. move them to saturday for
real and also spread them over the Eastern-time day instead of lumping
them all at 8pm (admittedly by timezone, but that's only 4 hours for the
continental US, which is the current majority of users).
add an indicator to the notification preference page to show a rough
time block in which they can expect their weekly messages to be sent.
fixes#8296
test-plan:
setup:
- create two accounts the same id but on different shards (shard ids
should not differ by a multiple of four)
- in each a account, create a user with a communication channel; call
them Alice and Bob.
- create a third account on the same shard as Bob's account but with a
different id (account ids should not differ by a multiple of four)
- in this account create two users with a communication channel each;
call them Charles and David.
- for each of the four users, assign a notification to deliver to the
user's communication channel weekly
- on Friday, trigger the associated notifications for each user
- on Sunday, trigger David's notification again
expectations:
- each user should receive the messages on saturday (Eastern-time),
not monday
- Alice's and Bob's emails should arrive in different "quarter days"
- Bob's and Charle's emails should arrive in different "quarter days"
- Charles' email and David's first email should arrive in the same
"quarter day" but in different hours
- David's emails should come a week apart, but in the same hour both
times
UI:
- go to the notifications preference page
- should see note at bottom indicating two hour block during which
their weekly notifications will be sent
- actual send time of weekly notifications should fall within that
block
Change-Id: I97bb75762ef8c03fae99ad5499b441f7c026d2c8
Reviewed-on: https://gerrit.instructure.com/13963
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan:
1. Create a new course
2. Create a new assignment
3. Try to add a title to the assignment that is longer than 255 characters long
4. Notice the input box stops at 255 characters
5. Click 'Update', notice the assignment is saved with no DB error
Change-Id: I7e5d2374d699c25c15d13cebef2403bea3121e73
Reviewed-on: https://gerrit.instructure.com/13966
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
fixes#10880
when joining a self-signup group, permissions were being incorrectly cached
causing a 'membership pending' page to be shown.
test plan:
- as a teacher, create a set of course groups, and allow self-signup
- as a student, join one of these groups
- it should not say 'membership pending'
- it should say 'you joined the group'
Change-Id: Ic11cdeead8db23293e64faa0dc3c803310e426cc
Reviewed-on: https://gerrit.instructure.com/13959
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
test plan:
1.Create a new course
2.Create a new Assignment Group
3.Try to enter a name for the group that is more than 250 characters long
4.Click on the Update button
5.Group gets saved with no DB error
Change-Id: I99074a0d8e2ed816640be9cf881d65638928d79d
Reviewed-on: https://gerrit.instructure.com/13978
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
gravatar now proxies fallback urls, meaning they don't work for private
hosts/ips (e.g. dev or test). the profile pic ui tries to remove broken
images, so depending on gravatar's behavior the number of images in the
dom could vary. so we remove that check, since we don't really need it.
also fix a related issue where if one of the images is missing, the last
one in the list will get removed (variable hoisting). incidentally this
fixes a sporadic failure
test plan:
1. run specs, they should pass
2. run canvas locally
3. upload a profile pic and click "Select Image"
4. reload the page and go to edit profile pics again
5. the uploaded pic should not get removed (the broken gravatar one should)
Change-Id: I31c82a983ba6451d7abc4465e7ca345ddaa5697f
Reviewed-on: https://gerrit.instructure.com/13975
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
also make the spec actually test the correct view
test plan:
* import the course in the imscc attached to #10785
* take the quiz as a student
* try to view the results
* you should not get a page error
Change-Id: I7c63d884c5af96c783aed82c64409b6a6218138c
Reviewed-on: https://gerrit.instructure.com/13891
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
fixes#9188
test plan:
* turn on voiceover or another screen reader and navigate to
the course people page;
* verify that the avatar link reads, "<username> profile" and
that the user's name reads, "<username> course profile."
* verify that the page looks/functions as expected for sighted
users.
Change-Id: I0be0131a695a1c1715bc318c532c2ffccaff2db5
Reviewed-on: https://gerrit.instructure.com/13451
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
test plan:
* create Module A with at least one item in it
having a completion requirement other than "must view"
(e.g., a quiz with "must score X")
* create Module B with an external URL item in its first slot
* configure Module A as a prerequisite of Module B
* as a student, view the last item in Module A
* click the Next button at bottom right
* you should see a page explaining this content is part
of a locked module, and listing the prerequisite(s)
to unlock it
* click the "view full course sequence button" to return
to the module view
* there should not be a green check/"viewed the item"
next to the external url item
Change-Id: I0805f5814f033c0adbc3a54a83b7a5bcac25a97a
Reviewed-on: https://gerrit.instructure.com/13924
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
don't proxy profile pic uploads through canvas
ensure s3_success returns the same JSON as create
fix issue with upload_only prepared uploads (success callback was not
getting the submitParam)
test plan:
1. w/ s3 storage, upload a profile pic
2. it should work
3. w/ local storage, upload a profile pic
4. it should work
Change-Id: I606ad761ea3e4a3e3023ebc199f2df06dfaaeb83
Reviewed-on: https://gerrit.instructure.com/13699
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
test plan:
in IE9 & IE8, When logging into canvas press the enter
key to submit the form instead of clicking button.
it should do same as hitting button
Change-Id: I1f394cb0dc8727301d86c8409726cd49c4168b4b
Reviewed-on: https://gerrit.instructure.com/13949
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
fixes#10889
Also some new functionality in Delayed::Batch -- you can now give it a
priority, and it'll create all jobs in one batch at that priority rather than a
separate batch for each priority seen. Also, if the batch only contains
one job, it'll just enqueue that job.
test plan: No user-visible changes. The following actions
where changed and should be checked for breakage:
- changing a grade in gradebook1/speedgrader
- changing a grade in gradebook2
- starting a quiz
- submitting a quiz
- sending a conversation message
Change-Id: I2f68eec7de1b1c4fc1ec417b8e89d69ec1c0e8ae
Reviewed-on: https://gerrit.instructure.com/13930
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
This will cut down on lock contention if many jobs workers are trying to
pop at once.
Change-Id: I1cce8ef5cceb35de2b5f2e274d59b199fc68018f
Reviewed-on: https://gerrit.instructure.com/13953
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes#10885
Test plan:
* submit a document that crocodoc fails to convert
* make sure the document is eventually submitted to scribd
(this should happen in 5 minutes on beta/production or after calling
CrocodocDocument.update_process_states)
Change-Id: I9b59182068370d65bdc694fa41a1c1cbf030be31
Reviewed-on: https://gerrit.instructure.com/13947
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
fixes issue with js translations not working in optimized js. for reals
test plan:
1. use canvas w/ optimized js
2. switch to another language (e.g. spanish)
3. go to the web conferences page
4. click to delete a conference
5. the confirmation dialog should be translated
Change-Id: I67766d05b39a58e79e5f895f99a6157adff7b9ea
Reviewed-on: https://gerrit.instructure.com/13919
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
fixes#10913
Test plan:
* go to a student's assignment submission page (for a submission that
can be previewed in crocodoc)
* click the preview button and make sure that you can annotate the
document
Change-Id: Ic1b62b4f6a626d9f1f17541e137c3381350c651a
Reviewed-on: https://gerrit.instructure.com/13946
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
fixes#10865
Test plan:
* submit an assignment
* annotate the homework as the teacher and student
* add peer reviewers
- peer reviewers should only see annotations they have made themselves
* mute the assignment
- the student now only see his own annotations
Change-Id: I07f15565f2f87786812d206bfbff0c8b2f2e8712
Reviewed-on: https://gerrit.instructure.com/13921
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
fixes#9345fixes#10702
test plan:
(for #9345)
* create a course with a file and an assignment
* put a link to the file in the assignment description
* make the link text also be the link to the file
you should have something like this:
<a href="/courses/XXX/files/YYY/download?wrap=1">/courses/XXX/files/YYY/download?wrap=1</a>
* export the course. the assignment export should succeed (no errors in the summary)
* import the export, and the assignment should be there
(for #10702)
* create a course with two assignments, each in separate assignment groups, and a file
* put a link to the file in the syllabus description, using the link itself as the
link text, as above
* export/import, and verify the assignment groups don't disappear
Change-Id: Icb0a8727a5d7f703bdf7646d98b72b2877246576
Reviewed-on: https://gerrit.instructure.com/13863
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
we're going to readdress this when we redo the dashboard. refs #10453
This reverts commit f24d71c6ee.
Change-Id: I5002b187aecf9a35154804564a5df463d50e073e
Reviewed-on: https://gerrit.instructure.com/13920
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
implement background message sending in the inbox. when sending any
message, the form now unlocks right away and a progress bar appears
at the top. you can potentially have several messages sending at once,
each with its own progress bar. determinate progress bars (i.e. for
bulk private messages) will still be on the page if you reload (assuming
they haven't finished sending).
also implement client-side form validations so that users are prompted to
put in recipients and a message
progress bar should be aria compliant. refs #9237
test plan:
1. send a new message to a single recipient
2. there should be an indeterminate progress bar as it sends, and the ui
should be unlocked
3. send a new group message
4. see step 2.
5. send a bulk private message
6. there should be a determinate progress bar as it sends, and it should
move with a relatively consistent velocity. the ui should be unlocked
7. send a message on an existing conversation
8. see step 2.
9. repeat steps 1-8 with attachments
10. try sending messages without a body or recipients. you should get red
error boxes
Change-Id: I1e4641505c3e4c42f840b292d739c78cb1c2baff
Reviewed-on: https://gerrit.instructure.com/13617
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
tweak truncateText so it is more like the ruby version (though not 100%
parity). changes include:
1. no longer on the $ object
2. never exceed max (previously it would stop adding words just *after*
max is exceeded)
3. use i18n ellipses and word separator
4. ensure the ellipses fits within max
5. truncate first word if it exceeds max (otherwise truncate on word
boundaries)
6. remove all extraneous whitespace
test plan:
1. find question banks to add when editing a quiz
2. the titles should be intelligently truncated
Change-Id: I33e05de32bdd6320a3fd10e5295b7d13bd7906c0
Reviewed-on: https://gerrit.instructure.com/13897
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>