Commit Graph

3240 Commits

Author SHA1 Message Date
Cameron Matheson c48019657c submit attachment to scribd if crocodoc fails to convert
fixes #10885

Test plan:
  * submit a document that crocodoc fails to convert
  * make sure the document is eventually submitted to scribd
    (this should happen in 5 minutes on beta/production or after calling
    CrocodocDocument.update_process_states)

Change-Id: I9b59182068370d65bdc694fa41a1c1cbf030be31
Reviewed-on: https://gerrit.instructure.com/13947
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-09-26 11:22:52 -06:00
Cameron Matheson 9f273c32a8 fix typo in attachment preview helper
fixes #10913

Test plan:
  * go to a student's assignment submission page (for a submission that
    can be previewed in crocodoc)
  * click the preview button and make sure that you can annotate the
    document

Change-Id: Ic1b62b4f6a626d9f1f17541e137c3381350c651a
Reviewed-on: https://gerrit.instructure.com/13946
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-26 09:42:08 -06:00
Cameron Matheson 37dc1bf451 crocodoc annotation permissions
fixes #10865

Test plan:
  * submit an assignment
  * annotate the homework as the teacher and student
  * add peer reviewers
    - peer reviewers should only see annotations they have made themselves
  * mute the assignment
    - the student now only see his own annotations

Change-Id: I07f15565f2f87786812d206bfbff0c8b2f2e8712
Reviewed-on: https://gerrit.instructure.com/13921
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-26 09:41:49 -06:00
Jon Jensen 163611f1cc Revert "update behavior of "courses" link in main navigation."
we're going to readdress this when we redo the dashboard. refs #10453

This reverts commit f24d71c6ee.

