Commit Graph

14 Commits

Author SHA1 Message Date
Brian Palmer debf149439 create discussion topic api, closes #8151
Create a discussion topic with support for most of the options -- the
only thing missing is the ability to create an assignment discussion,
that will be added to the assignment create api.

You can also create an assignment linked to the discussion at the same
time you create the discussion. I refactored the assignment api
functionality to support this.

Added a topic delete API as well.

Also fix a bug where we weren't properly validating discussion_type

test plan: hit the api and exercise the various options, such as delayed
posting and require first posting.

Change-Id: I4afdd20313b5cea3ab7b05bf1c005c9f55debe7b
Reviewed-on: https://gerrit.instructure.com/10912
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-05-23 15:54:58 -06:00
Ryan Florence 66c52d1329 added `description` to assignment creation api
Change-Id: I3986ecf0e3b2c2d57dd20150862e7ceec5090b1b
Reviewed-on: https://gerrit.instructure.com/10913
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-05-21 15:17:53 -06:00
Brian Palmer 581fe4330d api documentation updates
* 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>
2012-05-04 11:19:51 -06:00
Bracken Mosbacker 98fe5ee5c0 enable assignment properties to be locked
this creates a "plugin" that allows an account to choose
assignment properties that can be locked when a course is
copied

Test Plan:
 * enable the plugin for an account
 * create an assignment and set it to be locked on copy
 * copy the course to another course
 * as an admin of the account you should still be able to edit the assignment
 * as a non-admin teacher of the course you should not be able to edit the frozen properties

refs #7931

Change-Id: I61d5dbfdf10f8f7519f8db06449b14ef5e7b8454
Reviewed-on: https://gerrit.instructure.com/10190
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-04-27 10:41:41 -06:00
Brian Palmer 07b9baef44 return rubric points total with rubric response, fixes #7149
unfortunately the poor decision was made to return the rubric as an
array of rows, rather than an object that can hold other attributes, so
i've added a 'rubric_settings' object to the assignment response to hold
these other attributes.

test plan: make an api call for an assignment, verify the rubric
response

Change-Id: Ia7ad4c31038454eca28150e7d55ecebaa8fd7195
Reviewed-on: https://gerrit.instructure.com/9714
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Mark Suman <marks@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-03-30 16:48:20 -06:00
Brian Palmer a6f77fc35f link student names to their grades page in gradebook2
fixes #6933
refs #6809

I added html_url and grades.html_url to to enrollments response so we
can pull this onto the page. As part of this, I changed which API
gradebook2 uses for pulling the student enrollment data -- it now uses
the enrollments API, which is the way going forward. Including students
in the course sections API will probably get deprecated at some point.

As a consequence, we are now part of the way to being able to choose
whether to filter concluded enrollments.

test plan:
  * go to gradebook2, verify that clicking a student's name takes you to
    the student's individual grades page

Change-Id: I7c043fda08500a684bfeb8391da012b653a0f6cf
Reviewed-on: https://gerrit.instructure.com/8927
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-01 16:25:16 -07:00
Jon Jensen db48cddd3e uncheck group comment by default, fixes #7206
also added checkbox (and api support, etc.) to assignment submission
forms and gradebook2

test plan:
1.  create a group assignment
2.  as a student, go to submit the assignment
3.  ensure the group comment checkbox is present and unchecked on all
    submission forms (file upload, text entry, etc.)
4.  ensure that checking it sends a group comment and leaving it
    unchecked does not
5.  go to the submission details
6.  ensure that the group comment checkbox is unchecked by default
7.  as a teacher, go to the speedgrader and ensure the checkbox is
    unchecked
8.  go to the gradebook and ensure the checkbox is unchecked
9.  go to gradebook2 and ensure it is unchecked and functional (wasn't
    present before)
10. delete all comments and go to the dashboard. ensure that when you go
    to add the first comment, you have a working group comment checkbox
    (if there are existing comments on the stream item, you won't have a
    real comment form, just a link that looks like a text area)

Change-Id: I009b797c2b391c20f41f33c7c0b8afdd4b57dbd3
Reviewed-on: https://gerrit.instructure.com/8978
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-01 14:05:35 -07:00
Jacob Fugal dce431ba42 include assignment_group_id in assignment_json
lack of this field was breaking assignment groups in the assignment edit
dialog of the new calendar/scheduler. fixes #7139

test-plan:
  - create a course with two assignment groups
  - create a dated assignment in each group
  - ensure scheduler is enabled in the course's account
  - go to the calendar
  - select and then click "Edit" for each assignment; the "Assignment
    Group" drop down should have the correct group pre-selected for
    each.

Change-Id: I43da917b0ee2fba68367fa849273dafad6f760bd
Reviewed-on: https://gerrit.instructure.com/8501
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-02-04 06:38:44 -07:00
Brian Palmer cc26d1e0fe don't return description of locked assignments in the API
fixes #6510

Most of this is a refactor so that all API JSON generation goes through
an api_json method, in order to standardize stuff like permissions and
:include_root. The existing specs verify that this doesn't inadvertently
change any existing responses -- except the discussion topics responses,
which were returning the :permissions array in the json unintentionally.

The refactor fixes the locked assignment response as a side effect.

Change-Id: I287b366fe05ef6116f713fc52075aff93d5e87b6
Reviewed-on: https://gerrit.instructure.com/7262
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-12-09 11:15:33 -07:00
Zach Pendleton 51dc49ba8e can set due_at in assignments api. fixes #5805.
assignments api now accepts and returns
assignment[due_at].

Change-Id: I36c2130c833ebda358b5eee9de983747b54beaed
Reviewed-on: https://gerrit.instructure.com/6366
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-21 15:47:18 -06:00
Ryan Shaw 5456031ed6 create gradebook2
uses coffeescript, slickgrid, actual canvas APIs
reachable at /courses/x/gradebook2
does not include commenting or things external
to the grid like filtering and sorting options

Change-Id: I6967c2dbdd16f7ea4d8c1ad1995511d7c498226a
Reviewed-on: https://gerrit.instructure.com/4371
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-29 16:21:27 -06:00
Brian Palmer ea66fb1881 include needs_grading_count in assignments api json, if authorized
refs #3958

Change-Id: Ia42b08303f62912e6aceb2f07529c561a1bc3686
Reviewed-on: https://gerrit.instructure.com/2862
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-03-29 15:09:38 -06:00
Brian Palmer 8327ebac27 refactor the rest api docs, refs #3956
I removed the api_routes plugin, since the code is currently too tied to
canvas to be pulled out into a generic plugin anyway. The yardoc
templates now live in doc/templates, and I've done some major cleanup
and refactoring -- they don't have much in common with the default YARD
templates anymore, and they work much better as API documentation.

The styling is now a little bit more "canvas-like" now, too.

Change-Id: I80edd02e63d7815a292306741f2e8ea52872aae2
Reviewed-on: https://gerrit.instructure.com/2535
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-03-09 10:12:32 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00