specific forms of :template were deprecated, and you don't even
need to specify that as the option (it's the default first
argument)
Change-Id: I8db2860cdaf46b105b2f981ed3e0bd923af4ef89
Reviewed-on: https://gerrit.instructure.com/51389
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-9825
test plan:
- as a teacher, create a course discussion, with 'Enable podcast feed'
checked
- reply (still as teacher), and include a link to an uploaded mp3 file
- as a student, reply with a link to another uploaded mp3
- if 'Include student replies in podcast feed' and the student access
the podcast feed (link is on the discussion show page), it should
include both mp3s. if that options is false, it should only include
the mp3 from the teacher.
- repeat the process for a group discussion, but notice that for group
discussions, 'Include student replies in podcast feed' is not an
option.
- group discussions should always include student replies in the feed
Change-Id: I54b8b3498d0d428576b904526702814930ec9d55
Reviewed-on: https://gerrit.instructure.com/50658
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* create a course with a discussion topic
* keep it unpublished but add a student
* as a student, should not be able to
view the discussion topic through a direct link
closes #CNVS-6384
Change-Id: I0c0bc66e377d870de6c97555e25e82a8226264f4
Reviewed-on: https://gerrit.instructure.com/48278
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
in rails 3, .new is analogous to .build for collections, so otherwise
temporary records will be added to the collection (and be autosaved)
Change-Id: I08ce7b4b35ee35646aff3afd237bbe896162a014
Reviewed-on: https://gerrit.instructure.com/30334
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Change-Id: Ib1ac230cefdc984d6709893ea47278f793037369
Reviewed-on: https://gerrit.instructure.com/29963
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes CNVS-3912
test plan
- api docs should be updated and display
Change-Id: Ie6d4c80b91e3e3c8cee4b6d2e93c000f1040fd35
Reviewed-on: https://gerrit.instructure.com/25657
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
refs CNVS-7597
render :json => thing will call ActiveSupport::JSON.encode(thing) unless
thing is a String. ActiveSupport::JSON.encode(thing) just calls
thing.to_json but with some circular reference checking that we want. we
may also want enhance ActiveSupport::JSON.encode to do additional
processing, and calling to_json straight up would bypass that.
in the cases where we do need to do the structural transformation before
passing to render :json (e.g. because of need to pass arguments), use
as_json to do structural transformation only, vs. to_json that does
serialization of the as_json result.
adds a rake task to lint the controllers to enforce as_json over to_json
in render json calls.
test-plan: heavy regression testing; no end behavior should change
(except a pair of serialization bugs that got fixed)
Change-Id: I7a91a9fe0eca70456bc5bca233f0ed6b27a54aaf
Reviewed-on: https://gerrit.instructure.com/23650
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>
closes CNVS-5218
test plan: insert audio and video comments into rich text that goes
through the api (for instance assignment descriptions, and discussion
entries). modify the content multiple times, the audio and video should
still play correctly. use the api to pull the same content, modify it,
and push it back through the api. the content should still play
correctly.
Change-Id: Id38ef78aaa478c66ae2314b30d33ec3f2199a6bd
Reviewed-on: https://gerrit.instructure.com/19598
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
* Allow linking to individual endpoints on the page.
* Give each endpoint a summary string, and list the summaries at the top
of the page, with links to the endpoint details.
* Make an omnibus "all resources reference" page, which has been a
common request. This only includes the endpoint details, not the
summary descriptions of the resources.
* Syntax highlighting for JSON
test plan: visit /doc/api/index.html and see the changes (run rake
doc:api first if on a dev box)
Change-Id: Ib126805825d40770c36b3688668c62938348412d
Reviewed-on: https://gerrit.instructure.com/10516
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
named_context_url wasn't always giving back absolute urls where it needed to
for atom feeds. additionally, some atom entries did not author entries which
are needed when the main feed does not have an author entry.
test-plan:
- view a modified atom feed in the browser and make sure all links are absolute
and all entries have an author.
- if the url is externally available, run it through http://feedvalidator.org/
and check that it validates.
Change-Id: I9bc2b99cd15ed5677bfd9d2cb977a29568ae4016
Reviewed-on: https://gerrit.instructure.com/9833
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
test plan: pull a materialized view from the /view api (making sure it
was generated with this changeset), verify you get the message back
rather than the summary
Change-Id: Ifd61218d40c67f43b85ed0171f3b90f8a20dd291
Reviewed-on: https://gerrit.instructure.com/9632
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
test plan: no UI yet. update an entry, verify it gets the new message
(and updated at time). delete an entry, verify it's deleted. attempt
both as a user without permission on that entry, verify you get a 401
and the content doesn't change. also update/delete a student's entry as
a teacher.
Change-Id: I8433aa78e70b3c0597e76de1b8e1634c9f0dd27b
Reviewed-on: https://gerrit.instructure.com/9366
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
the backend for tracking read/unread state of discussion entries/topics and
unread counts for discussion topics. the strategy is to assume that an entry is
unread unless there is an an entry in the join table indicating otherwise.
interface:
- DiscussionEntry has #read_state, #read?, and #unread?. You can use these
either by passing in a user directly, or by setting the current_user
attribute on the object before calling the method (useful for json). This
should already be handled for existing controllers.
- DiscussionTopic read_state functionality as above, plus #unread_count. Same
general idea with current_user as above.
- routes are setup through the api, use PUT to mark read, DELETE to mark
unread, or rails helpers like course_discussion_topic_mark_read_path
test plan:
- click through discussion pages, and make sure they all still work (no visible
changes though, this is backend only)
- manually call some of the above methods from the console
- make sure sql for updates is reasonable
Change-Id: I655ab6a69a8cbdf1c7c99a5548b8ed0d7eadba02
Reviewed-on: https://gerrit.instructure.com/8671
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
closes#6511
we don't ever actually use or support xml responses, this is just cruft
and possible data leakage.
testplan: Hit URLs like /courses/XX/assignments/YY.xml, you should get a
406 error response or the HTML response rather than XML.
Change-Id: I0182a1dfb2bfb3ee0da896b98246a5b94604b1b2
Reviewed-on: https://gerrit.instructure.com/7245
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Discussions have an option to not allow users to see replies
until they've posted themselves. This worked correctly on the
discussion page itself, but the user would still see the
replies in their stream
This also removes that option, and the delayed posting option
from group discussion topics. These settings are useless in
that context because all users are admins and can see the
topics anyway.
Test Plan:
* create a topic in a course and check the box "Replies are not visible until after users post"
* post a reply to that topic as the teacher
* log in as a student in that course and go to your dashboard
* you should see the topic in the stream but not the response you created as a teacher
closes#4706
Change-Id: I0c50a3adb8e18ea74d209f4c9a5ac429b7faaf0e
Reviewed-on: https://gerrit.instructure.com/6684
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Teachers can specify that before students see any
messages in a topic they need to post at least once
in the topic themselves. This is used for
assignment topics or to help encourage students
to think for themselves instead of just posting
"what he said".
fixes#3871
Change-Id: I946b71ec47bfe135f06faff68598c6f19c088a27
Reviewed-on: https://gerrit.instructure.com/2370
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Each topic can now have its own podcast stream. Teachers
have to manually turn on the podcast for the topic, and
can specify whether student comments show up in the stream
or not.
fixes#3538
Change-Id: I19b1b44fc2eec864cfeb298163ef34a0b0181067
Reviewed-on: https://gerrit.instructure.com/2369
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>