Change-Id: I5002b187aecf9a35154804564a5df463d50e073e
Reviewed-on: https://gerrit.instructure.com/13920
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
2012-09-25 09:56:07 -06:00
Jon Jensen 308bebe454 send bulk private messages in background process, fixes #7277, #8548
implement background message sending in the inbox. when sending any
message, the form now unlocks right away and a progress bar appears
at the top. you can potentially have several messages sending at once,
each with its own progress bar. determinate progress bars (i.e. for
bulk private messages) will still be on the page if you reload (assuming
they haven't finished sending).

also implement client-side form validations so that users are prompted to
put in recipients and a message

progress bar should be aria compliant. refs #9237

test plan:
1. send a new message to a single recipient
2. there should be an indeterminate progress bar as it sends, and the ui
   should be unlocked
3. send a new group message
4. see step 2.
5. send a bulk private message
6. there should be a determinate progress bar as it sends, and it should
   move with a relatively consistent velocity. the ui should be unlocked
7. send a message on an existing conversation
8. see step 2.
9. repeat steps 1-8 with attachments
10. try sending messages without a body or recipients. you should get red
    error boxes

Change-Id: I1e4641505c3e4c42f840b292d739c78cb1c2baff
Reviewed-on: https://gerrit.instructure.com/13617
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-25 09:55:36 -06:00
Jon Jensen eec220d66e better behavior for truncateText
tweak truncateText so it is more like the ruby version (though not 100%
parity). changes include:

1. no longer on the $ object
2. never exceed max (previously it would stop adding words just *after*
   max is exceeded)
3. use i18n ellipses and word separator
4. ensure the ellipses fits within max
5. truncate first word if it exceeds max (otherwise truncate on word
   boundaries)
6. remove all extraneous whitespace

test plan:
1. find question banks to add when editing a quiz
2. the titles should be intelligently truncated

Change-Id: I33e05de32bdd6320a3fd10e5295b7d13bd7906c0
Reviewed-on: https://gerrit.instructure.com/13897
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-25 09:55:21 -06:00
Jon Jensen 5c8e41b8c1 disable collections in wiki sidebar, fixes #9433
don't show collections in wiki sidebar until feature is ready

test plan:
1. create a default collection (via api or console)
2. go to a page with the wiki sidebar
3. collections should not appear

Change-Id: I73bc17a61530b8097c96bf47d55d47781217e209
Reviewed-on: https://gerrit.instructure.com/13898
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-09-24 16:47:09 -06:00
rob orton 1687c490a9 sis export report scope changes
test plan
 * existing specs should pass

Change-Id: Ia3d8869996575b3453203aa7bd4dc2ef6e3694b5
Reviewed-on: https://gerrit.instructure.com/13828
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-24 16:16:36 -06:00
Jake Sorce 63130be90a add data validation to user profile links
fixes #10876

test plan:
  1. login as a admin and go to the default account
  2. click 'Settings on the left hand nav
  3. scroll down and click 'Enable Profiles' checkbox
  4. scroll up to the top and click on the user name link
  5. click 'Edit Profile'
  6. try to add a new link with a title that is longer than 255 characters
  7. try to add a url that is longer than 255 characters
  8. the title should not let you go over 255 characters and the url
     should be able to go over 255 characters without a DB error

Change-Id: Icc73941e37365df3a64176b93a31cf9c768ffc68
Reviewed-on: https://gerrit.instructure.com/13910
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-09-24 15:38:26 -06:00
Jake Sorce 3314c3f1dc add course name and short course name data validation on course settings
fixes #10842

test plan:
  1. login as a teacher
  2. go to a course
  3. click 'Settings' on the left hand nav at the bottom
  4. click the 'Course Details' tab
  5. click 'Edit Course Details' at the bottom
  6. try to add more than 255 characters to course name
  7. try to add more than 255 characters to short name

Change-Id: I7bb3ccc35bf1db743e728cc38b2dc7d6f650fe73
Reviewed-on: https://gerrit.instructure.com/13895
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-24 13:13:31 -06:00
Sterling Cobb b443884085 Add better accessibility for quiz settings
fixes #10557

This fixes a flow issue when navigating
checkbox items. It also adds and
standardizes labels.

Test Plan:
  1. Navigate to the edit quiz page
  2. Navigate the "Quiz Settings" sidebar
     with a screen reader.
  3. Check a few checkboxes and ensure you
     can navigate and check their sub-checkboxes
  4. See that labels are named appropriatly for
     each input field type.

Change-Id: Ia9c33bcad207f3a561649a954c75d4e6e290fc10
Reviewed-on: https://gerrit.instructure.com/13792
Reviewed-by: Joe Tanner <joe@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-09-24 11:19:21 -06:00
Zach Pendleton 3da04c07f4 fix course people page in IE8. fixes #10700
was previously using native map, which isn't supported in
IE8. replaced call with underscore's _.map.

test plan:
  * load course people page in IE8;
  * verify that users load as expected and no javascript errors
    are thrown.

Change-Id: I00121bb9302899337c91c78a155cac3de30cc6da
Reviewed-on: https://gerrit.instructure.com/13817
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-09-24 10:49:23 -06:00
Cameron Matheson 4113a86886 crocodoc delayed job fixes
Makes crocodoc upload jobs low priority and puts them in their own
strand.

Change-Id: I5ee69321e72dc2efbd446896c16a8c83bf0c4c03
Reviewed-on: https://gerrit.instructure.com/13886
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-09-21 14:21:21 -06:00
Jon Jensen f9b3fc4fd5 fix icon display regression, fixes #10838
fix an issue where attachment/media comment icons in conversations were
appearing above the audience rather than on the same line (bug introduced
in #8684)

test plan:
1. go to conversations
2. send a message with an attachment or media comment
3. the icon should appear next to the audience (recipient list), rather
   than above it

Change-Id: Iea11be2f62bc80aff96fe66b075f699b459afdbc
Reviewed-on: https://gerrit.instructure.com/13874
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-21 13:06:52 -06:00
Cameron Matheson b5f566f1f6 crocodoc integration
Adds support for optionally viewing documents with Crocodoc.

closes #9865

Test plan:
  * configure the crocodoc plugin
  * add an assignment that allows file uploads
  * make a submission for that assignment with a pdf or doc or ppt
    - on the 'submission details' page, opening a preview of the
      assignment should display it in crocodoc
    - speedgrader should display the submission in crocodoc too
  * make a submission with odt or rtf
    - the submission should be displayed with scribd or google docs
  * if you disable the crocodoc plugin, submissions could continue being
    previewed in google docs or scribd

Change-Id: I7dd2547f8e2d907c98ebe894a7f1ee9d58f1e030
Reviewed-on: https://gerrit.instructure.com/13668
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-09-21 12:57:02 -06:00
Jake Sorce 40cef453e6 fix multiple data validation bugs, fixes #7020
added migration to oauth requests to allow longer
return urls

test plan user settings:
  1. login as a user
  2. click on the user name in the top right
  3. click Edit Settings button
  4. try to enter a string larger than 255 characters
     in full name, display name, and sortable name
  5. should stop text entry at 255 characters

test plan user groups:
  1. login as a teacher
  2. go into a course
  3. click 'People' on left nav
  4. click 'View User Groups' on right nav
  5. click 'Make a New Set of Groups' on right nav
  6. try to enter a group name longer than 255 characters
  7. should stop text at 255 characters

Change-Id: I9be845a611357eed6512aba73a491a3d16af0e03
Reviewed-on: https://gerrit.instructure.com/13772
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
2012-09-21 10:57:37 -06:00
Cody Cutrer 70e475c5d8 rename Shard#description to id
test plan:
 * make sure page views are still processed

Change-Id: I07ead6c075823c2021fdcc0cc1f1fddf70f695d0
Reviewed-on: https://gerrit.instructure.com/13810
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-09-21 10:48:02 -06:00
Jeremy Stanley 058d0aeb18 add user comments to error report, if present
fixes #bracken

Change-Id: I8f932ca5b9d170f1cbeade45bbf79d5bb2d50127
Reviewed-on: https://gerrit.instructure.com/13818
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-21 09:34:49 -06:00
Brian Palmer 4ef6868b9c put turnitin jobs on a n_strand
So we can control how many will run in parallel

closes #10821

test plan: submitting to turnitin should still work properly. using the
"turnitin_num_strands" Setting should allow you to control how many jobs
will run in parallel.

Change-Id: Idabe8cc042c200dd92a5bfea221ae0aa13a79d07
Reviewed-on: https://gerrit.instructure.com/13865
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-21 09:28:07 -06:00
Jake Sorce 91402aff10 add data validation to new course form, fixes #10779
test plan:
  1. log in as a teacher and click 'Create a New Course'
  2. try to enter a string longer than 255 characters into course name
  3. try to enter a string longer than 255 characters into short name
  4. validate inputs don't allow strings over 255 characters

Change-Id: I3bb4655cf351960bd7dafdf99a81eeee631f261d
Reviewed-on: https://gerrit.instructure.com/13836
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-09-20 11:19:54 -06:00
Simon Williams 85a1851c8e api: 404 on sections of deleted courses
fixes #10688

test plan:
- make a course and a section, note the id of the section
- delete the course
- try to access the section via /api/v1/sections/:id
- it should say the resource doesn't exist

Change-Id: I26f3eb3817bf92add82c08332b8b0d448bc84b6b
Reviewed-on: https://gerrit.instructure.com/13800
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-20 09:58:59 -06:00
Jeremy Stanley ef92e35c81 data fixup and validation check for bogus associated users
clean out existing non-observer enrollments with an
associated_user_id, and add a validation check preventing
these from being created in the future

refs #10652

Change-Id: Id1887789786fd09f2df64bc6432c81bbffb7e136
Reviewed-on: https://gerrit.instructure.com/13786
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-19 10:58:20 -06:00
Zach Pendleton 95fb516603 remove out-of-order <h1 /> tags, replace w/ <h2 />.
refs #10365

until we can come up with a more coherent header strategy, this
commit removes the out-of-order <h1 /> tags and opts instead for
just starting at <h2 />.

also removes the <h2 /> tags in the navigation, as they're
potentially confusing to users trying to find content via the
heading tags.

test plan:
  N/A

Change-Id: I1a1cf75feae981eba3ed4ecf0897060759ec46a0
Reviewed-on: https://gerrit.instructure.com/13599
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-09-19 09:39:47 -06:00
Zach Pendleton 15f6b914e9 improve accessibility of files page. fixes #9271
this commit marks up the file list as a tree and makes it
keyboard navigable. it also adds labels to each of the file
sections to make them easier to understand.

test plan:
  * using a screen reader, navigate to the files page and
    attempt to click a file in the tree navigation;
  * verify that it opens in the preview pane as expected;
  * do the same with a folder and verify that it displays as
    expected.

Change-Id: Icc9ad33973882f35d6aca0219a2b77e0358d3cb3
Reviewed-on: https://gerrit.instructure.com/13638
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-09-19 09:39:10 -06:00
Jeremy Stanley 4682d65d1b exclude retired CCs in NotificationPolicy.for(User)
fixes #10422

test plan:
 * set up daily or weekly notifications to an address
   for a certain notification category
 * delete that address
 * set up a different address, and set notifications
   for the same category to "never"
 * make sure the notification to the old address
   is not received

note that the old/new addresses could conceivably be the same
(they are in the ticket), but that's tricky to set up because
the UI will prefer to reactivate the old address rather than
create a new one with the same name

Change-Id: I908d37ae4d587afad38eb9332df4ab7c31f36f7a
Reviewed-on: https://gerrit.instructure.com/13778
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-09-18 16:18:31 -06:00
Zach Pendleton 432f00af4f add future enrollments to /courses. fixes #9959
when a user visits the /courses page, display all of their
future enrollments, meaning their enrollments in any published
courses with start_at dates > Time.now.

test plan:
  * create a course with a start_at date in the future and enroll
    a student;
  * as the student, accept the enrollment and visit the /courses
    page;
  * verify that the course appears under the header 'Future
    Enrollments;'
  * test courses without a start_at date and courses that are not
    published; verify that they do not appear in the future
    enrollments section.

Change-Id: Ieada1f4d7418e69e7d611516f196cb2d1b25117f
Reviewed-on: https://gerrit.instructure.com/13265
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-09-18 15:59:23 -06:00
Cody Cutrer 5675342868 fix cross-shard facebook app use fixes #9640
test plan:
 * authorize facebook from a non-default shard
 * view Canvas' facebook app from a non-default shard
 * in the event that your facebook app isn't set up correctly, you
   can test item 2 by going to /facebook?force_view=1 when you're
   already logged in. this will pretend it was logged in from
   Facebook

Change-Id: I01a76262727ad3535c95e674816309016f7e74fc
Reviewed-on: https://gerrit.instructure.com/13703
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2012-09-18 13:34:12 -06:00
Ryan Florence e67ef8966d refactored Assignment#speed_grader_json
closes #10671

it now sends only the user and submission data
needed by the speedgrader app instead of
everything

test plan:
1. speed grader should behave as it always has
2. inspect window.jsonData, look at the user and
   submission data and make sure it doesn't have
   every column

Change-Id: If2d79766756249c6f715eb8ee4334bee973ed891
Reviewed-on: https://gerrit.instructure.com/13700
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-18 13:20:53 -06:00
Brian Palmer b9f123ce09 add GA tracking to help links
closes #10610

test plan: with google analytics enabled, click the help link and verify
the event is sent to GA. also try on an account that has a custom help
link configured.

Change-Id: I26ba5b2d01437f015f447b00325e1c0e8f9c607d
Reviewed-on: https://gerrit.instructure.com/13763
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-09-18 12:08:29 -06:00
Ryan Shaw e8b4dbc6c1 allow /grades page to link to gradebook2, fixes: #9387
test plan:
as a teacher, go to /grades
click on the link for one of the courses you teach,
it should go to the gradebook you have set as default.
(specifically to test this fix, have gb2 as the default
and click it, it should go to gb2)

Change-Id: I5ef7284ba4379acd6c40801aa8d57ca5139def7a
Reviewed-on: https://gerrit.instructure.com/13706
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
2012-09-18 12:08:10 -06:00
Ryan Shaw 57e366161d make it so if you hit enter in jqUI dialog it submits form
fixes: #10247

test plan:
hit Start A New Course on dashboard
Name the course and hit enter
should do the same as hitting the submit button

Change-Id: I76a45edb723ddc33d1bd0708551e35744b1db0b7
Reviewed-on: https://gerrit.instructure.com/13650
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-09-18 12:07:55 -06:00
Jeremy Stanley 69a9090057 fix server error when non-enrolled admin comments on submission
refs #10595

test plan: try to comment on a submission to an assignment
as a site admin user who is not enrolled in the course

Change-Id: I60a5bdad6e0771fe19e74bf75cd42d86f3ffebe1
Reviewed-on: https://gerrit.instructure.com/13755
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-18 12:07:39 -06:00
Ryan Shaw a6270d2679 fix discussion reordering and allow dragging to top and bottom
fixes: #10327

test plan:
* Create at least 5 discussion topics in a course
* Go to the discussion topics page
* Drag an item in the middle of the list to the bottom
* make sure it stays where you put it
* reload page make sure the order stays
* repeat but put it on top of list
* repeat putting it in middle of list

Change-Id: Ib838a3fba7812d999c1bb8ac8f3f772933bdb92f
Reviewed-on: https://gerrit.instructure.com/13636
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
2012-09-18 12:06:42 -06:00
Ryan Shaw e7caaaa879 filter discussion search results after every key press in IE
fixes: #10342

also fixed css so it looks good in firefox and IE

the ticket also mentioned that "the x button to
clear search also does not display" but not going
to fix that, it is because IE does not have any native
special styling for input type=search.

test plan:
 * make sure that the box looks good in IE, firefox,
   and chrome.  (like this: http://cl.ly/image/1p2g0Q2L2a2w )
 * make sure results are filtered after you press a
   a key in in IE

Change-Id: I690fa5a06b1cbd0e7195070e7ef0109094742ac2
Reviewed-on: https://gerrit.instructure.com/13635
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-09-18 12:06:34 -06:00
Cameron Matheson cd4035af8c add account setting to only allow calendar2
closes #10292

Test plan:
  1) enable calendar2 on an account
  2) set up a user to prefer the old calendar
  3) set the 'calendar2_only' setting to true on the account
  4) go to the calendar as the user from step 2, you should be
     redirected to calendar2
     * there should be no way to get to the old calendar

