prevent malicious or accidental html content from getting through (e.g.
via translations or interpolated user content).
slight refactor in message.rb to make it more easily testable
test plan:
1. spot check html emails, make sure they look ok
2. ensure you can't get arbitrary html into an email, e.g.
1. change your name in canvas to "<b>ZOMG</b>"
2. send someone a message in canvasations
3. check the html email that got sent to them. your name should appear
as "<b>ZOMG</b>", and not "ZOMG" in bold text
Change-Id: Ie638a0d3d28427f25c0fa1ce89c10533802b0c6b
Reviewed-on: https://gerrit.instructure.com/19827
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-5462
test plan:
- enable 'no enrollments can create courses' at the root acount level
- create a new user with no enrollments
- they should have a 'create course' button on the dashboard
Change-Id: Ic1c272c7e949b25365141c04c65b3cff5b47a6ed
Reviewed-on: https://gerrit.instructure.com/19944
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
specifically links the visibility of the permission
:manage_frozen_assignments to whether or not
the plugin :assignment_freezer is enabled
test plan:
* enable the assignment_freezer plugin
* confirm that ""Manage (edit / delete) frozen assignments"
is shown in the list of account permissions
* disable the plugin
* confirm that the permission no longer is shown
closes #CNVS-5207
Change-Id: I4cd308531a057356bd335e134348c63b92868775
Reviewed-on: https://gerrit.instructure.com/19788
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
fixes CNVS-3187
test plan:
- make sure student show page 'submission types' heading still works
- make sure masquerading still works
Change-Id: Id177d3266b42caa7bd7b83354ec3ad400ce3ce8d
Reviewed-on: https://gerrit.instructure.com/19774
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-5427
test plan:
- in a quiz with a 'multiple fill in the blank' question
- take it with a couple users, and as one, answer incorrectly
- run quiz stats on the quiz
- it should work
Change-Id: Icaad597e6d401651bc3625bf0a5f2f75f31185fa
Reviewed-on: https://gerrit.instructure.com/19848
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
this will be based on an account setting the defaults to false until this
functionality is fully implemented
closes CNVS-1152
test plan:
- first ensure that you cannot add a file upload quiz question by default
- then, in a test account, run the following:
# where ACCOUNT_ID is the id of your root testing account
acct = Account.find(ACCOUNT_ID)
settings = { :file_upload_quiz_questions => true }
acct.save
- then go to add a quiz question again.
- file upload should be a question type.
- make sure creating the quiz works with that question type, comments work,
switching between this question type and others works, etc.
Change-Id: I9b154028290551583cd44a059a5d1c23e247bbf6
Reviewed-on: https://gerrit.instructure.com/19616
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>
back-populate submission_versions from existing versions for
submissions, and insert new index rows when new versions for submissions
are created.
refs CNVS-2802
test-plan:
migration:
- have at least two submission with at least one submission with
multiple versions in your database before introduction of this
code
- run the migration
- for every existing submission version record, there should now be
a submission_versions record
- the submission_versions records should have the correct metadata
for the submission version
trigger:
- create a new submission
- should create a new submission_versions record
- modify the submission in a way that triggers a new version
- should create a new submission_versions record
Change-Id: I9c4c39fa60926b037142abf3f01572c9deaa0643
Reviewed-on: https://gerrit.instructure.com/19605
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
SimplyVersioned plugin needs callbacks for the addition of the
submission_versions index table. Whenever a submission version is
saved, we will want to add an entry to the submission_versions table
in addition to the versions table. This patch provides hooks for
those callbacks.
Test Plan:
- Versioned anything should still work
Refs CNVS-2802
Change-Id: I02a862c5894a98ece8a586330f264680751ab52f
Reviewed-on: https://gerrit.instructure.com/19520
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
test plan:
- courses api should return 'unpublished' workflow_state for
courses in 'created' or 'claimed' state
Change-Id: I927cd6d4b66556c1d0762ad16433f69764d6a050
Reviewed-on: https://gerrit.instructure.com/19574
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
note: this currently just adds all the necessary hooks for a new question type,
and is currently disabled while the specific file upload functionality is
implemented.
closes CNVS-1150
test plan:
- should see no change with adding quiz questions, taking a quiz, or viewing
statistics
Change-Id: I3360f00055d1d0c4f9c9703d70590e888cd636d7
Reviewed-on: https://gerrit.instructure.com/19560
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes CNVS-3124
fixes CNVS-3137
fixes CNVS-3141
fixes CNVS-3155
fixes CNVS-3157
test plan:
* rubrics
- check title of rubrics index page for course/user/account
- check create/update rubric button on individual rubric page
* quizzes
- check that the right sidebar still works while taking a quiz
- check that the 'pick x question, y pts per question' works in view and edit
mode when adding a question group to a quiz.
- check that creating fill in multiple blank questions still works
* grades
- make sure the print grades button still works
- make sure the "Showing: <section" dropdown in gradebook still works
Change-Id: I14379e1b8a4a21327d3db720da0a4e128fda9524
Reviewed-on: https://gerrit.instructure.com/19695
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
fixes CNVS-4562
test plan:
- in a public course, create a practice quiz
- log out
- take the quiz
- it should work
Change-Id: I0e98d6d165622ee58ddc63896d71bad57075a3cd
Reviewed-on: https://gerrit.instructure.com/19602
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
This actually did do the stats generation in the background, but that
has been disabled temporarily since we don't have a front-end UI yet.
Test plan:
make sure you can still download quiz stats csv
closes CNVS-4887
Change-Id: Ia84af0c8392396a054ceba2f6edbcaf7c8c40c90
Reviewed-on: https://gerrit.instructure.com/19397
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
refs CNVS-4887
Test plan:
This isn't exposed anywhere in the UI yet, but if you really wanted to
test this, you could download quiz stats csv for a large course and
watch the progress attached to the quiz_statistics model increase
while the csv was being generated
Change-Id: I0f1d703df38c2525a412414ce767505a6caf157d
Reviewed-on: https://gerrit.instructure.com/19323
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
test plan:
1. go to /courses/:id/users
2. click 'add users'
3. should work much like the add users UI in
the course settings -> users tab, but look
a little different
Change-Id: Icec24a41385e595d8b79dc5a7232545f0aff926e
Reviewed-on: https://gerrit.instructure.com/18888
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
refs CNVS-4887
Test plan:
Make sure you can still download quiz statistics csv
Change-Id: I1dea60ce3465e4b536620f1dc6d515f4badf18e0
Reviewed-on: https://gerrit.instructure.com/19061
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
extracted out of canvas-lms
refs CNVS-4713
test plan:
* actions that use a slave should still work (dashboard render)
* you should be able to switch envs and users in console
Change-Id: I07dda8057cf94383bc4579f1ef6b5a4b3ffc20b5
Reviewed-on: https://gerrit.instructure.com/19287
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>
adds account setting and new user permission
fixes CNVS-4726
Testing Notes:
============
* To enable...
* Account Settings, check Feature
"Admins can view notifications"
* Account permission under "Account Roles"
becomes available under "Admin Tools"
group. Check "View notifications"
* appears under account "Admin Tools"
sidebar area on "View Notifications"
tab.
(EX: /accounts/[account_id]/admin_tools)
* Verify "View Notifications" tab does not
appear if either account setting or user
permission is disabled. (For AccountAdmins)
* Verify a SiteAdmin is able to access the
feature.
* Verify that notifications are returned
and displayed for a selected user
and date range.
* Verify it displays "No messages found"
when user doesn't exist or the user
exists but the date range doesn't
return data.
* Verify that the user_id is required when
searching
* Verify that the "To Date" cannot be before
the "From Date".
* Verify an invalid date like the word "couch"
gets ignored and the actually used date/time
is displayed in the overview text description.
* Verify searching by dates when either or both
are left blank and when both are used.
* Verify that the messages automatically
fetch more when you scroll down.
* Verify that before the results, it displays
the user's name and the dates used for the
results.
Change-Id: I9d2689b4760af57bbc2d15fd7d50610dcf593a7e
Reviewed-on: https://gerrit.instructure.com/18629
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
There are some migration systems that aren't for course
content but they still show up in the course content
migration drop-down. So with this you can flag a system
to not show up for users
Test Plan:
* On the "Import Content from Another System" page there
shouldn't be a blank option.
closes CNVS-5327
Change-Id: Icb6e7b6e84b80613bc231488cc9f6b16b6ebfe24
Reviewed-on: https://gerrit.instructure.com/19608
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
most course objects will be getting draft state implementations
soon, but we don't want to show publishing stuff until it's
implemented everywhere.
Test Plan:
* N/A
closes #CNVS-5280
Change-Id: Ie5500b35f9e912d8ae6b5845ce0a238fb9a72927
Reviewed-on: https://gerrit.instructure.com/19589
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
also add computed_current_grade to the my-courses api
Adds tests for both the computed scores on the course listings as well
as the computed scores on the users listing for the course. Also adds
API documentation.
Test Plan:
- An api call to /api/v1/courses/N/users?include[]=enrollments will
include 'grades' key with 'current_score', 'current_grade',
'final_score', and 'final_grade'
fixes CNVS-5101
Change-Id: I26e3cb069e3a9ce9a80c966017251e627a7b30d1
Reviewed-on: https://gerrit.instructure.com/19466
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-1808
test plan:
* create a new user with a unique_id that has an
apostrophe in it;
* verify that it saves correctly and that the user
can log in with it.
Change-Id: Idf46086b7ec6513eb4c2293686e4e92491e47fbc
Reviewed-on: https://gerrit.instructure.com/19564
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
also cleaned up the calendar events api specs to make them a
little less error prone
test plan:
* syllabus page:
note: please verify against published courses
* standard access (calendar events, assignments, appointment groups)
* public course (calendar events, assignments)
* public syllabus (calendar events, assignments)
* courses api:
* create w/public_syllabus
* update w/public_syllabus
* get w/include[]=public_syllabus
* calendar events api (for public courses/public syllabus courses):
* calendar events and assignments
fixes #CNVS-4811
Change-Id: I17e9f260117c031af008592a470b6e17df93c1d5
Reviewed-on: https://gerrit.instructure.com/19376
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-4626
test plan:
* create a conversation between users on two shards
* use the delete_for_all api to delete it
* it should not show up for either user anymore,
either on the dashboard or in the inbox
Change-Id: Iad779febabbc80daeeaeebc49f2fbe23ab04a975
Reviewed-on: https://gerrit.instructure.com/19459
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
There are three parts to this:
- API access for site admins and account admins. Account
admins can only see messages for their account.
- Includes start and end time parameters for basic searching
- Summary notification are gathered up per account now, so
account admins will not see a summary notification from
multiple accounts.
fixes CNVS-3695
test plan:
- Verify Admin Access:
- Have a user enrolled in two courses in separate root
accounts.
- Send the user ASAP notification from each account.
- Go to /users/:id/messages (the old interface) and verify
the messages appear there.
- As a site admin, get /api/v1/comm_messages for the user
(see documentation for the api).
- Verify that data for both messages are returned.
- Use the console to give an account admin on one of the
accounts :read_messages permissions.
- As the account admin, get /api/v1/comm_messages for the
user.
- Verify that only the message for the admin's account is
returned.
- Verify start_time and end_time parameters
- Use the console to modify the created_at field for the
user's messages
- As a site admin, get /api/v1/comm_messages for the user,
specifying various combinations of start_time and
end_time, and make sure the appropriate messages are
returned.
- Verify account based summaries
- Set the notification policies for the user to a summary
setting (daily or weekly)
- Send multiple notifications to the user from each account.
- Use the console to run the
SummaryMessageConsolidator::process function.
- View /messages for the user and verify that separate
summaries are sent for each account.
Change-Id: Ie33ec02cc2033a1cc2f1fcbe538b76792aab0e6c
Reviewed-on: https://gerrit.instructure.com/18586
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
adds migration warnings when links and other references point
to missing or unknown internal content
test plan:
* upload a content migration with missing relative links
(an example is attached in the ticket)
* import all the content
* view previous migrations for the course
(at "/courses/:id/imports/list")
* confirm that warning messages are shown
* the ui in in progress, but the warnings should
have links associated with them that point to the
content with missing links. to see them, use the
migration issues API
closes #CNVS-134
Change-Id: I1d0a9217fe0c1678968410be8b2eba5b990b8305
Reviewed-on: https://gerrit.instructure.com/19367
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Fixes #assignments_needing_submitting for the User model by expanding the range
of assignments to include assignments that have an override where the
due date is overridden and meets the date criteria.
test plan:
- as a teacher, create a new assignment with multiple due dates. Don't
select an "Everyone Else" section, but do have a due date for each
section that is within 1 week of now.
- as a student in one of the overridden sections, view your dashboard.
- the assignment should show up under the student's "todo" items on
the right side.
fixes CNVS-5088
Change-Id: Ie81beb32556006aff8707467660c67552e8b72c4
Reviewed-on: https://gerrit.instructure.com/19452
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
refs CNVS-4887
This probably should have happened anyway, but the intermediate model
will be necessary to handle attachments for the downloadable
quiz_statistics.csv
Test plan:
* make sure the quiz statistics page still works
* make sure downloading quiz statistics csv still works
Change-Id: I9562a731d171dae24329fc52782a4f9efa4cf8bd
Reviewed-on: https://gerrit.instructure.com/18977
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-4954
test plan:
- create a group discussion topic assignment
- delete the group discussion topic
- go to /courses/:id/undelete and restore the topic
- go back to the topic and verify the linked child topics were
also restored.
Change-Id: Ia01ce855ff92110c3fb6b227234a42ba8edad5bf
Reviewed-on: https://gerrit.instructure.com/19285
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
fixes CNVS-4561
removed some duplicate work
memoized a couple of methods
now bails early when there are no slots signed up for
added a couple of indices
test plan
- make sure scheduler works the same as it used to
Change-Id: I9bea3daa5706eb5dba83d8112ea2ef8229ca0e0e
Reviewed-on: https://gerrit.instructure.com/19192
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
test plan:
1. set up a new password policy via the console, e.g.
a = Account.default
a.settings[:password_policy] = {:min_length=>6, :max_sequence=>3, :max_repeats=>3, :disallow_common_passwords=>true}
a.save!
2. go to /register and sign up as a student
3. make sure the password policy is enforced, i.e.
1. confirm that the password must be at least 6 chars
2. confirm that the password cannot be a common one (e.g. football)
3. confirm that the password cannot contain a run of 4 or more chars
(e.g. abc123lol is ok, abcd1234 is not)
4. confirm that the password cannot have the same char repeated 4 or
more times (e.g. aaa000bb is ok aaaabbbb is not)
4. verify the password policy is enforced when changing your password as
an existing user (via user profile/settings)
5. verify the password policy is enforced when adding a login for a user
6. verify the password policy is enforced when resetting your password
(via forgot password on login page)
7. invite a new user into a course, and as that user verify the password
policy is enforced when you set up your account
Change-Id: Ie619fc255dc940249676bf5e510ce68eaf17441c
Reviewed-on: https://gerrit.instructure.com/19104
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jon Jensen <jon@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
All of the outbound email notifications have been updated to have
a matching HTML version of the email in order for us to send multi-
part emails. There has also been some tweaking of the other email
messages (summary, plain text, etc) with a better looking layout
fixes CNVS-4728
fixes CNVS-4795
test steps:
- generate email messages for each template and review the results
in the users message list view (/users/1/messages)
Change-Id: I1fd9cf2b134209e42c8d174f19b50963e6502f6a
Reviewed-on: https://gerrit.instructure.com/18942
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
Notes:
* On index pages, assignments and quizzes with multiple due dates
now show a summary of due dates in a tooltip when hovering over
"Multiple Due Dates"
* The tooltip shows a max of 10 dates, and if there are more, it
ends with "and # more..." showing how many dates are not shown
* The ticket requested that the "and # more..." links to the
assignment page, but that would be hard to click since leaving
the anchor link makes the hover disappear; instead the actual
"Multiple Due Dates" anchor link will link to the show page
* Tooltip appears for teachers on the following pages:
- Global assignments page
- Course assignments page
- Course quizzes page
- Course modules page
Test Plan:
* Create assignments and quizzes with multiple due dates
* Navigate to the pages above and verify that there are tooltips for
items with multiple due dates
* Verify that the section names and dates are correct for each item
* Verify that when there are more than 10 due dates, the tooltip only
shows 10 dates and ends with "and x more..." with the number of
dates not shown
fixes CNVS-2646
Change-Id: I96d12b25d6690393c942c90b8e121da6e20191e0
Reviewed-on: https://gerrit.instructure.com/18769
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
fixes CNVS-2623
test plan:
- create a course
- create a section
- use student view
- delete the empty section
- it should not give you a snarky message about you can't
delete a section with enrollments
Change-Id: Ieabf6dfa6c25eed7f637d529cd755490bde5635a
Reviewed-on: https://gerrit.instructure.com/19120
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
This commit also moves the quiz results (who has/hasn't taken a quiz or
survey) to a table with the styleguide in place.
test plan:
- As a teacher, create a quiz with an essay question.
- While the quiz is stil unpublished, go to the quiz show page. it
should look like it did before this patchset (e.g. dates visible,
you can still find the edit/manage buttons, etc)
- have some students in the course take the quiz, but make sure some
students in the course haven't taken the quiz.
- Click "Show Student Quiz Results" from the cog menu.
- The list should look good, and display students under Taken/Haven't
Taken when the list loads asynchronously.
- Try different combinations of have/haven't taken including all taken and
non taken
- Try with an anonymous survey as well.
fixes CNVS-4381
Change-Id: Ida743125abaf836da5038fc7bc5f376597f47534
Reviewed-on: https://gerrit.instructure.com/18454
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
fixes a problem where having the copy[:files] value missing
(as opposed to an empty hash) in the migration settings
would cause every attachment to be imported in
test plan:
* import a migration
* on the "choose content" screen, make sure that
none of the boxes under "Files" are checked.
* confirm that the import did not copy every file
(files that are linked to in other imported content
will be implicitly imported)
fixes #CNVS-4817
Change-Id: I53c736bdc8cf6835e4460c0a43349be1c7b04959
Reviewed-on: https://gerrit.instructure.com/19161
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
filter_parameter_logging is deprecated in 3.0 and removed in 3.1
test plan: when logging in, your password should still be filtered from
the log file in both rails 2 and rails 3
Change-Id: I697d5a4aca1a7501fe84a52c0097f8ae81074a0a
Reviewed-on: https://gerrit.instructure.com/19085
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-4223
test steps:
1. Send a message to a whole class
2. As an account level admin (not a siteadmin), masquerade as one of the
users who received the message
3. Ensure that you can see the message
4. As a different user, send a message directly to the student.
5. Masquerade as the student again and notice that you can see the
message.
Change-Id: I56e82edfd8900c3192ad9461f0844663ba05d6d4
Reviewed-on: https://gerrit.instructure.com/19014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
refs CNVS-4698
Aside from moving stuff out of stats_for_question (and into
QuizQuestion::QuestionType), this involves almost no refactoring (just
cosmetic stuff like inserting linebreaks and getting rid of silly uses
of each_with_index)
Test plan:
* make a quiz with every question type
* take the quiz with some students
* make sure the quiz statistics page looks the same with this patch
and without
Change-Id: Ibadf40f76936aeeb8fec3a82d2d9edce10586457
Reviewed-on: https://gerrit.instructure.com/18918
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
adds a root account setting :restrict_student_future_view
that restricts students from viewing a course in which they
have a future enrollment
test plan:
* invite a student into a course that is unpublished
or is set to a future date (and restricted to those
dates)
* turn the restriction setting is on
* confirm that as that student, the course does not
appear in the list of future enrollments
on the courses index
* confirm that the student cannot visit the course
directly (i.e. through /courses/1)
* confirm the opposte if the restriction is unset
fixes #CNVS-4813
Change-Id: I4352a2919514a5c0da768a7f8aa79447dd3a948c
Reviewed-on: https://gerrit.instructure.com/18958
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
fixes CNVS-4782
note that setting quotas requires the manage_storage_quotas
permission; not everybody who can create a group has the
right to set the storage quota for that group
test plan:
* view the API documentation and notice the new
'storage_quota_mb' field, which represents the group's
storage quota, in megabytes
* as an account admin,
- retrieve a group via the API; verify the storage_quota_mb
field is returned
- create a group via the API, setting storage_quota_mb;
verify the value was set properly
- update a group via the API, setting storage_quota_mb;
verify the value was set properly
* as a teacher,
- retrieve a group via the API; verify the storage_quota_mb
field is returned
- create a group via the API, setting storage_quota_mb;
verify the value was ignored (but the other values
were accepted)
- update a group via the API, setting storage_quota_mb;
verify the value was ignored (but the other values
were accepted)
Change-Id: Ia0c6c2ac2cbe85289a2e18d16589e4fe04b08a30
Reviewed-on: https://gerrit.instructure.com/18919
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
refs CNVS-4782
test plan:
- BEFORE applying database migrations, create two account
roles, one that enables "Manage account level settings",
and one that disables it.
- ... apply database migrations ...
- an account setting "Manage storage quotas" should appear
and should be enabled for roles that have "Manage account
level settings", and disabled otherwise
- ensure the following values cannot be changed
(are not editable on the web forms) if
"Manage storage quotas" permission is revoked:
in Account Settings:
- Default Course File Quota
- Default User File Quota
in Course Settings:
- File Storage
- also ensure that a user lacking this permission
cannot set a course quota via the courses API
(creating or updating a course). the value should
be ignored if the user does not have permission
to set it.
NOTE: This permission applies to accounts and courses.
There are also quotas for entire sites (for users,
course files, and media files), but these are managed
by a plugin and are not affected by this commit.
Change-Id: I4a3b0b332a5a4e74596f167360db37e2653eab70
Reviewed-on: https://gerrit.instructure.com/18887
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
creates new permission :manage_rubrics, which was
previously a subset of the rights in :manage_grades
test plan:
* confirm that a new permission for
outcomes and rubrics is available in the ui
* confirm that this permission restricts the
creation and editing of rubrics
fixes #CNVS-266
Change-Id: I40d108b53e2771890d8fdbb108e1de24364aa055
Reviewed-on: https://gerrit.instructure.com/17763
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>