Commit Graph

3 Commits

Author SHA1 Message Date
Jeremy Stanley 68d6268752 fix documentation errors in modules API; fixes #10687
test plan:
 * check the documentation:
   * the module position should read "1-based", not "0-based"
   * the module item position should read "1-based", not "0-based"
   * the completion_requirement should be visible to all types
     of users; the applies-only-to-students comment should apply
     only to the "completed" item inside it
 * there are no behavior changes

Change-Id: I24a60df3d79d7185349751723488d7ec8eb64e2e
Reviewed-on: https://gerrit.instructure.com/13985
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Marc LeGendre <marc@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-10-01 08:40:41 -06:00
Jeremy Stanley d7548d09df change module api field names to match convention
html_url for Canvas web links
url for API endpoints

test plan: field names should match the above convention
refs #10404

Change-Id: Idba0cd491d10cc67795a4ee7336ebe72d00f66a0
Reviewed-on: https://gerrit.instructure.com/13745
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-09-17 12:29:17 -06:00
Jeremy Stanley d511e04fee modules api, closes #10404
also modifies the discussion topic and assignment API
controllers to make sure "must_view" requirements are
fulfilled

test plan:
 * check the API documentation; ensure it looks okay
 * create a course with module items of each supported type
 * set completion criteria of each supported type
 * create another module, so you can set prerequisites
 * use the list modules API and verify its output matches
   the course and the documentation
   * as a teacher, "state" should be missing
   * as a student, "state" should be "locked", "unlocked",
     "started", or "completed"
 * use the show module API and verify the correct information
   is returned for a single module
 * use the list module items API and verify the output
   * as a teacher, the "completion_requirement" omits the
     "completed" flag
   * as a student, "completed" should be true or false,
     depending on whether the requirement was met
 * use the show module API and verify the correct information
   is returned for a single module item
 * last but not least, verify "must view" requirements can
   be fulfilled through the api_data_endpoints supplied
   for files, pages, discussions, and assignments
   * files are viewed when downloading their content
   * pages are viewed by the show action (where content
     is returned)
   * discussions are viewed when marked read via the
     mark_topic_read or mark_all_read actions
   * assignments are viewed by the show action
     (where description is returned).  they are not viewed
     if the assignment is locked and the user does not
     have access to the content yet.

Change-Id: I0cbbbc542f69215e7b396a501d4d86ff2f76c149
Reviewed-on: https://gerrit.instructure.com/13626
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-17 09:30:04 -06:00