Change-Id: I6280caf2878d04ef3f73efdbc61187906aeb5113
Reviewed-on: https://gerrit.instructure.com/13756
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
2012-09-18 10:06:24 -06:00
Jon Jensen 9e27b56740 eportfolio direct-to-s3 upload, fixes #10572
don't proxy uploads through canvas

also fix ui so that file picker goes away after saving

test plan:
1. w/ s3 file store, edit an eportfolio
2. add a file/image
3. it should work
4. repeat steps 1-3 for local file store
5. edit an eportfolio
6. add a file from your existing user files
7. it should work

Change-Id: I1518e06dec495180371eef75af2e6659d49d36b1
Reviewed-on: https://gerrit.instructure.com/13692
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-18 10:02:12 -06:00
Cody Cutrer 718efb5748 validate ldap filter in search test
test plan:
 * enter valid ldap settings, except for filter
 * test them, but don't put in a username and password
 * you should get an error about invalid filter syntax

Change-Id: I61339085cbd902ba6e1234a098181db32cd42385
Reviewed-on: https://gerrit.instructure.com/13754
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-18 09:35:18 -06:00
Bryan Madsen c835ccd39a revert several grade calculation changes
Revert "make grade_summary page use GradeCalculator"

This reverts commit 4776cb2880.

Revert "fix gradebook bug in ie8"

