fixes CNVS-4580
and don't load all the enrollments at once, either.
test plan:
* (in production mode)
* invite some people to a course
* stop delayed jobs
* click the re-send invitations link in the course settings
* the users should not see the invitations again yet (in /messages)
* start jobs
* the invited users should see the invitations again now
Change-Id: Id2a7396df9cfe1a0f559a9780c5df0d8b7b0fcb2
Reviewed-on: https://gerrit.instructure.com/18509
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
test plan:
1. go to /register
2. you should not be prompted to enter a birthdate in any of the flows
3. the forms should work
4. go to your (user) settings
5. you should not see your birthdate nor be able to enter one
6. the form should work
7. go to the self enrollment page for a course as a new user
8. you should not be prompted to enter a birthdate
9. the form should work
Change-Id: I9bf92d27e208696b2aed74b4a6396d434494679c
Reviewed-on: https://gerrit.instructure.com/18143
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
fixes CNVS-4056
test plan:
- delete some courses via the UI or API
- use the course batch update API with event=undelete to bring
them back
note: while you can undelete a course via its sis id, this only
works if the course was _deleted_ via sis. if you delete a course
via the UI or API, its sis ID is cleared. this is by design:
https://gerrit.instructure.com/#/c/3520/
Change-Id: I402dd1e0bdfc6ae639e1781f16ae5e629ca9f87a
Reviewed-on: https://gerrit.instructure.com/18062
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
closes #CNVS-4173
test plan:
- in rails console run:
Setting.set('gb1_max', '0')
- start your rails server
- go to the gradebook for any course
- it should redirect to courses/*/gradebook2
and the button to go back to gb1 should not be present
Change-Id: I5e08490f173898927f80496239d176ca0c92168b
Reviewed-on: https://gerrit.instructure.com/18068
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
because the time zone being used in delayed jobs is UTC, no
adjustments were being made for daylight saving time
test plan:
* find a course with assignments before daylight saving time
* copy the course
* make sure adjust dates is checked
* adjust the dates to after daylight saving time starts
* ensure that the copied assignments have the same time of
day as the original assignments (specifically the hour)
* extra credit: copy from during daylight saving time to
after daylight saving time ends
fixes #CNVS-1418
Change-Id: I753decc646fe63abf9e7af029f04b7494a18394a
Reviewed-on: https://gerrit.instructure.com/17910
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
This reverts commit a2e775cd87213179b2b97ddba07fe607d0c988e7.
refs #CNVS-3926, reverted because this should have only
affected GB and not other parts of canvas that use the
large_roster setting.
Change-Id: I72cd57f7177ff982e73beec489b1a892b6fa2e02
Reviewed-on: https://gerrit.instructure.com/17984
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Joe Tanner <joe@instructure.com>
closes #CNVS-3926
test plan:
- open app/models/course.rb and change LARGE_ROSTER_THRESHOLD from 250 to 0
- go to the gradebook for any course
- gradebook 1 should not be an option
Change-Id: I0c1cc13f6347c3f47be4c6e6825b01890e1b56ad
Reviewed-on: https://gerrit.instructure.com/17869
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Separates, streamlines, and makes shard-aware all use cases of
User#messageable_users *other* than searching (call site in
SearchController#matching_participants).
Produces three new methods that take the bulk of that responsibility:
* User#load_messageable_users -- given a set of users, filter out the
ones that aren't messageable, and load any common contexts for those
that are.
* User#load_messageable_user -- as User#load_messageable_users, but for
just one user.
* User#messageable_users_in_context -- given a context (a course,
section, or group), return the list of messageable users in that
context.
refs CNVS-2519
remaining on CNVS-2519 is to tackle the search application of
User#messageable_user. mostly there, but reconciling pagination
with ranking by number of shared contexts is proving problematic, so I'm
going to separate that into another commit.
meanwhile, I've renamed User#messageable_users to
User#deprecated_search_messageable_users to discourage any accidental
new uses and left it otherwise untouched. searching for users on the
same shard should be unaffected. You can still locate messageable users
on other shards to insert into conversations by browsing the shared
contexts.
test-plan:
* create user A in shard X
* create user B in shard Y
* for situations where A could message B if on the same shard:
- setup the situation where the common tie is on shard X (e.g. course
on shard X and both A and B in it). run exercises below
- setup the situation where the common tie is on shard Y. run
exercises.
- if appropriate, setup the situation where the common tie is on
shard Z. run exercises.
* for each setup described above, login as A:
- A should see the "message this user" button on B's profile
- if the common tie is a course, section, or group, A should see B
under that context when the context is selected in the recipient
browser
- if a conversation exists involving both A and B, when A loads the
conversation they should see B tagged with the common contexts
* regression test searching for messageable users from the same shard
Change-Id: Ibba5551f8afc2435fd14a2e827a400bf95eae76a
Reviewed-on: https://gerrit.instructure.com/17569
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
closes CNVS-3093
test plan:
1. visit a course grade book and click the button
to go back to the old grade book
2. in script/console do:
c = Course.find(<course_id>)
c.large_roster = true
c.save!
3. visit the course grade book page again
- you should be sent to gradebook 2
- there should be no button to go back to
the old grade book
Change-Id: Ica16c57851597b571dcb8c06ed6621f9a2364666
Reviewed-on: https://gerrit.instructure.com/17626
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
Modules can now be unpublished, which means that students
can't see them. An unpublished module doesn't affect module
progressions. So a module dependant on an unpublished
module won't be locked to a student.
fixed existing bug with adding prerequisites to a new module
Test Plan:
* Create unpublished modules
* They should be visible to teachers but not students
* Create a module that has an unpublished module as a prerequisite
* Students should be able to access that published module
* If you now publish the unpublished one, the other module should be locked
* Visiting an assignment/page/discussion that is in an unpublished module should
give a message saying you can't see the item
* As a teacher, if you're on the last item in a module (like a wiki page), the
next item link that points to the next module should have "(draft)" on it
if the next module is unpublished
* Getting a module in the api should now have the workflow_state
* After a course copy the modules should be in the same state
* Create a new module and add prerequisites. They should be added.
closes CNVS-3589
Change-Id: I7e9045148b391f996f0b00b7209341e7f0efe1d2
Reviewed-on: https://gerrit.instructure.com/17481
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-3111
test plan:
* enable the 'large_roster' flag on a course and verify
that, in that course, links to the speedgrader are
hidden in the following places:
- graded discussion topic gear menu;
- graded discussion entry gear menu
- quiz show page (right side bar);
- assignment show page (right side bar);
- gradebook1 assignment header dropdown;
- gradebook1 grade cell popup;
- gradebook2 assignment header dropdown;
- gradebook2 grade cell popup;
* also verify that attempting to navigate to the
speedgrader directly via /courses/:id/gradebook path
displays a message that the speedgrader is disabled
for that course.
Change-Id: Iab82bd7281208f6e2d3745bb3184c90068090535
Reviewed-on: https://gerrit.instructure.com/17710
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Tested-by: Eric Berry <ericb@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
when checking if a user has an enrollment in a course that allows a
permission, check for the enrollments on the course's shard
test-plan:
* create user A on shard X
* create course B on shard Y
* enroll user A in course B
* in course B's account, have a permission that depends on course
enrollment that should be true for user A's enrollment
* exercise that permission in course B as user A
Change-Id: I143ecebd25da15fc59c94c7119a664633d4fdb7c
Reviewed-on: https://gerrit.instructure.com/17565
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
refs CNVS-3606
this commit also removes the unused assignment_id option
Test plan:
download some gradebook csv, make sure the column order is the same as
gb2
Change-Id: I8dde6122805498a4513126bf288f93713b745c58
Reviewed-on: https://gerrit.instructure.com/17620
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
The batch update runs in a background job and updates a
Progress record while it runs. Based on the recently added
course controller's batch_update method.
fixes CNVS-2962
test plan:
- read and check the api documentation for the conversations
batch_update call
- create some conversations for a user using the GUI
- use the new api call to perform batch updates on that user's
conversations
- refresh the user's inbox and verify the conversations were
updated properly.
Change-Id: I185bb5402675b6f0475efed21a525c5d4d8a39cb
Reviewed-on: https://gerrit.instructure.com/17556
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
closes CNVS-3091
test plan:
1. visit gradebook2
- note the ability to upload scores
2. set large_roster to true for a course in
script/console
3. visit gradebook2 again
- note the option to upload scores is gone
Change-Id: I1995cbf878cd6898eee1167d0e80f25ef21261b6
Reviewed-on: https://gerrit.instructure.com/17649
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
there is no ui for this (yet)
test plan: N/A
Change-Id: Ifed7192dc23b7e92681bd03bc68ad16ace509205
Reviewed-on: https://gerrit.instructure.com/17614
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
fixes CNVS-3116
add course setting to default all its announcements to
'locked.' this setting is managed from the course settings
page.
test plan:
* edit a course from its settings page and check the
'Disable comments on announcements' checkbox;
* create a new announcement in the course and verify
that it is automatically locked;
* uncheck the 'Disable comments on announcements'
checkbox, create an announcement, and verify that it is
unlocked.
Change-Id: If535abbbb0849284c8a6dfc2e6a6d42861796777
Reviewed-on: https://gerrit.instructure.com/17436
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Tested-by: Zach Pendleton <zachp@instructure.com>
fixes CNVS-3606
Test plan:
* download some gradebook csv in a large class
* experience euphoria and surprise as your gradebook csv is quickly
delivered
Change-Id: I44e5fe14d73993d669eb6600072d6e2d125ad3cc
Reviewed-on: https://gerrit.instructure.com/17593
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
closes CNVS-3417
test plan:
* after the migrations are run, ensure that every section has at
least one entry in CourseAccountAssociations in the database
* smoke test SIS imports
Change-Id: I261cad633788efbf4b0c64db34436ef695856fee
Reviewed-on: https://gerrit.instructure.com/17256
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
when creating a new observer enrollment, touch the observee's updated_at
as was as the observer's, to invalidate caches.
Change-Id: I699211115d7256c849086b23796acbdf2f5828c1
Reviewed-on: https://gerrit.instructure.com/17566
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
fixes CNVS-3178
test plan:
1. as a student, create a discussion topic and a reply
2. as a teacher, uncheck "Let students edit or delete their own discussion
posts" on the course settings page.
3. as the student, confirm you cannot edit or delete the topic or reply
that you created
4. as a teacher, recheck the box and save
5. on the discussion index page, confirm the setting is checked in the menu
6. disable it via the menu
7. repeat step 3
Change-Id: Ib7d6ba3604370241de1145aac8e23d35f78591c4
Reviewed-on: https://gerrit.instructure.com/17535
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
refactor so that adding settings is less painful, and accessors are
automatic. change code to use accessors everywhere, and ensure settings
are handled by course import/export. also fix filter_attributes_for_user
call so that it correctly excludes hide_final_grades in api responses for
students
test plan:
1. toggle course settings (hide_final_grade / hide_distribution_graphs /
allow_student_discussion_topics)
2. they should work as advertised
Change-Id: I152e2236099b1bc1a42730babef12ac9cc2f9733
Reviewed-on: https://gerrit.instructure.com/17534
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
test plan:
* move a course to a different root account
* check the database - the section's root_account_id should have
changed as well
Change-Id: I75647cc2c920af1b3f5e28ca8df30d32afa704a1
Reviewed-on: https://gerrit.instructure.com/17406
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
add Profile model which can be used by context-y things, and a basic
CourseProfile model
test plan: N/A, see https://gerrit.instructure.com/17020
Change-Id: I68f4a5a4f0913167e7e25e7bc231b5bf8394c335
Reviewed-on: https://gerrit.instructure.com/17019
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-2200
normalize ignores out of the users.preferences column into
its own table. makes it more performant, and shard safe
test plan:
* add a user as a teacher in courses on two different shards
* set up an assignment needing grading (i.e. have a student
submit an assignment that requires grading) in both courses
* the assignment should show up on the teacher's dashboard
regardless of which shard he's on
* ignore the assignment on your dashboard on one shard
* reload - it should stay gone
* it should also be gone on the other shard
* have another student submit to that assignment
* it should come back on both shards for the teacher
* ignore it, permanently this time
* have another student submit to that assignment
* it should still be gone on both shards
Change-Id: I6646410273c6be05d4b21b29b6ab76feb8e65d0f
Reviewed-on: https://gerrit.instructure.com/17295
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
fixes CNVS-1338
basically, just process associations for the current shard, unless
we're explicitly calling update_account_associations on just the user
(since all the other triggers will only affect associations within
the same shard)
test plan:
* enroll an existing site admin user from the default shard in to a
course on another shard
* the user should immediately show up in the course's account's user
list
* remove the user from the course
* the user should immediately disappear from the course's account's
user list
* note the associations a user has
(u.user_account_associations.with_each_shard)
* delete them all (u.user_account_associations.with_each_shard { |s|
s.delete_all })
* call u.update_account_associations
* make sure they all get recreated
Change-Id: I794363d1703fb2d46cd27b67b1216fedef4deaae
Reviewed-on: https://gerrit.instructure.com/17155
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
refs #CNVS-561
test plan:
- use the Progress API to check the status of a batch course
update in progress (this is hard, because it will probably
happen quickly)
- the completion value should update periodically from 0 to 100
regardless of how many courses are being processed
there were two bugs here:
1. the actual value returned was going from 0 to 1
2. except on ruby 1.8.7, where it was actually counting the total
number of objects
Change-Id: I5603869c6858b659682b23a9bfdeed4e922b58ca
Reviewed-on: https://gerrit.instructure.com/17314
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
closes #CNVS-2464
test plan:
- turn self-enroll on for a course (course settings, more options)
- copy the secret URL
- turn self-enroll off
- go to the secret URL
- it should say enrollment is closed and not a 404 page
Change-Id: Ibd3f1c36f3c444dad48d4f492756d1db320475d8
Reviewed-on: https://gerrit.instructure.com/17226
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
this was a course setting which allowed students to edit assignment
descriptions only. unfortunately, it didn't work, because the form validation
code assumed a title input field would be present and tried to require that it
was there.
closes CNVS-3267
test plan:
- make sure the setting is not availble in course settings
- make sure students cannot edit assignments
- make sure teachers can still edit assignments
Change-Id: Iebeaa00f357a59bff8462ecde79c57d68c04320f
Reviewed-on: https://gerrit.instructure.com/17056
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
fixes CNVS-3375, CNVS-3426, CNVS-3436
previously, a user with enrollments in two shards could not
access some pages (e.g. conversations and profiles) because
they attempted to load enrollments across both shards. this
commit fixes the issue by changing to the appropriate shard
while querying enrollments.
test plan:
* create a user with courses in multiple shards;
* visit the conversations and profile pages and verify
that they display as expected and no error message
is displayed.
Change-Id: Iee98e2f19b1c454557d36c30d87eea9751f4557f
Reviewed-on: https://gerrit.instructure.com/17258
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
also adds a new Progress class and API endpoint for
managing new background jobs.
fixes #CNVS-561
test plan:
* refer to the API documentation for Courses
and Progress
* use the Update Courses endpoint to offer, conclude,
and delete multiple courses in a batch
* use the Query Progress endpoint to check the
status of a batch
* make sure offering already published courses
succeeds, and also concluding already concluded
courses
Change-Id: I49d89c1f373f4999b6201574b43a20c53ef28b70
Reviewed-on: https://gerrit.instructure.com/16844
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
test plan:
1. Go to course settings
2. click edit settings
3. click more options
4. check/uncheck the "Let students create
discussion topics" checkbox
- the setting should work
Change-Id: Icf096c3098f700234887d6a39a1c2f4d9c55de49
Reviewed-on: https://gerrit.instructure.com/16981
QA-Review: Cam Theriault <cam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
add a warning to the content migration instead of error out
when encountering a problem copying a file in the course
copy process.
test plan:
* try to copy a course that has an invalid file
(note: this might be difficult if not impossible to
set up through the UI... the easiest way
seems to be to run the following in the console:
Attachment.update_all({:filename => nil},
{:id => (-INSERT ATTACHMENT ID HERE-)})
fixes #CNVS-2169
Change-Id: Ie3cd11998f4a81ce8d79a756a8a65a31ec19bad3
Reviewed-on: https://gerrit.instructure.com/16705
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
fixes #CNVS-2611
also fix broken account user permission check (an account user could view
all users in a course, regardless of permissions). simplify logic in
enrollment_visibility_level_for
test plan:
1. as a student, confirm you can message the whole course
2. under account permissions, revoke "Send messages to course members"
from students
3. as a student, confirm you can only message admins in the course
Change-Id: I29d73c68b8d93c54616a515c699818025b4bb839
Reviewed-on: https://gerrit.instructure.com/16581
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
test plan:
1. log in as a student and go to:
/courses/:id/discussion_topics/
- the “start a discussion” button should work
2. open script/console
3. Find a course and change the setting, i.e.:
c = Course.find(1)
c.allow_student_discussion_topics = false
c.save!
4. Log in as a student and go to:
/courses/:id/discussion_topics/
- The “start a discussion” button should not
display
UI coming in a different commit
closes #CNVS-2613
Change-Id: I162b0356f1e23bee2bdb89f7797976bc3bab192d
Reviewed-on: https://gerrit.instructure.com/16674
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
test plan:
- have a user with a login enrolled in a course
- in the users tab, try to add that user again, in the same role,
using the user's login id
- you should see an "already existed" message, and the count
above the role should not change
- the above should still work if this user is preceded by more
than 16 other users in the enrollment list (that is, we should
still recognize the user as already enrolled even if they're
not loaded in the paginated list; please do a refresh before
enrolling the test student to make sure the buffer students
aren't loaded)
fixes #CNVS-2767
fixes #CNVS-2770
Change-Id: I2ee56b48ac7dc382cb352c4e99d02e86480aec95
Reviewed-on: https://gerrit.instructure.com/16720
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
fixes #CNVS-2619
test plan:
1. create an account level group
2. put somebody in the group
3. remove them from the group
4. refresh the page
- the user should be in the unassigned area
if a user had previously belonged to a group, they
were no longer included in unassigned since the
query didn't check the workflow state
Change-Id: Iaca501c4fc35847759f56a925707618571943bf6
Reviewed-on: https://gerrit.instructure.com/16638
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
* wrap RoleOverride#permission_for with enabled_for? that also takes a
context of where the permission is being applied, and recalculates its
enabled-ness relative to that context; use that for checking account
admin and enrollment permissions
* refactor User#can_masquerade to properly check for descendant
permissions
test plan:
* create a custom role in site admin. give it permission to
manage permissions
* in script/console, find that override and set apply_to_self=false
* add a user to that role, and login as that user
* the user should not be able to change permissions in site admin
* the user should be able to change permissions in the default
account
* add another role in site admin. give it permission to manage
permissions
* in script/console, find the override and set apply_to_self=true,
apply_to_descendants=false
* add another user to that role, and login as that user
* the user should be able to change permissions in site admin
* the user should not be able to change permissions in the default
account
* the first user should not be able to masquerade as the second user
and vice versa
* an Account Admin should be able to masquerade as either user
* create a custom role in the default account, give it permission
to manage permissions, and add a user to that role
* the first user should be able to masquerade as the new user;
the second user should not be able to masquerade as the new user
* general regression tests on permissions and masquerading
Change-Id: I20a1183b7dfec419634a92cda498f245187060ef
Reviewed-on: https://gerrit.instructure.com/15896
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
Allows several new fields in the Assignments API to both update existing
assignments and set attributes on freshly created assignments.
test plan:
- run through the api trying each field in the generated
documentation.
- Make sure you can create assignments with every field, and update
assignments with every field available in the documentation. The
specs do this so they should pass as well.
closes #CNVS-2190
Change-Id: I0d67e379777b5a313f45289f23852122b1e61a37
Reviewed-on: https://gerrit.instructure.com/16114
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
notifications will no longer be sent to students if:
* the file's folder is locked (and thus inaccessible
to students), or
* the files tab has been hidden on the navigation
and is thus inaccessible by students
test plan:
* as a student, set file notification to ASAP
* as an admin, create a folder and lock it
* add a file
* confirm that the student account did not receive
an email notification
* repeat the above, but instead of locking the file,
hide the file navigation tab in the course settings
closes #CNVS-1688
Change-Id: Ic4398f2dadca0892d7e0643ec5e9b3eba6991dbd
Reviewed-on: https://gerrit.instructure.com/16243
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
an excessively long course short_name or assignment title could cause a
filename over the 256 character limit.
fixes #CNVS-2365
test-plan:
- create a course with a 250+ character course code (aka short name)
- create an assignment in that course
- create a submission for that assignment
- go to the assignment page and click "Download Submissions"
- zipfile should successfully create and download
- repeat with short course code but 250+ character assignment title
Change-Id: Idcf0bdc303e8b467fc29196c52081f2070344811
Reviewed-on: https://gerrit.instructure.com/16362
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ethan Vizitei <ethan@12spokes.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
test plan:
* enroll a user as a plain Student
* enroll the same user in a custom student role
* the plain Student enrollment should not disappear
Change-Id: I7f7a1ce96a1a5f971a7226756d25b063d6f88a87
Reviewed-on: https://gerrit.instructure.com/16363
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
closes #CNVS-2397
Test plan:
- set up a course with assignments
- mute some assignments
- set grades for students
- make sure the gradebook csv totals and the gradebooks match
- the student's grade page (when masquerading) should *not* match
(it should ignore muted assignments)
Change-Id: Iebe15c5d108dcfa899bd501cc6dd45ceb688fa25
Reviewed-on: https://gerrit.instructure.com/16197
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Simon Williams <simon@instructure.com>
don't count manually created student enrollments toward the cap
test plan:
1. set an enrollment limit on a new course (e.g. max 1)
2. as a teacher, add several students
3. confirm that additional students can still self enroll up to the limit
(the students added in step 2 don't count)
Change-Id: I93309181f3a5021d6cf51b8c02ba899f017cd32e
Reviewed-on: https://gerrit.instructure.com/16308
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
there are various concerns about the distribution graphs available on the
student grades page revealing too much about other students scores. give
teachers the option to remove these for all students in their course.
fixes #CNVS-1063
test plan:
- as a teacher, grade > 5 students for an assignment
- as a student, verify that you can see the box and whisker plot of the grade
distribution on your grades page.
- as a teacher, go to course settings > more options > and check "hide
distribution graphs"
- as a student, verify that you cannot see the graph anymore.
Change-Id: Ieab4137e52b616a394a3de0ee313cfd0a0abcc0d
Reviewed-on: https://gerrit.instructure.com/16191
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
fixes #CNVS-2300
test plan:
* using a course that has no sections
* click 'Student View'
- the Student View should show correctly (not error)
Change-Id: I2dbfab8775d51a4a0cf4aae22de9f7207da848c3
Reviewed-on: https://gerrit.instructure.com/16223
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
add support for self enrollment caps to limit the size of a particular
course. there is no UI for setting caps (yet)
test plan:
1. run specs
2. follow test plan for https://gerrit.instructure.com/15819
Change-Id: Ibf0a8f04f0c2efa820d0850cef26dfae20849246
Reviewed-on: https://gerrit.instructure.com/16021
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
fixes #CNVS-1119, potentially supersedes
https://gerrit.instructure.com/14501 with a little work.
simpler flow that is more consistent with FFT signup. whether you click
the "join course" button (popup) or go to the join url, the workflow is
the same:
1. if you are authenticated, you just click the enroll button.
2. if you are not authenticated, you can either:
1. enter your (canvas/ldap) credentials and submit to join the course.
2. register and join the course (single form). you will then be
dropped on the course dashboard in the pre_registered state just
like a /register signup (you have to follow the link in your email
to set a password).
note that if open registration is turned off, option 2.2 is not available.
other items of interest:
* fix CSRF vulnerabilities where you can enroll authenticated users in
open courses, or un-enroll them if you know their enrollment's UUID
* move to shorter course-id-less route (w/ join code)
* reuse UserController#create
* handy openAsDialog behavior and embedded view mode
* better json support in PseudonymSessionsController#create
* extract markdown helper from mt
* show "you need to confirm your email" popup when you land on the course
page the first time (already showed on dashboard)
test plan:
1. test the authenticated/unauthenticated scenarios above, for both the
popup and join pages
2. regression test of /registration forms
Change-Id: I0d8351695356d437bdbba72cb66c23ed268b0d1a
Reviewed-on: https://gerrit.instructure.com/15902
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>