Create endpoints for the results service, using new api
namespace for controllers and serializers. Also introduce
the services directory in the root of the app folder.
closes PLAT-3007
Test Plan:
- Create a line item and add some scores
- Query for the results using the result endpoint
- Should return a paginated list
- Query for a result with a user_id in mind
- Use both lti_user_id and user_id
- Should return a single result object
of the user
- Find a result by the id of the result
Change-Id: I5af4b679bcecfc0deef2876a897bc93d739057b6
Reviewed-on: https://gerrit.instructure.com/138870
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Marc Alan Phillips <mphillips@instructure.com>
we don't use ranges, enums, or domains, so don't use slow queries
to find out about them
Change-Id: I3ce8ba7cdfe3f489df393bc41ae7af775b922df7
Reviewed-on: https://gerrit.instructure.com/141536
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
test plan:
- have an assignment that accepts file uploads
- have a student with non-ASCII characters in the name
(e.g., accented or Japanese, etc.)
- submit as the student
- as the teacher, on the assignment page right sidebar,
download submissions (ensure jobs are running)
- the non-ASCII characters should not be filtered out
of the student's name in the filename
notes:
- spaces and commas and hyphens, etc., will still
be filtered out of names; this was done for
other reasons and has not changed. the difference
is we use [[:word:]] instead of \w, which includes
word-like Unicode general categories and not just
alphanumerics
- windows explorer prior to windows 8 does not
properly support unicode filenames in zip files.
there's not much we can do about this, other than to
suggest using a third-party zip program that does.
(ASCII filenames are still handled correctly)
- the student's name is not included if anonymous grading
is turned on
fixes ADMIN-770
Change-Id: I1cb06a4277ee330e02dabab1d7d7cae01d80822a
Reviewed-on: https://gerrit.instructure.com/140996
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Jenkins
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
so that the connection to the default shard catches it. also
stop using the Rails 4 location of it
Change-Id: Iec213127458d77d12b98fd9a8f02fec7f74f1cc4
Reviewed-on: https://gerrit.instructure.com/141434
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
closes PLAT-3008
Test Plan:
- Create a line item (both assignment and nonassignment)
- Create a user
- For the assignment lineitem, the submission should be
updated when FullyGraded or PendingManual is passed
with a score. This should show in the gradebook
- The nonassignment lineitem should not update the
submission even if there are scores. These
should only be found in the console
Change-Id: Ie8b65b475f00f364fb78f1d5fe4c1cdd84548472
Reviewed-on: https://gerrit.instructure.com/139469
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Marc Alan Phillips <mphillips@instructure.com>
Test plan:
* Run eslint —fix against a file that doesn’t have a copyright header
(Eg: eslint --fix app/coffeescripts/AssignmentDetailsDialog.js )
* it should add the copyright header for you
* run eslint on a file that already has a proper copyright header
* it should not duplicate it
Change-Id: I0bc05b6cc267fb74909f7a0fe0e93ecda1e2136e
Reviewed-on: https://gerrit.instructure.com/140757
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Closes PLAT-3005
Test Plan:
- Verify the line item index endpoint
returns all line items in the specified
course.
- Verify that the endpoint is paginated
- Verify the endpoint allow querying by the following
params:
* tag
* resource_id
* lti_link_id (filters line items by Lti::ResourceLink)
Change-Id: I52565f3bf8972fda0c62c4aa38c07bb44aa34ea8
Reviewed-on: https://gerrit.instructure.com/140543
Tested-by: Jenkins
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
also, allow explain to take a block, so you can run it for any query
(i.e. User.explain { something_complicated.count })
Change-Id: Ie724215ed1f1a45e7bec49a6deb960d09876bf03
Reviewed-on: https://gerrit.instructure.com/140615
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
only works for current user - user_id field is ignored
closes #ADMIN-711
Change-Id: I6f783a19bafbcd830fbab918782b1aa3591735d9
Reviewed-on: https://gerrit.instructure.com/139875
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Closes PLAT-3004
Test Plan:
CREATE
- Attempt to create a new Line Item using the create
endpont. Verify the following params are required:
- scoreMaximum
- label
- Verify a new line item is returned and properly serialized.
example:
{
"id" : <line item show/update endpoint>
"scoreMaximum" : 60,
"label" : "Chapter 5 Test",
"resourceId" : "quiz-231",
"tag" : "grade"
}
- Verify the create endpoint allows setting the
following optional params:
- resourceId
- tag
- ltiLinkId (Must be the `resource_link_id` of
an Lti::ResourceLink. This resource link must
already have one line item associated with it.)
- Verify a Line Item cannot be created for an Lti::ResourceLink
that does not already have at least one Line Item associated
with it already.
- Verify a Line Item may be created for an Lti::ResourceLink if
it already has at least one Line Item associated with it.
- Verify that creating a Line Item _without_ specifying an
`ltiLinkId` creates a line item and a new assignment specified
with the line item. The new assignment should have the following:
- context: context of the new line item
- name: label of the new line item
- point_possible: the score maximum of the new line item
- submission_types: none
UPDATE
- Verify the following attributes may be updated:
- scoreMaximum
- label
- resourceId
- tag
- Verify that the ltiLinkId may not be updated
- Verify that updating the Line Item label also
updates the assignment title in the following cases:
- when the line item has no associate Lti::ResourceLink
- when the Lti::ResourceLink associated with the Line Item
only has one line item (the one being updated)
- Verify the update response is properly serialized (see
example in CREATE).
SHOW
- Verify the show endpoint allows retrieving the Line Item.
- Verify the endpoint responds with 404 if the Line Item
does not exist.
- Verify the endpoint responds with a 404 if the Line Item
exists but is in a different course than the one specified
as a parameter.
DESTROY
- Verify the endpoint responds with 404s in the same instances
as the show endpoint.
- Verify the endpoint does not allow destroying a Line Item
when it is the first line item created chronologically
for its associate Lti::ResourceLink
- Verify the endpoint allows destroying line items.
Change-Id: Iaf26e6addd1e3fe38c5fb76db33fed41a069e7c9
Reviewed-on: https://gerrit.instructure.com/138831
Tested-by: Jenkins
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
fixes gh-1167
and set them up for the chinese variants
test plan:
* change your browser language to Chinese (Traditional)
* ensure your account and user don't override the language
(both set to System Default)
* inspect your web request, make sure the accept-language includes
zh-TW
* you should see Canvas in traditional chinese, not simplified
chinese
Change-Id: Id09e9b348c18195809b96138d081c246c080fa29
Reviewed-on: https://gerrit.instructure.com/133838
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>