This reverts commit c927237458.

Revert "gb2: don't lie about which assignments are dropped"

This reverts commit da37933079.

Revert "fix ruby calculation of grades (grade-dropping)"

This reverts commit 63f75597a2.

Revert "fix grade-dropping in gradebooks"

This reverts commit 4a4a2f53c1.

Conflicts:

	spec/selenium/grading_standards_spec.rb

Change-Id: I597d777fee23c4dc57bb915c6cbe5185dc18d0af
Reviewed-on: https://gerrit.instructure.com/13716
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-09-18 09:20:51 -06:00
Ryan Florence 6d2d60b3f1 renamed View::filter to View::afterRender
Change-Id: If7a19ad055966f2147c173b02ea9011fc4741ee9
Reviewed-on: https://gerrit.instructure.com/13730
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-09-17 22:48:58 -06:00
Cody Cutrer 6971f585bf log account with LDAP errors, and show it in error_reports
test plan:
 * set up an LDAP config with invalid filter syntax
 * try to log in with a user that exists
 * go to /error_reports; you should see the error, report, and it
   should have a link to the account

Change-Id: I2d89befbfeb4672fc6fdcb5653b16bd5f04fd795
Reviewed-on: https://gerrit.instructure.com/13761
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-09-17 15:51:15 -06:00
Zach Pendleton 12a8ab05aa focus course wizards when they first display. fixes #10381
when a link is clicked to display a course wizard, move focus
to the wizard to accommodate users using screen readers.

