Some quizzes ended up with a set of answers which caused the statistical
calculations to implode. This catches these and sanitizes them. JSON
parsers are happier now.
Closes CNVS-17466
Test Plan:
- Create a quiz which replicates the original problem. Apparently
this can be done by answering the quiz with different answers and
only two students, however I suspect it has more to do with answers
having a standard deviation of zero (i.e. identical answers).
- Visit the quiz statistics page for that quiz and confirm that stats
finish loading and show some data.
Change-Id: I2847a2aa99c34579c926b05b371a7c48242ab618
Reviewed-on: https://gerrit.instructure.com/47766
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
fixes CNVS-17162
test plan
- have sharding set up
- have a user with a conversation with global ids in the
root_account_ids field (use console trickery to cause this to
happen)
- as an account admin who isn't a site admin, masquerade as the
user
- navigate to the conversations inbox
- ensure that the conversation is visible in the inbox
console trickery
c = Conversation.find <your conversation id here>
c.root_account_ids |= c.context.root_account.global_id
c.save!
c.conversation_participants.each do |cp|
cp.update_attribute(:root_account_ids, c.read_attribute(:root_account_ids))
end
Change-Id: Ie99c7ad863a74f68ca3b745225076e5b8b0a0ea4
Reviewed-on: https://gerrit.instructure.com/47634
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
test plan:
* create an account admin role with the ability to
"Add/remove students" but not teachers/ta's/designers
* visit the "People" page and click the "+ People"
button to start adding a person
* the "Designer" role should not appear in the Role
dropdown
closes #CNVS-1484
Change-Id: I3c2b138b8744db66e897b39b4a1ec625aac8ad34
Reviewed-on: https://gerrit.instructure.com/47810
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
remove the account model methods, since these don't have
access to the request IP address, which is needed for
international terms of service.
test plan:
0. enable self-enrollment in account settings
1. enable self-enrollment in a course in the account
2. register a new user using the course's self-enrollment URL
3. terms of use and privacy policy links that appear on the
"require acceptance of terms" dialog should function
(and should not take the user to another "require
acceptance of terms" dialog)
4. create a new user via the Accounts page, then click the
link in the email sent to the user to complete the registration.
the terms of use/privacy policy links that appear in the dialog
should work (as in 3). (note that you can go to
/users/<id>/messages as an admin to see this email even if
outbound email is not configured in your portal.)
closes CNVS-18025
Change-Id: Ibf19d2892c587f9e251917f70448212aac0709ad
Reviewed-on: https://gerrit.instructure.com/47607
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@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-18146
Test Plan:
* Enable "Better File Browsing" feature flag
* Go to any course's Files page as an admin
or teacher
* Click the "+ Folder" button, then press enter
on the input (leaving the folder's name blank)
* Repeat the above step 10 or more times
* The folders created should be named "New Folder",
"New Folder 2", "New Folder 3", etc, and should
continue past "New Folder 10", "New Folder 11",
"New Folder 12", up to however many you created
Change-Id: I151c9baa8b6fd6176c434144f10165f23a600a22
Reviewed-on: https://gerrit.instructure.com/47709
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
refs CNVS-17788
so you can easily tell the difference between how long a batch took
vs. how long it took to start
test plan:
* upload an SIS batch and let it run
* when you view it via the API, it should include a started_at
timestamp
Change-Id: I142024f82260c2ba690a950a09365e90c18cd43d
Reviewed-on: https://gerrit.instructure.com/47412
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
test plan:
* create an assignment with a due date set in the past and
automatic peer reviews set to be assigned in the future
(and a number of peer reviews per user greater than 0)
* save the assignment
* check the list of running delayed jobs ("/jobs")
* should resolve the job and not keep queueing itself 5evr
refs #CNVS-18148
Change-Id: I2ee38ca4725fa7629667348592d7e04329655d8e
Reviewed-on: https://gerrit.instructure.com/47719
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-17975
test plan
- create an announcement with a delay post at date
- wait for delay post time
- ensure that announcement notification is sent
Change-Id: Ic6186de76c45622e8af7f33b8059c2262eb03003
Reviewed-on: https://gerrit.instructure.com/47682
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
test plan:
* see the documentation for the submissions api
"Grade multiple submissions" action
* should be able to add comment information now
closes #CNVS-18099
Change-Id: Ib3879d7bd208efd902ae0c0045e245500aedb25b
Reviewed-on: https://gerrit.instructure.com/47657
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
need to include role_id in cached enrollments
closes #CNVS-18072
Change-Id: Iac7cdf7c5285162cee3ab1103d007f006efd034f
Reviewed-on: https://gerrit.instructure.com/47638
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Since int is not technically a word
Fixes CNVS-18061
Test Plan:
- Through the api, attempt to change the calculation_int of an
outcome that has already been used to assess a student
- Ensure that it is rejected with an error message that uses the
word 'integer' instead of 'int'
Change-Id: I68a6ae2de437354a4abe6faecf231bd7b356f5e3
Reviewed-on: https://gerrit.instructure.com/47499
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
test plan:
* create a course
* create a wiki page with the old default front page title
"Front Page"
* replicate the legacy wiki state in the console with the
following command:
course = Course.find <COURSE_ID>
course.wiki.update_attribute(:has_no_front_page, false)
* "Front Page" should be the front page
closes #CNVS-18060
Change-Id: Ieabf84d5c601bab4f5a2d898af847b933aa1e5eb
Reviewed-on: https://gerrit.instructure.com/47605
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Tested-by: Jenkins
test plan:
* re-create your test db using
RAILS_ENV=test rake db:initial_setup
* should work
Change-Id: Iec245880490a43f1749c68bd2cc8869c6aba4d96
Reviewed-on: https://gerrit.instructure.com/47310
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Athough there is UI protection against this use case, it has been
possible to provide an invalid value for Assignment#grading_type
via the API. This adds a protection at the model level.
fixes CNVS-15455
test plan:
- Perform a POST api request to the assignment creation enpoint
(`/api/v1/courses/:course_id/assignments`) with an invalid
value for `grading_type`. A sample set of request parameters might
look something like:
{
"assignment[description]": "omg a description.",
"assignment[due_at]": "2015-08-28T23:59:00-06:00",
"assignment[grading_type]": "schmozzleboff",
"assignment[points_possible]": 30,
"assignment[title]": "Here is another title."
}
- An error like the following should be returned:
```
{
"errors": {
"grading_type": [
{
"attribute": "grading_type",
"type": "inclusion",
"message": "inclusion"
}
]
}
}
```
Change-Id: Ib410e9837adc609c668bad70ceab4affa8b11064
Reviewed-on: https://gerrit.instructure.com/47091
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-7398
test plan
- using canvas mobile app with push notification support, enable
push notifications
- cause a notification to be sent from the canvas web ui
- ensure that the canvas app gets a notification
Change-Id: Idb320520a23ba6c5c2649253da557160be54084a
Reviewed-on: https://gerrit.instructure.com/42892
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
to ensure the permissions on it are updated in a timely fashion.
test plan:
0. enable "better file browsing"
1. have a student enrolled in a course
2. view the student's files page, and note the course's files
appearing in the list
3. in a separate browser, as a teacher or admin, hide the
files tab in the course
4. refresh the student's browser and confirm that the course's
files no longer appear
5. in the teacher's browser, re-enable the files tab
6. refresh the student's browser and confirm that the course's
files appear again
fixes CNVS-17891
Change-Id: I43bb2d5606341e2ef7a337065d2e50e85bb1a40d
Reviewed-on: https://gerrit.instructure.com/47085
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
test plan:
* create two modules, both with an item and completion
requirement
* leave the first one unpublished, but publish the second
* add the first module as a prerequisite for the second
* view the modules page as a student
* the second module should be available (since the first
one is unpublished)
* now publish the first module
* visit the modules page again as the same student
* it should have reset the progress for the second module,
locking it
closes #CNVS-17819
Change-Id: I53bbb15d183866bb0bb25c8a7cf562b018bfe7f4
Reviewed-on: https://gerrit.instructure.com/46919
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan: (basically same as g/44678)
* create an account with a sub account
* change quotas on the parent account
* should still update the defaults on the sub account
refs #CNVS-14971
Change-Id: I1d064271fcf0eda3cedc223664cec861af98817b
Reviewed-on: https://gerrit.instructure.com/47164
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
refs CNVS-17778
if there a bunch of slow jobs in a row, the singleton won't have created
a job for each one, and we might run out of jobs
Change-Id: I99b89d1266e88b8a004fe9dff2d9be0760b97bc3
Reviewed-on: https://gerrit.instructure.com/47219
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
refs CNVS-17778
the point of the loop is to not spawn a ton of jobs for tiny live
events. for large batches, we want it to take a breath in between
so that if a hotfix happens, the next batch will run with new code
Change-Id: I50bef7fa6c3abcf514b8dbb301fe4ff99b965515
Reviewed-on: https://gerrit.instructure.com/47148
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-17951
test plan:
- go to course settings and enter student view
- open a browser console and type ENV.current_user_roles
- it should include 'student'
Change-Id: I8b4e05089519a9ed2946262c42853cb5c1da03dc
Reviewed-on: https://gerrit.instructure.com/47034
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Group.all_real_students will return all account users when a group's
context is an Account
Fixes CNVS-17623
Test plan
Regression Test
- Account Level Discussions
- Group Level Discussions
Change-Id: I0db79ab8285f264d46bce82ddd2a020d894befcd
Reviewed-on: https://gerrit.instructure.com/46974
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
Test plan:
Download the gradebook csv for a course that has a grading standard.
It should show both final and current letter grades.
Change-Id: I352354b5e6254325738b031d5e382d0a0c690102
Reviewed-on: https://gerrit.instructure.com/46861
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
fixes CNVS-8728
test plan:
- DA off
- set up an observer following a student
- set up an observer in course without a student
- create an assignment in this course
- both observers and the student should be
notified of the assignments creation
- remove an enrollment from an observer user
- create another assignment and this user
should not be notified
- DA on
- set up an observer following a student
(we'll call him observer A)
- set up an observer following a student
in a different section (observer B)
- set up an observer in course without a student
(observer C)
- create an assignment in this course for only
the section that observer A's student is in
- observer A and observer C should be notified of
the assignment, observer B should not be
Change-Id: I5ff01cc9a6f19e8c7dca4f806fe48b9d6d8dbe36
Reviewed-on: https://gerrit.instructure.com/45853
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
Quiz Stats were silently failing. This catches the failed server request
and renders a clean error page which directs the user to download the
reports instead of using the statistics UI.
Closes CNVS-17285
Test Plan:
- Access a quiz with more than 1000 submissions or more than 50
questions. See that the stats page is no longer rendered empty, but
that an error page is shown.
- Confirm that report buttons are operational
- Confirm that report popup info boxes are looking good
Change-Id: I850406ed164a61e59d137dda3221746ee25a77cc
Reviewed-on: https://gerrit.instructure.com/46377
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
refs CNVS-17778
we still have a unique constraint in the db that checks it
every time as well
Change-Id: Ie60798283a808bc8f3762b754d151d5c61f6afbc
Reviewed-on: https://gerrit.instructure.com/47020
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes PLAT-819
test-plan:
the api at http://{host}/api/v1/{context}/{context_id}/lti_apps
should include disabled lti2 apps
regression test the external tabs selection of assignments and modules
Change-Id: I77e504ac0b6a9edd5eb77abea6c980778bcf0ed4
Reviewed-on: https://gerrit.instructure.com/46862
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
fixes PLAT-816
test-plan:
*create a bunch of external_tools and lti2 tools with the same name
*hit the api here: http://{host}/api/v1/{context}/{context_id}/lti_apps
*it should paginate correctly and return all results across pages
*regression test the external tool selection for modules and assignments
Change-Id: I715d2bf38b796c70ea3f547b0b5c2d85f44f85ea
Reviewed-on: https://gerrit.instructure.com/46828
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
especially when it's flat out wrong and causes it to not work
even when run in a sharded environment, it's run per-shard anyway
Change-Id: I6f568b44a6fe636468372e708cfcdcb329d4a733
Reviewed-on: https://gerrit.instructure.com/46744
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Fixes CNVS-17816
Test Plan
- Set a calculation_method and a calculation_int and make sure it
works
- Set illegal values, and make sure it doesn't work
- Observe that the error message is decent
Change-Id: I13855bc33162be74fb0c642cec7083d3627d5644
Reviewed-on: https://gerrit.instructure.com/46713
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
closes PFS-884, PFS-885, PFS-886, PFS-887, PFS-888, PFS-889, PFS-891, PFS-892
Test Plan:
1) View a course that is public (Possibly take a screenshot)
2) Go the settings for that course and check 'Make this course visible to authenticated users'
3) Attempt to view that course without being logged in. You should not be able to.
4) Login but make sure you aren't enrolled in that course and you should see the identical page that was seen when the page was public
5) Enroll in the course and it should appear normally.
Change-Id: I5303874c80db9d19c838ef44581102f4dfaf5f29
Reviewed-on: https://gerrit.instructure.com/46550
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sean Mikkelsen <smikkelsen@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Cody Tanner <ctanner@instructure.com>
Product-Review: Cody Tanner <ctanner@instructure.com>
QA-Review: Cody Tanner <ctanner@instructure.com>
Tested-by: Cody Tanner <ctanner@instructure.com>
sometimes account.settings[:trusted_referers] is explicitly nil (probably a bug,
but needs more digging). don't blow up in that case, just treat it the
same as empty string.
test-plan:
* set account.settings[:trusted_referers] to nil
* try to login
* shouldn't get a page error
Change-Id: I6c8f8f545c4c85849f7da71dadd40e55bd8e9da4
Reviewed-on: https://gerrit.instructure.com/46896
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
convert grading standards page to React code,
and add a tab for Grading Periods when MGP feature flag
is turned on.
closes CNVS-15966
test plan:
1) As an admin, visit the 'Account' home page (
for example, http://localhost:3000/accounts/1).
Go to settings and turn the feature flag on for
'Multiple Grading Periods'
2) Click on the link on the left-hand side that says
'Grading'
3) Verify that there are now 2 tabs - one for 'Grading Periods',
and one for 'Grading Schemes'. There should not be any
content in the 'Grading Periods' sectiion (this will be
added in a later ticket).
4) Click on the 'Grading Schemes' tab. Verify that the tab
is fully functional, i.e. you can create, edit, and delete
grading schemes. Follow this link to a Jing video for
more detail on what needs to be QA'd here (there is a lot).
(http://screencast.com/t/nsiCVsMjcdF).I changed the behavior
slightly from how it is portrayed in the video. Now, the
values will auto-recalculate when input is changed, as opposed
to changing when focus is lost on the input.
5) Verify when you hover over the '+' icon to add a new row to
the scheme, a line appears below the current row to show where
the new row will be inserted.
6) Verify that clicking "Add grading scheme" and then clicking
"Cancel" removes the new grading scheme, rather than resetting
the values of the scheme to default values (this behavior is
different from what was shown in the video, and was changed after
a talk with Product).
7) Check all functionality covered in the video is also accessible.
Change-Id: Iff61acf917bce297f7943ac758862fa56eed275c
Reviewed-on: https://gerrit.instructure.com/44667
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
Updated "inconsistent appointment group" subcontext check to explicitly
check for group_categories
Fixes CNVS-17414
Fixes CNVS-16580
Test Plan:
- Follow steps in ticket. Didn't want to post client data in commit message
Change-Id: I211be6ca03884e594a7aedf70d9c4667c76b0c92
Reviewed-on: https://gerrit.instructure.com/46018
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
refs CNVS-15324
no test plan
Change-Id: Ia60a27829ad86e13e1540a0e32c8e2d5bbbd3b0a
Reviewed-on: https://gerrit.instructure.com/46595
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
external feeds have three columns that really aren't adding any value
* body_match: never used anywhere in the code, always nil in the
database
* feed_type: always 'rss/atom' (built to handle ical, but never used)
* feed_purpose: always 'announcements' (build to handle calendar_events,
but never used)
closes CNVS-17581
test plan:
- create an external feed on the announcements page
- wait for the rss feed to post a new story and the aggregator to run,
OR, in a rails console:
* set the created_at date on the external feed to before the last
posted entry, something like
ef = ExternalFeed.last
ef.created_at = 5.days.ago
ef.save!
* run the external feed aggregator, like so:
ExternalFeedAggregator.process
- it should create an announcement for the blog post from that feed
Change-Id: I74deffbdaaa1e217f8eefbdfd1000d50c2406cb1
Reviewed-on: https://gerrit.instructure.com/45990
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
This solves the issues of handling pre-existing outcomes, as well as
imports.
Fixes CNVS-17729
Test Plan:
All using the API:
- Create a new outcome with no calculation_method specified
- Observe that the outcome is created with a calculation_method of
'highest' and a calculation_int of 'nil'
- Make sure the calculation_method cannot be set to nil, or any
illegal values
- Make sure the calculation_int cannot be set to any illegal values
- Make sure outcomes can be created/edited/destroyed successfully
Change-Id: I2f9b54ba6eaeab8d78b754f5cdae49adfa90e77b
Reviewed-on: https://gerrit.instructure.com/46480
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
rather than silently changing the values.
Fixes CNVS-17630
Test Plan:
Using the API:
- set an outcomes calculation_method to an illegal value
(anything besides 'decaying_average', 'n_mastery', 'latest',
and 'highest'
- Observe that you get an error message telling you it is an
illegal value.
- set an outcomes calculation_int to an illegal value
- Observe that you get an error message telling you it is an
illegal value.
- Repeat the check for calculation_int for each calculation_method
Change-Id: Ic310583f7c14b25a0425fa809c0307d1f3194961
Reviewed-on: https://gerrit.instructure.com/46300
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
Add API access to get/set the calculation_method and calculation_int on
learning outcome objects. Add some default values for these, and
handling for older learning outcomes that have a nil calculation_method
and calculation_int. Also add some specs.
Fixes CNVS-10619
Test Plan:
(Verify this all works when authorized, and all fails when
unauthorized)
Using the API:
context: create a new outcome
- create a new outcome group and an outcome
- query for the group and outcome and make sure they return properly
- observe that the default calculation_method is returned as 'decaying_average'
- observe that the default calculation_int is returned as 75
context: query an existing outcome
- query an existing outcome (should have a nil
calculation_method in the DB)
- observe that the API returns 'highest' for the
calculation_method
context: update an outcome
- make an update to an existing learning outcome, adding
a calculation_method of 'highest'.
- re-query, verifying correct info returned
- verify that a calculation_int is NOT returned
- make another update to the outcome, this time setting
calculation_method to 'n_mastery' or 'decaying_average'.
Set calculation_int to '8' or '85', respectively
- re-query, verifying correct info returned. Verify that
a calculation_int IS returned
Change-Id: If07b0f6a85a8a080b6e96cadc1f5b3745b71794f
Reviewed-on: https://gerrit.instructure.com/45399
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
test plan:
- users (teachers and students) should be able to rename
themselves only if the "user can edit display name" account
setting is enabled
- teachers should not be able to rename students
(unless they are account administrators)
- account admins should be able to rename students
- teachers (who are not account admins) should still be able
to access student profiles via the API endpoint
/api/v1/users/:user_id/profile
refs CNVS-15410
Change-Id: Ieca773a566ec55da7d28f8a2f647eba99a8ef1ea
Reviewed-on: https://gerrit.instructure.com/46402
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
So that an api consumer doesn't have to make a call for each
individual course to find courses that are close to their
quota usage.
Test Plan:
* do an include[]=storage_quota_used_mb for the courses api
* it should return the property 'storage_quota_used_mb'
closes PLAT-812
Change-Id: Ia617ec825b685cbd682baffedee5afa7b19c5280
Reviewed-on: https://gerrit.instructure.com/46247
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
test plan:
* create a user on one shard
* enroll the user on a course on another shard
* should be able to set that course as a favorite
closes #CNVS-17647
Change-Id: Icb2163b8755243955f8a35d04bacad4e32be0c08
Reviewed-on: https://gerrit.instructure.com/46506
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
test plan:
* create an assignment
* enroll a student and submit to the assignment
* grade the submission
* note that it should not let you unpublish the
course on the course home page
* delete the assignment
* now you should be able to unpublish
closes #CNVS-17713
Change-Id: Ib76974c4d32efe7997caf32996b98e0446a8dd01
Reviewed-on: https://gerrit.instructure.com/46510
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>