QuizSubmission now supports a new scope "for_students" that will grab
all submissions that are:
- not a teacher preview
- not a teacher-initiated "Student View" one
- submitted by students who really are rolled in a course
Closes CNVS-13694
TEST PLAN
---- ----
- create a quiz with one question
- enter Student View via the course settings
+ take the quiz
+ get out of Student View
- visit the statistics page (or hit the API)
+ verify the attempt is not factored
- generate the CSV of Item-Analysis to verify that IA does not factor
these attempts either
- test the change with Survey quizzes - need to make sure "logged out"
users are still OK where applicable
Change-Id: Ic58569be31576734eb6e309d548a7415c07e08a7
Reviewed-on: https://gerrit.instructure.com/38174
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
test plan:
* as a student, visit /dashboard/data_exports
* should be able to export a zip file containing
all of the student's submissions
refs #CNVS-14242
Change-Id: Iaab216e7411c27fa6d259f677e40a75d3de3f5a8
Reviewed-on: https://gerrit.instructure.com/36872
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
due to rounding error, a customer's date that should have been
30 days from the new start of the course was placed at
29.999999999999996 days, which was truncated to 29, which was then
shifted back 6 days to fall on the correct day of the week.
also, announcement post delay dates were not getting shifted
at all.
test plan:
follow the scenarios in CNVS-14130 and ensure that
* announcement post delay dates are shifted
* some dates don't mysteriously end up a week earlier
than they should
fixes CNVS-14130
Change-Id: Ice5bd3be0ddee0dec2af7b740c568750dd3c4ab8
Reviewed-on: https://gerrit.instructure.com/38223
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes CNVS-14443
This reverts commit 57427343e3.
Change-Id: Ic70da7d96965d368773c2e16c2b49c59f57e5c18
Reviewed-on: https://gerrit.instructure.com/38314
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
***test plan
1. Make a POST like /accounts/1/account_notifications
2. Required Parameters:
1) account_notification[subject]
2) account_notification[start_at]
3) account_notification[end_at]
4) account_notification[message]
3. Optional Parameters:
1) account_notification[icon]
'warning' | 'information' | 'question' | 'error' | 'calendar'
note: defaults to warning
2) account_notification_roles[]
'StudentEnrollment', 'TeacherEnrollment' etc...
this defaults to all roles
4. Only account admins should be able to make the api call
5. Should not be able to create an account notification with an
end_at < start_at
closes: PS-1730
closes: PS-1872
Change-Id: Ide86722598ae4a7ab565422f2996015b48cf8910
Reviewed-on: https://gerrit.instructure.com/37477
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
fixes CNVS-14403
test plan:
- create a quiz with a due date far in the future (and no time limit)
- take the quiz as a student
- look at the grade_history api for that user
- the graded_at for the quiz assignment should be when it was submitted, not
when it was due (in other words, it should be in the recent past, not the far
future)
Change-Id: I37754b4be5238e240bbc6a9826ea9d7599c9a61f
Reviewed-on: https://gerrit.instructure.com/38154
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Fixes: CNVS-3771
Adds a peer review notification to go out after
a peer reviewer is added to the discussion. This
also resolves the issue with a notification not
being sent if a rubric is not attached.
Test-Plan:
1.) Run bundle exec rake db:migrate in the console
before doing anything else -- (This sets up your
db by using notification_types.yml to populate
notification types in the DB.)
2.) Create a graded discussion with at least 2
students
3.) Make sure both students have everything
in their notifications set to ASAP.
4.) Edit the assignment settings and select the
'Require Peer Reviews' - Choose to manually
select peer reviewers.
5.) Navigate to discussions as an admin
6.) Select the cog and go to peer reviews.
7.) Assign a peer reviewer and verify that the
notification was sent out.
Change-Id: I78212cb8043de0fcf809a9ffa56ffca327ffcacc
Reviewed-on: https://gerrit.instructure.com/36646
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
It wasn't following the rails file naming convention
fixes CNVS-14360
Test plan: imports, such as state standards imports, should work even
without class caching
Change-Id: I99ac8448844b7ac852203a5b8127d6fa35ea5f12
Reviewed-on: https://gerrit.instructure.com/38090
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-9766
test plan:
* turn on the Differentiated Assignments feature flag
* from the quiz edit page
- add a due date for some of the sections, but not all
- save (update quiz)
> the only_visible_to_overrides flag on the quiz should be true
> edit the quiz again and there should not be an
empty due date row for 'Everyone else'
- add a due date for all the sections
- update the quiz
> the only_visible_to_overrides flag should not be there
- edit the quiz so that there are only due dates
for some sections but not all
* on the normal quiz show page and
* on the new Quiz Statistics show page
> there should not be a row in the due date area
for 'Everyone else'
- turn off the DA flag and make sure the quiz show page works
with the 'New Quiz Stats page' flag and without it
- make sure the edit page works with the DA flag off as well
Change-Id: Ifb090a195ff3283d963df12ae7a9eb503f32ee86
Reviewed-on: https://gerrit.instructure.com/34085
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
closes CNVS-14174
test plan: Generate some audit events, such as login/logout and grade
changes. grep your canvas log for AUDITOR lines, which should contain
a json object with the attributes of the audit event.
Change-Id: Icbf67b94120e2e22ba656e673edc04ab30de5945
Reviewed-on: https://gerrit.instructure.com/37572
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-14137
test plan:
- In one course with DA off
- make sure that the To Turn In
section shows an assignment that is
due in 1 day and not turned in
- In one course with DA on
- make sure that a similar assignment
that a student cannot see due to
differentiated assignments doesnt
show up in that column
- NOTE: don't use the same course/user
because there is a cache that only updates
every 15 minutes
Change-Id: I6cc93b01ba41335ae0c7f6f8682b8798e0604c3e
Reviewed-on: https://gerrit.instructure.com/37020
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
Change-Id: Iaa1c085b5ec30d0e9e1d4dd698ceff935c9f604d
Reviewed-on: https://gerrit.instructure.com/37971
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs CNVS-13987
after data fixup for CNVS-13987, the audit logs will contain tombstone
records for events that had been lost/corrupted by overwrites. these
records are essentially empty outside of ids, created_ats, and the index
entries pointing at them.
these adaptations prevent these bare events from causing errors during
the API response, and also some display indication in the admin tools
UI.
test-plan:
- revert a6304f2 to reenable audit logs
- generate tombstone events (with index entries, so they get found) in
each of the three audit logs (authentication, grade change, course
change):
# user for authentication events, course for the other two
target_course = Course.find(...)
target_user = User.find(...)
streams = [
[Auditors::Authentication::Stream, :user_index, target_user],
[Auditors::GradeChange::Stream, :course_index, target_course],
[Auditors::Course::Stream, :course_index, target_course]
]
streams.each do |stream, index, target|
index = stream.send(index)
database = stream.database
id = CanvasUUID.generate
created_at = Time.now
key = index.create_key(index.bucket_for_time(created_at), target.global_id)
ordered_id = "#{created_at.to_i}/#{id.to_s[0, 8]}"
ttl_seconds = stream.ttl_seconds(created_at)
database.batch do
database.insert_record(stream.table, {stream.id_column => id}, {
'created_at' => created_at,
'event_type' => 'corrupted'
}, ttl_seconds)
database.update(index.insert_cql, key, ordered_id, id, ttl_seconds)
end
end
- query each of the audit logs for the appropriate target through the
admin tools UI. the tombstones should show up in the results with the
correct created_at and an indication that the record was
corrupted/lost
Change-Id: I690c8a5469228b7815a644010bb4b744c8ea2e9c
Reviewed-on: https://gerrit.instructure.com/37603
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
test plan:
* create an unpublished discussion topic and a
published one
* copy the course (or export/import it)
* should retain their respective states
closes #CNVS-14201
Change-Id: If7702b67701b50ce4e2a027d1d4b5ab441d86003
Reviewed-on: https://gerrit.instructure.com/37900
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>
Change-Id: Ifad2fdbaac327cdaac985a0a10afd09e7c136208
Reviewed-on: https://gerrit.instructure.com/37910
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-13848
test plan:
* create a role that only has permission to create admins
* in a subaccount, grant that role an additional permission
* in the root account, add an admin to the role
* log in as that admin
* in both the root account and the subaccount, attempt to create
an admin - it should only list your role in both cases
Change-Id: If9a2dd4952e432700c59a0d4ad5e76ffa822dd0f
Reviewed-on: https://gerrit.instructure.com/37408
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs CNVS-13848
test plan:
* create a role in a root account that has no permissions
* create a subaccount
* grant permission to add new admins to that role in the subaccount
* add an admin to that role in the root account
* log in as the admin
* he should not have permission to add admins to the root account,
but should be able to in the sub account
ALSO - general permissions regression test
specs still pass, but it's kind of a scary change to the core of
how permissions work
Change-Id: I74fd72d71e9922431e134af94da41815196a2234
Reviewed-on: https://gerrit.instructure.com/37407
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-14251
test plan
- cause a notification with an avatar to be sent (discussion,
conversation, or submission comment)
- ensure that the avatar image src attribute is an absolute url
Change-Id: I6992de1f4b83ecfdf838725a42e09feb1ca5e1c9
Reviewed-on: https://gerrit.instructure.com/37729
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
fixes CNVS-13715
test plan:
- create a student who is in one group and not another
- create an assignment only visible to each group
- grade the student for both assignments
- turn DA on
- as the student and teacher, go to the student grades page
- both of the assignments should be visible
- final grade should be correct (factoring in both)
* final grade = ungraded assignments count too
- delete one of the grades and return
- only one of the assignments should be visible
- final grade should be correct (using just one assignment)
- turn DA off
- as the student and teacher, go to the student grades page
- both assignments are visible
- final grade should factor in both assignments
- with DA on and off, ensure that the following work:
- drop rules
- never drop rules
- assignment stats (mean median etc)
- what if scores
Change-Id: I727aff943b14c91089ccffa6d3b63ba026abbeec
Reviewed-on: https://gerrit.instructure.com/36762
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
fixes CNVS-13839
test plan
- create an account
- create an admin
- delete the account
- the admin role should not show in the drop down
Change-Id: I12c3f6cc615deb0646d3b4f2af60bb191f070edc
Reviewed-on: https://gerrit.instructure.com/37076
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-13708
test plan:
- create a student who is in one section and not another
- create an assignment only visible to each section
(1 section => 1 assignment)
- grade the student for both assignments
- turn DA on
- as the student, go to the assignment index page
- both assignments should be visible initially
- delete the grades for both assignments and return
- only the overridden assignment should be visible
- only one of the assignments should be visible
- as the student, go to the grades page
- only the overridden assignment should be visible
- regrade the assignment whose grade you had deleted
- both assignments should be visible now
- (fyi: final grade wont be correct)
- turn DA off
- as the student, go to the assignment index page
- both assignments are visible
- as the student, go to the grades page
- both assignments are visible
- final grade should factor in both assignments
Change-Id: I32e3fea4d6fd3db9a512e0d170779b48418f90cf
Reviewed-on: https://gerrit.instructure.com/36728
Reviewed-by: Liz Abinante <labinante@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
fixes CNVS-13649
test plan:
- go to a few pages and make sure no errors occur
- GB2
- assignment index
- student grades page
- do same with and without DA on
Change-Id: I72f303cf54c36420a57dfbd23635f319f9827bd0
Reviewed-on: https://gerrit.instructure.com/36675
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
The scope QuizSubmission#logged_out now excludes teacher previews. This
should solve all occurrences of logged-out users mixing up with teacher
preview submissions.
Closes CNVS-7851
TEST PLAN
---- ----
- create a quiz
- preview it, submit your attempt
- click on the "Show Student Quiz Results" and verify that your
preview attempt does not show up
- create a survey quiz and verify that we still get to see the
"Logged Out User" submissions correctly
- verify we don't have any regressions on quiz stats with teacher
previews (a simple API should suffice, they're now configured to
share the same code, so it should work in both places)
Change-Id: I9803a127dd0be6975504e4fe55ccb2acea13d9af
Reviewed-on: https://gerrit.instructure.com/37622
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
fixes CNVS-13626
test plan:
* with the Differentiated Assignments feature on
* as a teacher
- navigate to a course home page
> it should load without an error
- create an assignment with an online submission
* as a student
- submit something for that assignment
* as a teacher again
- navigate to the course home page
> it should load without an error
Change-Id: I912f3898b518fff693c5252879e78135ef4d62a7
Reviewed-on: https://gerrit.instructure.com/36426
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Adds an option to Quiz that prevents the students from seeing their
results more than once after their submission.
Closes CNVS-13877
CHANGES
-------
- New option in quiz settings:
"Let Student See Their Responses" => "Only Once After Each Attempt"
- Teacher can always see the student's results
- Moderate dialog allows teacher to manually reset the result-locking
flag, allowing the student one more glimpse
- The flag is reset whenever a new attempt is taken
TEST PLAN
---- ----
- create a quiz
- toggle the new option: "Let Student See Their Responses" then "Only
Once After Each Attempt"
Turn off Ember/quiz stats:
- take the quiz by a student, turn it in:
- verify that you see your results
- reload the page
- verify that you no longer see the results
- take the quiz again:
- verify you see the results once, then not
- go to the moderate page as the teacher
- open the moderate dialog for that student
- check the new option "Let the student see the results one more
time"
- click Save
- reload the page as the student, verify that you see the
results
Turn on Ember/quiz stats:
- repeat the process
Other things to test:
- verify the new field "has_seen_results" is visible in the
submissions API and is documented
- verify the new field "one_time_results" is visible in the quizzes
API and is documented properly
- verify that the new option has no effect if the Quiz option is not
set
- verify that you can always see the student's results as a teacher
(the setting should not affect teachers)
Change-Id: I6eb4909f777e038acf6afc9ef2823352f5ea78be
Reviewed-on: https://gerrit.instructure.com/37544
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
fixes CNVS-14178
test plan
- view notification preference page
- ensure that checkbox for submission comment 'mark as read'
setting is not visible
- ensure that submission comment tooltip does not mention the
checkbox
Change-Id: Ib859aea0fcf5a4e1672e02665725ffa31d99349e
Reviewed-on: https://gerrit.instructure.com/37579
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
on postgres < 3, lock users before referencing them to
avoid a deadlock
Change-Id: I4dc13c3a0b4d925fa30cbdad4447c4d62d3f75f3
Reviewed-on: https://gerrit.instructure.com/37390
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ben Chobot <bench@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-14179
note that the in the submission comment tooltip
is being removed by a different commit
test plan
- view 'Grading' tooltip in notification preferences
- ensure that ' ' does not appear
Change-Id: Id6c571b2f6abe170a4249c729f3af5a91a8b0ba5
Reviewed-on: https://gerrit.instructure.com/37580
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
test plan:
* create a graded discussion
* using the Assignments API, try to set group_category_id
on the discussion's linked assignment
* verify that you get an error message
* using the Discussion Topics API, set a group_category_id
on the discussion
* verify that the discussion becomes a group discussion
Change-Id: Ida1bae1f370a5d5f13a5002b9cdeb40c24dba0b2
Reviewed-on: https://gerrit.instructure.com/35084
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
include namespaced models, and move two models to where
they actually belong
Change-Id: I8f5940d927e4d1fb2b05fceeca121c04d4de47d5
Reviewed-on: https://gerrit.instructure.com/37447
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>
test plan:
* create a course
* add two teachers (I'll refer to them as
"New Teacher" and "Old Teacher")
* also enroll a student
* create an assignment requiring submissions
* as the student, make a submission
* now, as the "New Teacher", comment on the submission
* remove the "Old Teacher" from the course as a teacher,
and instead add them again as a student
* confirm that the "Old Teacher"'s recent feedback does not
show the feedback for the other student
fixes #CNVS-13215
Change-Id: Ie03c9036b65c0de93c869818ebc60b059e9a4260
Reviewed-on: https://gerrit.instructure.com/37465
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CNVS-14139
test plan:
* run rails 3
* create a discussion associated with an assignment
* in the database, change the created_at for the discussion_topic
to over two weeks ago
* post multiple replies to a discussion
* it should not fail or log an error_report
Change-Id: I1e8960b7277f373c818fdcb95a37dba9933f7188
Reviewed-on: https://gerrit.instructure.com/37485
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs CNVS-13987
what was called CanvasUuid was *not* generating UUIDs. it was generating
slugs. by default, its generate method only creates 4 character slugs.
these should obviously not be used as UUIDs. the misnomer already caused
a bug in EventStream where it used these slugs as UUIDs, causing
collisions. to fix:
(1) rename canvas_uuid gem to canvas_slug, and rename it's primary
class CanvasUuid to CanvasSlug
(2) create new canvas_uuid gem, with class CanvasUUID, extracted from
lib/uuid_singleton for actual UUID generation
(3) fix event stream use CanvasUUID, rather than following the rename
of CanvasUuid to CanvasSlug
test-plan:
- have cassandra set up for audit logs
- create an audit log entry (e.g. change a grade)
- look at the generated audit log entry's id field; it should be a UUID
value, not a 4 character slug
Change-Id: I19758fff4433cd6cb2e21219217dced19ee05c5a
Reviewed-on: https://gerrit.instructure.com/37506
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
we don't want them in a transaction, and they don't work
through pgbouncer without a transaction
Change-Id: Ia1845085db6cda1d039a91588fff2cb4fd93012f
Reviewed-on: https://gerrit.instructure.com/37554
Reviewed-by: Jacob Fugal <jacob@instructure.com>
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>
test plan:
on /courses (the "view all courses" link in the menu)
1. ensure hard-concluded and soft-concluded courses show up
in the "Past Enrollments" section
2. ensure rejected enrollments show up in the "Past Enrollments"
section
3. ensure courses with no dates, or with a current date range
(either from the term, or from the course settings with
"restrict enrollment to these dates" checked) show up
in "My Courses", regardless of course published status
or acceptance of invitation
4. ensure courses whose start date is in the future (whether
via course settings or enrollment term) show up under
"Future Enrollments", regardless of published status of the course
(again, course settings only apply if the restrict-dates
setting is checked)
* Yes, students should see the names of unpublished courses
they are enrolled in, but the links should not be clickable.
This is the major complaint of the ticket; we want to
forestall "Dude, where's my course?" support questions.
5. ensure "Future Enrollments" is empty when the viewer is a student
or observer and the account settings checks "Restrict students
from viewing courses before start date"
6. ensure all three lists are sorted by course name
with invitations before active courses
(previously only the current list was sorted; the others were
in arbitrary database order)
fixes CNVS-13583
Change-Id: I49d36dd32dc04ea507d0a379a2e3491a837fd160
Reviewed-on: https://gerrit.instructure.com/37294
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
test plan:
* nothing should have changed
Change-Id: I6e7e26dfff5c3239771f4321de91b7d0f28c9845
Reviewed-on: https://gerrit.instructure.com/36487
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* navigate to /profile/observees
* add new observees (specifying usernames & passwords)
* new observees should appear in the list
notes:
- the 'Observing' tab does not appear until at least one observee has
been added for the user (and the page is refreshed)
- the observing user should gain Observer enrollments for courses the
observed user is enrolled in (both present and future)
closes CNVS-13356
Change-Id: Icda0f0d256fc73bcb554523db6436457941d8b58
Reviewed-on: https://gerrit.instructure.com/37283
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
test plan:
* create a course with external link module items,
and external tools with links pointing to a given
domain (e.g. "http://www.example.com/somewhere")
* in the rails console, manually configure the account settings
as follows, (replacing COURSEID with the id of the course):
a = Course.find(COURSEID).root_account
h1 = {"http://www.example.com" => "https://www.not-example.com"}
h2 = {:domain_substitution_map => h1}
a.settings[:default_migration_settings] = h2
a.save!
* copy the course
* the links should all be translated to the new domain
(e.g. "https://www.not-example.com")
fixes #CNVS-13512
Change-Id: I4472fec4c2633827409967cc76652e7395fb8e0f
Reviewed-on: https://gerrit.instructure.com/37356
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>
Closes CNVS-14021
TEST PLAN
---- ----
- create a quiz with a question
- try answering the quiz using the QSQ API (see docs)
- verify that your answer is recorded
Change-Id: I667671f639ac0b5c6bc469477b638e70f90f37ff
Reviewed-on: https://gerrit.instructure.com/37372
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
(also keep track of other imported items as well)
test plan:
* import a canvas export package (such as the one
referenced in the ticket) with assignments and graded
discussions
* import them into a course
* delete the assignments, etc. from the course
* re-import the package, while shifting the dates
* the re-imported (i.e. undeleted) assignments should
have their dates shifted
fixes #CNVS-13252
Change-Id: I396059cdcf58fe3386f21cc7cffe62ac8951cd05
Reviewed-on: https://gerrit.instructure.com/36743
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>
make the enrollment "active" instead of "invited", or else
User#can_masquerade? will fail because the "invited" enrollment
will not link the student view user to the course via the
courses association
test plan:
1. have a teacher in an active course who is not an account admin
2. enter student view
3. leave student view
4. conclude the course
5. enter student view again. it should work this time.
fixes CNVS-13610
Change-Id: If59683a58ae2fcd425a50eccdab8ca74ac435e07
Reviewed-on: https://gerrit.instructure.com/37215
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>
fixes CNVS-13791
with non-eagerloading, the constants might not be present, so we just
have to try to get it, instead of checking if we have it
test plan:
* in development mode, make sure cache_classes is false
* create a quiz with a fill in multiple answers question
* save it
* preview the quiz
* it should not page error
Change-Id: Iacdebd972e4b0d6f404e8f0a6a91a8adecb77ca8
Reviewed-on: https://gerrit.instructure.com/37172
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>