test plan:
  * using voiceover or another screen reader, navigate to the
    assignments page;
  * click the "How Do I...?" link in the right sidebar and verify
    that focus is assigned to the wizard popup box.
  * click the close link in the wizard and verify that focus is
    returned to the "How Do I...?" link.

Change-Id: Ie3b09e2fc43439f6c09c87694a6f6150a62f9982
Reviewed-on: https://gerrit.instructure.com/13474
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-09-17 14:13:55 -06:00
Zach Pendleton cd354def0d scope column headers in student grade table. fixes #9195
add scope="col" to the headers on the student grades table to
improve navigation for users with screen readers.

test plan:
  * as a student, navigate to the grades page of a course;
  * view source and verify that scope="col" is present on table
    headers.

Change-Id: I2c9e0d1a1036b1129211a1b4c4d0dd34a3fa82ec
Reviewed-on: https://gerrit.instructure.com/13465
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-09-17 14:13:48 -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
Cody Cutrer db03c19de6 Rails.cache.fetch takes :expires, not :expires_in
Change-Id: I9e6c215503b5b17a3cb9db694bcae64c912ed374
Reviewed-on: https://gerrit.instructure.com/13744
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-09-17 10:05:12 -06:00
Simon Williams 96ebee6dcc api: maintain query parameters in pagination links
fixes #10491

