deleting a user could cause thousands of update-cached-due-dates
jobs to be enqueued (one per assignment per enrollment; in the
referenced ticket, the test student had 13 enrollments and there
were 88 assignments, yielding 1,144 jobs, causing the request
to time out).
fix this by
(1) using a batch job to update all assignments in the course,
instead of a job per assignment
(2) when deleting a user with multiple enrollments in a course,
only run the update cached due date job once per course
test plan:
0. run in "production" configuration (i.e., in QA portal)
1. have a course with 10 sections and 100 assignments.
I suggest creating these in the console, e.g.
course = course.create! name: "CNVS-8068"
10.times { |x| course.course_sections.create! name: "section #{x}" }
100.times { |x| course.assignments.create! name: "assignment #{x}" }
2. enter student view mode in this course
3. reset the student view student
4. verify 1000 jobs were not created (and the request doesn't time out)
fixes CNVS-8068
Change-Id: If00dd3197b70df42b0f9ec18303b02594861f69f
Reviewed-on: https://gerrit.instructure.com/25160
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
- As a teacher, make a quiz and an assignment.
- You should be able to unpublish and publish the quiz and assignment
and will.
- Publish the quiz and assignment
- As the student, turn in a submission for the assignment and quiz.
- As the teacher, you should not be able to unpublish the quiz and
assignment.
fixes CNVS-7193
Change-Id: Id56ba2ec87275fcfd6d76397f2e41b32abc88833
Reviewed-on: https://gerrit.instructure.com/24103
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
test plan:
* configure grade passback to an endpoint on localhost
* use nc to listen on that endpoint
* add a module to a course, configure it to publish grades
when it is completed
* complete the module, as a student
* your nc should have got a grade publishing notification
* validate that you can edit grade publishing settings for
existing modules
* validate that updating and viewing grade publishing settings
for modules via the API
Change-Id: I100cff54e1b5e83b56d93d35bf950f589357b88b
Reviewed-on: https://gerrit.instructure.com/24983
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
use it to trigger a singular grade publish for a user
Change-Id: If28044b9bef6c71d2061adb2ac423b836f4c8634
Reviewed-on: https://gerrit.instructure.com/24977
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-7801
test plan:
* upload a large sis import (one that will take long enough for you
kill it) via UI
* start jobs
* make sure you see progress in the UI
* kill -9 the DJ worker processing the batch
* the UI should immediately update that it failed
Change-Id: Ifa86892326eda4f59deac659421ac8b7ce32b3bc
Reviewed-on: https://gerrit.instructure.com/23836
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-8732
makes Mailer#message act in the rails3 style, but then provides
scaffolding so that it produces the necessary rails2 behavior when
running under rails2
test-plan:
* email delivery needs to be configured
* set up an email communication channel for a student
* configure to receive conversation alerts at that channel
* have a teacher send a conversation message to that student
* confirm receipt of the email at the student's address
Change-Id: I7f027a0a9a9dfd0231847017c888f1003b38d948
Reviewed-on: https://gerrit.instructure.com/25035
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
fixes CNVS-8836
test plan:
- create a formula question
- add a question where the answer will be negative
- add a percentage margin of error
- make sure adding an answer above/below that margin of error works correctly
Change-Id: I80ed024d0a83109f006563145bc2f363bb25418f
Reviewed-on: https://gerrit.instructure.com/25304
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
test plan:
1. create an enrollment term that begins in the future
2. create a course and put it in that term
3. invite a teacher to the course
4. log in as the teacher
5. you should not be locked out of the course as soon as
you accept the invitation
fixes CNVS-8712
Change-Id: Iae60fbeba8e7e00d434fb1f984b3a0c26f1396c3
Reviewed-on: https://gerrit.instructure.com/25289
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan:
1. have an enrollment term that has ended
2. have a course in that term whose end date is in the future
3. check that you can still add users to the course
(the add-users button shouldn't have mouseover text that
says you can't add users because the course is concluded)
fixes CNVS-2702
Change-Id: I52e0ca83f488f737c95e7f58d2e59be1187970f1
Reviewed-on: https://gerrit.instructure.com/25210
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
fixes CNVS-8780
test plan:
1. create a user in one shard
2. try to self enroll in a course in another shard
3. it should work, and you should not get a page error
Change-Id: Id856686546499f90c4a77cd64d008b621cdc4158
Reviewed-on: https://gerrit.instructure.com/25257
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
use arel's where() instead. use of :conditions in has_many/has_one
remains, and a small handful of cases where rails2 sharding needs the
conditions in the find.
also, cleanup distinct_on() to only allow the :select/:option values it
works with directly; other finder options should be scoped in before the
distinct_on call.
fixes CNVS-8754
test-plan:
[1] communication messages API
- fetch /api/v1/comm_messages?user_id=self as a non-siteadmin; should
not error, should include the expected messages
[2] course roster
- load /courses/<id>/users
- invite a new student to the course; do not have that student accept
the invitation
- reload and open the web console; ENV.courses.pendingInvitationCount
should be 1
[4] list enrollments API endpoint
- full regression
[5] list conversations API endpoint
- fetch /api/v1/conversations; should not error, should include the
expected messages
[6] rubrics
- create a rubric with title "Example Rubric"
- create a second rubric with the same title; title should be changed
on save to "Example Rubric (1)"
- repeat to get "Example Rubric (2)"
Change-Id: I411676285348653044696d850efacf2e1a9e6585
Reviewed-on: https://gerrit.instructure.com/24996
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
rather than rails2.3 style validate_on_* and before_validation_on_*
fixes CNVS-8752
test-plan: (in script/console)
- initialize a discussion entry (not yet saved)
- set entry.depth to DiscussionEntry.max_depth + 1
- try to save it; should raise an error about the maximum depth
- set entry.depth to nil
- save it; should not encounter an error
- check entry.depth; should be 1
[this next part seems weird to me, but follows the letter of the code]
- with the same, no-longer-new entry, set entry.depth to nil
- try to save it; should not encounter an error
- check entry.depth; should still be nil
Change-Id: Ia56a7ab17d36698e59fda4b520b07352d61ce02e
Reviewed-on: https://gerrit.instructure.com/24997
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
fixes CNVS-8241
test plan:
- is possible, have a submission version with invalid yaml
- make sure the PopulateSubmissionVersions job runs successfully
- make sure the GradingHistory api endpoint returns all submission
versions
Change-Id: I00039df95cd3725d32c5478b27f10b9557cb9172
Reviewed-on: https://gerrit.instructure.com/24646
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
this is a standard header that indicates to other programs that
notifications and bounce messages are computer generated and
should not be responded to. This could prevent potential
message loops.
fixes CNVS-8718
test plan:
- configure canvas to send outgoing mail.
- generate a notification that doesn't accept replies (such as
a new assignment) and recieve the notification email.
- examine the headers (in gmail: "show original") and see
"Auto-Submitted: auto-generated".
- reply to the notification, which should bounce.
- examine the bounce email headers and see
"Auto-Submitted: auto-replied".
Change-Id: I2dee55628fd43b7aa61cd3167a71ed536562328d
Reviewed-on: https://gerrit.instructure.com/25132
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
This reverts commit 536f4d5038.
PluginSettings hold an instance of Plugin, which have a `@meta` instance
variable that contains Procs for i18n. Marshaling this entire tree into
the cache blows up with "no _dump_data is defined for class Proc".
Reverting to fix master since Cody is the only one with knowledge of why
this was done and he's out.
Change-Id: I4340e977ecfbaf6c598bdc05ce61e0d0bdce9a35
Reviewed-on: https://gerrit.instructure.com/25211
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Paul Hinze <paulh@instructure.com>
QA-Review: Paul Hinze <paulh@instructure.com>
rather than CANVAS_RAILS3 or Rails.version
this is to be consistent, and to reinforce that any "special" branches
are for rails 2.3 backwards compatibility while trying to target rails
3, rather than rails 3 "forwards compatibility".
Change-Id: I4494b65e3f71108a43d09032c1569c478646a828
Reviewed-on: https://gerrit.instructure.com/24998
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
fixes: CNVS-2197
Favorite courses between shards are broken due to the query performing an
EXISTS on the favorites table. This change fixes the query in that it gets
the favorite course ids from the users shard and converts them to a relative id
for the each shard the queyr runs on.
Test Case:
Setup:
- Create two courses, each on different shards.
(Course 1 on shard 1, Course2 on shard 2)
- Schedule a student from either shard 1 or shard 2 to both of
the created courses.
Note: A teacher should also be sufficient as long as they are associated to
both courses.
1. Log in as the student / teacher
2. Both courses should show under the
Courses menu.
3. Click the customize button in the courses menu.
4. Uncheck one of the courses.
5. Refresh the page and the courses menu should not show the course
that was unchecked.
6. Click the customize button in the courses menu.
7. Uncheck the other course so none of them are checked.
8. Refresh the page and the courses menu should
be reset back to normal. (Both courses showing and checked in customize) -
When all the courses are unchecked it should reset back to the default view.
9. Go through steps 3-5 again but with the opposite course.
10. Click the customize button in the courses menu.
11. Click the reset button.
12. Refresh the page and the courses menu should be reset back to
normal. (Both courses showing and checked in customize)
13. Add x number of courses and perform various customizations and the menu
should correctly reflect it even when courses span shards.
I also fixed a bug with the favorites. The favorites reset each time all the favorites
were unchecked. So unchecking all the favorites and then checking another one
reset the favorites to all of them. Here are steps to test that change:
1. Reset favorites
2. Uncheck all favorites
3. Check one favorite
4. Refresh the page and the only course visible should be the favorite that was
added in the previous step.
Change-Id: I8776696976b0974af42b7273333b39b88f388eb7
Reviewed-on: https://gerrit.instructure.com/24979
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
now that we have SIGHUP, we were changing everything to it anyway,
so just let caching in-proc be the default
Change-Id: Id1b44722522ac9693b17695da7107c99a359d5ac
Reviewed-on: https://gerrit.instructure.com/25020
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-6066
test plan
* using API:
- make an update call to an existing assignment
- set assignment[allowed_extenstions] to be a string > 255 chars
- verify error message is "internal_server_error"
- API call should not return anything from the database
- make another update call to an existing assignment
- set assignment[allowed_extensions] to be a string <= 255 chars
- verify that the change was saved
* from assignment edit page:
- check 'Allow file uploads'
- check 'Restrict upload file types'
- add some file types in the box and save (<= 255 chars)
- verify that it saved the file types
- edit the assignment again
- verify that you cannot exceed 255 chars in the 'file types' field
Change-Id: Ibf8ce3c77282951d6180894415d23470d4402f63
Reviewed-on: https://gerrit.instructure.com/25082
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
1. with draft state disabled,
- create a normal page (A)
- create a hidden-from-students page (B)
- create another hidden-from-students page (E), and
delete it (make sure it isn't returned later)
3. with draft state enabled, in the same course
- create a published page (C)
- create an unpublished page (D)
4. use the wiki pages index api as a teacher, with no params
- the four non-deleted pages (A-D) should be returned
5. use the wiki pages index api as a teacher, with
published = true
- only the non-hidden page (A) and the published page (C)
should be returned
6. use the wiki pages index api as a teacher, with
published = false
- only the hidden page (B) and the unpublished page (D)
should be returned
7. use the wiki pages index api as a student, with no params
- only the non-hidden page (A) and the published page (C)
should be returned
8. use the wiki pages index api as a student, with
published = true
- only the non-hidden page (A) and the published page (C)
should be returned
9. use the wiki pages index api as a student, with
published = false
- no pages should be returned
fixes CNVS-8681
Change-Id: I55c003764e34244d0a970e8ed606d38f0112a435
Reviewed-on: https://gerrit.instructure.com/25095
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
fixes CNVS-8676
test plan:
* from the console, enable the "agenda_view" setting
on your root account;
* verify that it works.
Change-Id: I5b20773ce8fc9496a5c5cd07c628ce2638b29d89
Reviewed-on: https://gerrit.instructure.com/25071
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
refs CNVS-8392
also update the page view API documentation
test plan:
* with this commit applied, page views will now log the remote
ip of requests, and return that ip in the api and csv downloads
* regenerate api docs with rake doc:api, and verify that the user
section now has expanded information on the api response
Change-Id: If463e211515881db6ce1f75c9bbca8c7fbcf7589
Reviewed-on: https://gerrit.instructure.com/24880
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-8649
test plan:
- create a quiz with a due date in the future and a timelimit
- take the quiz as a student
- go to speedgrader
- it should not be marked as late
- now change the due date to be in the past
- go back to speedgrader
- it should be marked as late
Change-Id: I853e7eb9ecbb6f4ffae20dac3e69c64dc30829f2
Reviewed-on: https://gerrit.instructure.com/25048
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
testing note:
this change affects all wiki page endpoints: api, draft state,
and non-draft state. basic functionality for all of these
pages should be verified, specifically when dealing with
non-existent or deleted pages.
test plan:
* PUT to /api/v1/courses/:course_id/front_page
- variations:
* wiki_page[title] - provided/not provided
* wiki_page[published] - true/false/not provided
* wiki_page[hide_from_students] - true/false/not provided
(hiding/unpublishing the front page is not allowed)
* PUT to /api/v1/courses/:course_id/pages/non-existent-page
- same variations as front_page (above)
* navigating to a non-existent/deleted page (draft state/non-draft state)
- should redirect teachers to the edit page
- should redirect students to the index page
(with an alert message indicating why)
* navigating to the 'Pages' tab (non-draft state)
- if the 'Front Page' exists
- shows the page
- if the 'Front Page' has been deleted (with draft state enabled)
- shows the edit page
- if the 'Front Page' has never existed
- shows the edit page
* all other pages functionality should remain unchanged
- non-draft state UI
- show page
- edit page
- draft state UI
- index page
- show page
- edit page
- api
- .../pages
- GET (index)
- POST (create page)
- .../front_page
- GET (show front page)
- PUT (create/update front page)
- .../pages/page-url
- GET (show page)
- PUT (create/update page)
- DELETE (destroy page)
fixes CNVS-8488
Change-Id: I563e6944e1602e0b21ab69c6fe2dcd643c06611d
Reviewed-on: https://gerrit.instructure.com/23590
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
1)
* create a course with a quiz assignment and
a quiz module item
* copy into a new course
* in the original course, edit the quiz title
* copy the original into the new course again
* note that a new quiz, assignment, or module item
has *not* been created, but rather their titles
have been updated
* confirm that the same happens when a course is
exported and re-imported
2)
* create a qti export from the original course
* import it as a QTI file into a new course
* edit the title of the quiz in the new course
* re-import the file, checking the "overwrite assessment
content" checkbox
* should revert the title to the original
* re=import the file, without checking the box
* should create a new quiz
fixes #CNVS-8097 #CNVS-8308 #CNVS-8443
Change-Id: I8b03ca9c9f5f1f3dada4d19369002f20b925d77e
Reviewed-on: https://gerrit.instructure.com/24710
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
The previous code was a one-off written before timeout_protection
existed. This means that we'll now allow N timeouts (3 by default) in
the given period, rather than refusing to connect to the LDAP server
after just one timeout.
closes CNVS-8371
test plan:
* Configure an account to use ldap. Rather than setting up a real ldap
server, it's sufficient for this testing to just use nc or another
application to listen on the port you specify in the account config.
* Attempt to login to the account, and see canvas in your nc output.
Allow it to timeout. Attempt again, and canvas will hit your "ldap
server" again. After 3 timed out attempts, canvas will blacklist your
server for 1 minute.
* Also verify that logging in with ldap still works against a real ldap.
Change-Id: I60293d01690be3cc24f57b8bcd5c6c52e23fc2a9
Reviewed-on: https://gerrit.instructure.com/24657
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
test plan:
CNVS-4067
- create a course (A) with three modules
- use the modules API to retrieve positions, and verify
they're unique (1, 2, 3)
- export course A
- create a second course (B) with three modules having
different names from course A
- import course A into course B
- use the modules API to retrieve positions in course B,
and verify that the imported modules' positions from A
do not overlap course B's module positions
(e.g., they should be 4, 5, 6)
- also test positions of imported assignment groups
CNVS-8256
- import the course attached to the ticket
- use the modules API to list the modules in the course
- the positions should be unique: (1, 2, 3), not (1, 1, 1)
fixes CNVS-4067
fixes CNVS-8256
Change-Id: Ib81a238e073e46eb01d72565a569ab24762d37bf
Reviewed-on: https://gerrit.instructure.com/24525
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
generates sane SQL for postgresql, which natively supports that,
and the correct workaround for others.
cause I can never remember the workaround in the first place, and
it's very confusing to read existing instances
Change-Id: I75dda687c057888a02a8d99a9b26c4674383006f
Reviewed-on: https://gerrit.instructure.com/24870
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
* use sort_by instead of sort where possible to avoid repeating yourself
* use new SortFirst/SortLast sentinels to avoid strange magical constants
* fix a few places of complicated logic for tiered sorting to just use
an array
Change-Id: I184ef0b4e31fa18294c9beb32770101d383bbea1
Reviewed-on: https://gerrit.instructure.com/24867
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-7199, CNVS-4414
abstract some ICU stuff out to Canvas::ICU, and add some missing
functionality in FFI-ICU
test plan:
* create a bunch of groups in the same category, named 1-10.
10 should sort after 9, not 1
* repeat for creating and publishing quizzes *with the same due date*.
go to the quiz index, and 10 should sort after 9, not 1
Change-Id: I323eb12dfb5bd23dbcbb3b543fa1b90a72f4341b
Reviewed-on: https://gerrit.instructure.com/24732
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
refs CNVS-7597
this was the only call site, and the implementation did a lot in ruby
that is better done in the database
test-plan:
- regression testing on /api/v1/courses/123/files
Change-Id: I120438c58f1c8de34503a0d14fc51d3853eb9385
Reviewed-on: https://gerrit.instructure.com/23943
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan:
* verify that the API docs for "Create a conversation" document that
the maximum subject length is 255 characters
* post a conversation to the API with a subject longer than 255 chars
* verify that you get a model validation error
* open new conversations
* compose a message
* try to enter more than 255 characters in the subject field
* verify that your input is constrained
Change-Id: Ibf569c8b7aa17677a5968859b57b0e0c3c373603
Reviewed-on: https://gerrit.instructure.com/23521
QA-Review: Cam Theriault <cam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
closes CNVS-7197
test plan:
- add a formula question type in a quiz
- create your variable definitions and formula definitions
scenario 1:
- generate possible solutions, and add a margin of +/- a percentage value (5%)
- make sure that when a student answers a quiz question that it allows the
percentage margin of error entered
scenario 2:
- generate possible solutions, and add a margin of +/- a point value (2.0)
- make sure that when a student answers a quiz question that it allows the
margin of error entered (as it worked previously)
Change-Id: Ib819cdd2b3412dfb080e44cacf6516ceb8fa4944
Reviewed-on: https://gerrit.instructure.com/24539
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
closes CNVS-6824
This adds a permissions attribute to the returned json for discussion topic
contexts (Course, Group).
The permissions attribute contains an optional permission of
"create_discission_topic" which returns true or false depending on whether the
current user can create discussion topics for the course or group. For
performance reasons this is only added to a single course/group json and not in
lists so the only call that will return it is /api/v1/<context>/<context_id>
where context is a course or group. Since we did not want to include this on
every response its a custom permissions attribute for course and groups in the
course_json or group_json serialization methods.
Using the includes parameter for the API supplying a value of "permissions"
will include the permissions with "create_discussion_topic" for a group and
course. When the object is serialized to json it checked to see if the model
implements a serialize_permissions method and calls that to render or override
permissions generated from the policies.
- Create a test Course. Make sure the course allows members to post topics.
- Add a student to the course.
- Make a call to /api/v1/courses/<id> where "<id>" is the id of the created
course.
- The response should include a permissions attribute with a boolean value for
"create_discission_topic" see the example below.
- Make a call to /api/v1/courses to return a list of course objects.
- The permissions attribute should not be included in the response.
- Create a test Group tied to the course created in the first step.
- Add a mamber to the group.
- Make a call to /api/v1/groups/<id> where "<id>" is the id of the created
group.
- The response should include a permissions attribute with a boolean value for
"create_discission_topic" see the example below.
- Make a call to /api/v1/groups to return a list of group objects.
- The permissions attribute should not be included in the response.
Example Response:
{
id: 42,
...
permissions: {
create_discission_topic: true
}
}
Change-Id: Ia02d5aa67e345740a93dd0f63e357e7cb5e1efd6
Reviewed-on: https://gerrit.instructure.com/24478
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
fixes CNVS-8461
test plan:
* create a big blue button conference with recording
enabled;
* start and end the conference;
* reload the conferences page and verify that it loads
as expected.
Change-Id: I159765d894f37261d650ee633023b6415f19f6f4
Reviewed-on: https://gerrit.instructure.com/24766
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
test plan:
* create a course with a group
* create a wiki page for the group
* inside the group, add a link to content for the course
(e.g. "/courses/:course_id/files")
* it should not translate the link to point to "/groups/:group_id"
fixes #CNVS-8313
Change-Id: Icd64cf11668481cee34d4bcddd1332431826959f
Reviewed-on: https://gerrit.instructure.com/24606
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
* import a content migration package through
"/courses/:course_id/content_migrations",
checking the field to "adjust events and due dates"
* manually type in dates of various formats
(e.g. "MM/DD/YYYY")
* should adjust the dates accordingly
* copy a course through the "copy this course" link
shown in "/courses/:course_id/settings"
* should adjust the dates here as well
fixes #CNVS-5771
Change-Id: Ib3c74f57ce3e351f6d3df88883b055bb8aa77101
Reviewed-on: https://gerrit.instructure.com/24246
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
* publishing through respondus should work for question banks
and for quizzes when settings are applied
fixes #CNVS-8276 #CNVS-4297
Change-Id: I3b254c6375aa5524f6ecf78c31e64d34a13ba4a7
Reviewed-on: https://gerrit.instructure.com/24566
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
fixes CNVS-8045
test plan:
* as a teacher with new conversations, navigate to new
conversations and click the compose button;
* verify that the "Bulk message" checkbox appears
below the subject line;
* attempt to send two messages to an entire class: one
with the bcc checkbox selected, and another with it
unchecked;
* as a student in the class using old conversations,
navigate to conversations and verify that you have two
messages: one group conversation with the entire class,
and one group conversation between you and the
instructor.
Change-Id: Ic3bab8ce406c565a50ca50ad19d74b949f1caad1
Reviewed-on: https://gerrit.instructure.com/24515
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>