fixes CNVS-7435
test plan
- have some conversations with contexts, some with tags, and some
with neither
- get them with the index and show apis
- ensure the context name appears in the result. if the
conversation had no context, the name should be a tag
Change-Id: I571be5ca7dc0ae89c79155d483934c0a8ec5a645
Reviewed-on: https://gerrit.instructure.com/23221
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
the initial implementation had an order-of-operations bug, causing most
disabled or un-named inputs to be serialized, as well as unchecked
checkboxes and radio buttons. radio buttons were also serialized as bools,
which makes absolutely no sense. these weird issues inspired little
patches (and regressions), but the the major underlying problems were
never really fixed, so here we are.
this commit resets $.serializeForm to a straight coffeescript port of
$.serializeArray (no underscore conversion), with just the things we need:
1. a canvas-friendly value mapper (for date pickers, files and tinymce)
2. support for non-forms
additionally, change (almost) every checkbox field in handlebars templates
to use the {{checkbox}} helper (so you get the hidden input right before
it, a la rails)
a notable side effect is that checkboxes are no longer serialized as
booleans, rather as "1" / "0" (or whatever the value is, per the html
spec). so now you can use checkboxes for non-bool scenarios (e.g. multiple
selection), which is nice. the big takeaway is you should *not* do truthy
checks on checkbox values in coffeescript moving forward if you use the
{{checkbox}} helper, since "0" is truthy.
test plan:
1. run specs
2. regression test of checkbox functionality in the following places:
* gradebook2 dialogs w/ checkboxes, specifically:
* group weights dialog
* curve grades dialog
* submission details
* create/edit assignment (lots of checkboxes)
* don't forget turnitin settings
* create/edit appointment group (scheduler)
* edit timeslot (scheduler)
* edit calendar event (specifically section-level dates)
* create/edit conference
* conversations (group convo / faculty journal options)
* add course users dialog (limit-to-section option)
* discussion settings dialog (index page)
* create/edit discussion topic (various options)
* notification preferences (just a couple checkboxes)
3. regression of radio button functionality in the following places:
* content migrations
* delete assignment group dialog
Change-Id: Ifa5ef3cea954ca260a899da9fa426f8f833472f8
Reviewed-on: https://gerrit.instructure.com/23096
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
fixes CNVS-7440
test plan:
- try starring and unstarring conversations with the gear menu.
make sure changes are persistent.
- make sure the state of the menu text remains consistent with
the starred state of the conversation no matter how it is
changed.
Change-Id: Id2825b43e320b0e835b7d2af89373ec5ccf718d2
Reviewed-on: https://gerrit.instructure.com/23250
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
test plan:
* add a user to a course with a login and sis id
* as a restricted user (e.g. student) in the course,
visit the 'People' page
* confirm that searching by the login or the sis id
does not return the user
fixes #CNVS-7521
Change-Id: I282e2faa424378d32115db31ccee13509ee4d080
Reviewed-on: https://gerrit.instructure.com/23262
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
* using a screenreader such as JAWS, confirm that
the "Current Jobs" section of the content migrations
page can be tabbed through and navigated
fixes #CNVS-7409
Change-Id: I3f3d86301338db141b533983b8e3905453ce5b64
Reviewed-on: https://gerrit.instructure.com/23280
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
fixes CNVS-7551
unless specifically told otherwise, write cassandra page views straight
to cassandra without putting them through the redis queue first. can
still cause them to go through redis queue by setting
'page_view_cassandra_uses_redis' to 'true'.
test-plan:
- have cassandra page views enabled and set up
- turn off delayed jobs
- navigate to some pages
- generated page views still show up
- set 'page_view_cassandra_uses_redis' setting to 'true'
- navigate to some more pages
- generated page views don't show up (yet)
- restart delayed jobs
- generated page views show up
Change-Id: I66a2991d41e18e1440e5eb68db6aa3d217577f41
Reviewed-on: https://gerrit.instructure.com/23325
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
closes CNVS-7294
test plan:
* go to your dashboard, it should show your courses in the menu
* reload, should be the same
* clear the cache, and retry, should be the same
* repeat with a user enrolled in courses on multiple shards
Change-Id: I8e1450abb289e192642b3197781a208ab5a501ec
Reviewed-on: https://gerrit.instructure.com/22938
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
test plan
- create a file in a course
- course should not show up in unused courses report
- delete the file
- course should show up in unused courses report
Change-Id: I0075fa039493192746d1201fa5e872a8b19861b4
Reviewed-on: https://gerrit.instructure.com/23273
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
the db might go away, so fork and then we don't care about errors
Change-Id: I29e8487a1c1b7f5e6b4e0b74b306625dbcbfab56
Reviewed-on: https://gerrit.instructure.com/23312
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:
- as a teacher, make a quiz with a manually graded question type
- as a student, take the quiz
- as the teacher, you should get a notification that the submission
needs grading, and the url should have the correct host in it (e.g.,
should have the correct link that takes you to the quiz correctly).
fixes CNVS-7434
Change-Id: I3b853a7d461a4fb4eecbca92141f60d44d81bc6e
Reviewed-on: https://gerrit.instructure.com/23327
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
closes CNVS-6073
test plan:
- no change on assignment index page for teachers
- students should get the page with a toggle to switch between showing by date
and by type (which means assignment group)
- the toggle should work, and persist across page refreshes
- assignments in the different date categories should make sense and be sorted
correctly (upcoming, undated, and past)
- groups that doesn't have any assignments in them shouldn't show up for
students
Change-Id: I830b3985be53506396d7414b5f79e7cbc490c39d
Reviewed-on: https://gerrit.instructure.com/22953
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
closes CNVS-7299
test plan
- create an account level outcome
- create a quiz bank and tie to outcome
- create a quiz
- as a student take the quiz
- the result should be in the outcome report
Change-Id: Ie5c9ad25266e32a204cb6f44cebbc8d46a39a032
Reviewed-on: https://gerrit.instructure.com/23243
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan:
1. enable calendar2
2. click to create a new event, or click on an existing one
3. click "More Options"
4. change the name of the event
5. save
6. it should have the name you put in
Change-Id: Ice305a14080035b4daae7dd39f206307f1487ca8
Reviewed-on: https://gerrit.instructure.com/23291
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
this broke with the backbone upgrade. toJSON now get options during save,
so this was an unreliable way to do things.
test plan:
1. enabled calendar2
2. click to create an event
3. click more options
4. enter some stuff (description, whatever)
5. it should save
Change-Id: I8dd7913701d80f2f4042829819c0df775eea57c0
Reviewed-on: https://gerrit.instructure.com/23288
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
if the same user answers the same aligned question (through a question
bank) in multiple quizzes, let each quiz's question instance get its own
learning outcome result.
fixes CNVS-1194
test-plan:
- create an account-level outcome
- create an account-level question bank
- align the outcome with the question bank
- create a question in the question bank
- create two quizzes in course(s) under the account using that question
from the bank
- have one student take both quizzes
- look at the student's generated outcome results for that outcome;
there should be two results, one per quiz.
- retake one or both quizzes; there should still only be one result per
quiz, updated with the new score.
Change-Id: I1d27fb51bbe76ebfd66b0ded8c4a579f7381d88e
Reviewed-on: https://gerrit.instructure.com/23276
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
This commit adds ember.js (http://emberjs.com)
libraries to canvas.
Ember apps can be created by
adding a directory to 'app/coffeescripts/ember',
e.g. 'app/coffeescripts/ember/inbox/'
Shared Code
-----------
'app/coffeescripts/ember/shared', contains shared
resources between ember apps.
'shared/helpers/common' is included in all ember
templates.
Tooling
-------
- Bundles will be auto-generated by file system
naming conventions, see lib/ember_bundle and its
specs for details.
- Guard will precompile templates and create the
bundle file when files are changed
- Rake tasks added for deployment `jet:ember` and
`js:bundle_ember_apps`
Change-Id: I6d4177891cb618d5dbff3c87553fbf448e91393b
Reviewed-on: https://gerrit.instructure.com/22688
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
test plan:
* create a broken content migration by starting to
upload a file (it will be easier if it is somewhat large),
and then stopping or navigating away mid-upload.
* refresh the content migrations page to confirm that
the migration is in the 'Pre-processing' state
* assuming that you would rather not wait an hour for
the time out to trigger, manually trigger it by
opening the console:
ContentMigration.where(:id => ContentMigration.last
).update_all(:updated_at => Time.now.utc - 2.hour)
* refresh the content migrations page
* should mark as failed
fixes #CNVS-7483
Change-Id: If938aec626dd3685b7d634da09ccbc55dbbaca63
Reviewed-on: https://gerrit.instructure.com/23269
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Change-Id: I4fd88488a9e9f19a6fbe924d0a53854fc249c5af
Reviewed-on: https://gerrit.instructure.com/23200
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
QA-Review: Stanley Stuart <stanley@instructure.com>
test plan:
* open the new conversations page
* focus the course filter
* verify that pressing up or down moves the selection
* verify that pressing tab closes the dropdown
* verify that screenreader behavior is clear and intuitive
Change-Id: I1498622bdccc941efcad162b6cbfa2f08855f95d
Reviewed-on: https://gerrit.instructure.com/23091
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
fixes CNVS-7438
To: field in the new message dialog now has a recipient
finder button like the one that exists in the current
conversations interface and on the new conversations search
field.
test plan:
* open the new message dialog in new conversations;
* verify that the recipient finder button is present;
* verify that the button is disabled if a course is not
selected;
* verify that selecting a course enables the button;
* verify that clicking the button displays the first five
search results for the current context.
Change-Id: I6205b0444b6b2a1f3649b6d1306d3161d513bb36
Reviewed-on: https://gerrit.instructure.com/23248
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
fixes CNVS-7385
test plan:
1) in a console:
# grab a user of your choice
u = User.find(5)
# make it seem as if they have never accepted the terms before
u.preferences[:accepted_terms] = nil
u.save!
2) log in as that user
3) verify that you are required to accept the terms of use
Change-Id: Ibc314040f35d3d7418a3b31c7280188db86a552b
Reviewed-on: https://gerrit.instructure.com/23110
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
test plan:
- Go to the quiz index page for a course (/courses/x/quizzes).
- You should be able to read the edit/delete buttons with a
screenreader as the teacher.
fixes CNVS-6528
Change-Id: Ib79cad5d3960f631527215fcd30216945211384f
Reviewed-on: https://gerrit.instructure.com/23217
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
closes CNVS-7335
Test plan:
* Test speedgrader on a normal assignment
* Test speedgrader on a group assignment that grades students
individually
(it should behave the same as speedgrader on normal assignments)
* Test speedgrader on a group assignment
* You should see groups instead of students in the drop down
* When you grade a group assignment, that grade should apply to
everyone in the group
* When you comment on the assignment, it should go to everyone in
the group
Change-Id: Ieb14a070e422f1e0404247c79e7dd45ece6ddb98
Reviewed-on: https://gerrit.instructure.com/23035
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
fixes the test because 'this' is not window thus needs to be explicitly
declared.
Change-Id: I3420f24c442cf2c35bdfb00d0009d5e010cc94e9
Reviewed-on: https://gerrit.instructure.com/23240
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
fixes CNVS-7467
test plan:
* create an announcement without a user ID (by running
DiscussionTopic.update_all('user_id = NULL', id: ID)
where 'ID' is the ID of the announcement;
* without logging in, navigate to the announcement's url;
* verify that you are asked to log in;
* make the course public and verify that the announcement
is visible without a log in.
Change-Id: I79062535da8266384bb32c43732c7f25b0036675
Reviewed-on: https://gerrit.instructure.com/23227
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
fixes CNVS-7379
test plan:
1. Log in as a student who has taken quizzes and has had assignments graded.
2. On the main and course pages, try to click on an Assignment/ Quiz link under Recent Feedback
3. The links should work without error
Change-Id: I669c057add5fc14df891608054a997b33939fd0c
Reviewed-on: https://gerrit.instructure.com/23242
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
test plan:
* editing a page (through the UI or API)
- saving changes to a page should only create revisions when body or title are changed
* editing a page as a different user
- saving non-content changes as a different user should not create a new revision
fixes CNVS-7247
Change-Id: Icbcafc8ce70f82908b3b517a9eb5ce09bd0bae09
Reviewed-on: https://gerrit.instructure.com/23178
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
fixes CNVS-7437
test plan:
* open new conversations compose dialog
* verify that subject field contains "No subject"
when starting a new message or continuing
a conversation with no subject
* verify that placeholder disappears on entry
* verify that contrast between placeholder text and
background is reasonable when input is disabled
Change-Id: I5c6b084c1691af7e782beb099212373372f7a097
Reviewed-on: https://gerrit.instructure.com/23234
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
fixes CNVS-7202
test plan:
* without the CNVS-7202 commits,
make an api request that gets logged as a page view such as
/api/v1/courses/X/discussion_topics?access_token=XXX
* then apply this commit and run the data fixup, and verify that the
data was fixed in the page views store (test with both db store and
cassandra store)
Change-Id: Id10e1ba69cd8c82797fd5b7bcf6309afa0773288
Reviewed-on: https://gerrit.instructure.com/22729
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-7439
test plan
- ensure help and gear menu item in new conversations ui are white
Change-Id: I865c691d540382145327305423d0ec6ba6a7af9d
Reviewed-on: https://gerrit.instructure.com/23235
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
fixes CNVS-7436
test plan:
* open conversations beta
* open compose dialog
* verify that spacing on Course, To, and Subject rows
match the mockup
Change-Id: I6773a1bbc8717bca394e3aea222a749a37e502e7
Reviewed-on: https://gerrit.instructure.com/23233
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
removes the confusing options, and simplifies because it has direct
access to the class members that it needs. especially, this made
it trivial to add support for preloads via includes on the scope.
Change-Id: Ia98987de8c4f2ab697781af00bce5006ff456cf3
Reviewed-on: https://gerrit.instructure.com/22669
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
refs CNVS-6755
to allow referring to the indexes directly
test-plan: [in script/console]
# should be able to refer to page view's user index
index = PageView::EventStream.user_index
# select a user with page views
user = User.find(some_user_id)
# index should be the one underlying PageView::EventStream.for_user
coll1 = index.for_key(user.global_asset_string)
coll2 = PageView::EventStream.for_user(user)
coll1.paginate(:per_page => 3) == coll2.paginate(:per_page => 3)
Change-Id: I5bc481ed1ef61543acd36f800bdcc56a6df4e554
Reviewed-on: https://gerrit.instructure.com/22930
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
refs CNVS-6755
there are times we'll want to know it for a given timestamp that's not
necessarily in an instantiated record's created_at.
test-plan:
- specs pass
- PageView::EventStream.ttl_seconds(Time.now) should give a value
Change-Id: I6a37810711bb782474e66153a3cf53ace1b55070
Reviewed-on: https://gerrit.instructure.com/22931
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
refs CNVS-6755
cleans up code a little, there will be times we need this same snippet
elsewhere
test-plan: N/A
Change-Id: Ia210165f7799b97a825eff0d91c5d3afc416012d
Reviewed-on: https://gerrit.instructure.com/22974
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
fixes CNVS-7329
test plan
- send some messages from the new ui
- ensure that users on the old and new ui can see them and that
they were sent to the right recipients
note: the new ui does not automatically refresh when sending, so
you won't see the new message
Change-Id: I98e73f845c2012bc2e5367b9363b728e9ffd902a
Reviewed-on: https://gerrit.instructure.com/23207
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>