test plan:
- make an api call to a paginated endpoint that has a query parameter as part
  of the call (courses/<id>/users with enrollment_type=student is a good one)
- the pagination link header links that come back should maintain the query
  parameter (in the example above, they would include enrollment_type=student)
- also try one that has an "include[]=" type parameter
- read the api pagination documentation (linked from the api sidebar) and make
  sure it makes sense.

Change-Id: I6c1649513553bb2ac9c1cfc137ff16c21e50a6a3
Reviewed-on: https://gerrit.instructure.com/13641
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-09-17 09:40:06 -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
Brian Palmer 82abd4754d make the slave read block on public_feed smaller
This avoids issues with get_all_pertinent_contexts, which may want to do
writes, for example in the case where a course has no assignment groups
yet.

refs #9647

test plan: with a slave configured for reading, enroll yourself in a
course that has no assignment groups (maybe created via SIS) and get
your user calendar .ics feed. you shouldn't get an error.

Change-Id: I05fb543d4d1b0e2a9018f72e347119c920f74a2b
Reviewed-on: https://gerrit.instructure.com/13741
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-09-17 09:09:33 -06:00
rob orton 41c3b5089d add hide_final_grades to course api closes #10575
test plan
 * hide final grades in a course
 * the should be shown in the get course api
 * create a course with hide final grades set to
   true through the api
 * update the hide final grades through the api
 * all api calls should reflect course UI setting

Change-Id: Iebd4c42ebb7c8f11285c5c85d1749348331fa8f8
Reviewed-on: https://gerrit.instructure.com/13685
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-09-16 19:24:56 -06:00
Cody Cutrer db969be605 fix login assertions for ldap-with-attribute and sis pseudonyms
test plan:
 * configure LDAP to look up pseudonym by a specific attribute
 * log in with an SIS pseudonym
 * it should not give a page error when logging in

Change-Id: Id031760ebcf1a34720bfc6d2c2cd2dca7bf5a9ef
Reviewed-on: https://gerrit.instructure.com/13736
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-14 23:50:45 -06:00
Ryan Florence 9d55779b38 refactored PaginatedCollection
- can fetch page: next, prev, first, last, bottom,
  or top page
- can listen to 'fetch', 'fetch:next', etc.
- can listen to 'beforeFetch', 'beforeFetch:next'
  etc.

Change-Id: I6f6a97fae6e2337d42e4c5e6e2d60c3cceea8dc4
Reviewed-on: https://gerrit.instructure.com/13644
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-14 16:00:42 -06:00