Commit Graph

5068 Commits

Author SHA1 Message Date
Zach Pendleton bfaaed12c1 allow access to gradebook2 with :manage_grades permissions.
fixes #10556

users with :manage_grades permissions that don't have
:view_all_grades permissions should be able to view and
use the gradebook without receiving permissions errors.

test plan:
  * create a custom role that has :manage_grades permissions
    but not :view_all_grades permissions;
  * as that user, attempt to load gradebook2 and verify that
    it loads as expected.
  * smoke test other roles to ensure that they continue to
    work as expected.

Change-Id: Ifbf2c2d9352fe6429497b5c54c269c4973ba7a26
Reviewed-on: https://gerrit.instructure.com/13781
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-10-01 09:37:22 -06:00
Cody Cutrer a993ba3cbb remove default_wiki_wiki_pages relations fixes #10993
it was a has_many :through that is broken for auto-created wikis

existing specs cover all changes except /undelete page, which
is unsupported

test plan:
 * ensure user's rss feed can be opened correctly
 * ensure wiki sidebar loads and has wiki pages in it

Change-Id: I7c3f0f68641b67f602e6b412ab5a386140bb68b2
Reviewed-on: https://gerrit.instructure.com/14023
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2012-10-01 09:15:25 -06:00
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
Brian Palmer b8ea2cfd23 ability to change an Attachment's namespace
Including renaming the actual file on disk / in S3

refs #10841

test plan: from the console, call change_namespace on a root attachment,
passing in the new namespace (new_account.file_namespace normally).
verify that the file is moved in storage, and all child attachment
namespaces are updated as well.

Change-Id: If0463344c52fbd52e45047a4c0794da44d1e19b2
Reviewed-on: https://gerrit.instructure.com/13972
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-30 22:46:46 -06:00
Bryan Madsen 4eafbd7779 remove unnecessary max-height on conversation messages, fixes #11019
the max-height was set on message section of both the right and left
side of the inbox to fix an overflow bug on the left side.  The right
side was then not displaying the full conversation.

test-plan:
* send a conversation with a large message
* check message on both right and left sides of the inbox, the left side
* should not overflow, the right should display in full
* check with a large window size and a small window size

Change-Id: I0954ed1e32186e0907cf3a044ef3b30b876afa5e
Reviewed-on: https://gerrit.instructure.com/14049
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-09-29 14:07:35 -06:00
Cameron Matheson 745ccff998 submit to scribd unless a crocodoc document is present
Test plan:
  * turn off scribd submission filtering
  * upload a document to your course files
  * make sure the document is previewable in scribd

Change-Id: I3f5cc1b4971d901407a0665edeef9af40b68092b
Reviewed-on: https://gerrit.instructure.com/14044
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-09-28 21:28:00 -06:00
Shawn Meredith 182eaf86f2 update gemfile for parallelized_specs version
Change-Id: Icaffec4019cd61f99dd5ad65b1a755e02a519543
Reviewed-on: https://gerrit.instructure.com/14034
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-28 16:07:10 -06:00
Jake Sorce ddb31fda9b add data validation to assignment title when editing, fixes #9695
test plan:
  1. login as a teacher
  2. create an assignment
  3. go back into that assignment after it is created
     and edit it
  4. try to change the assignment title to be longer than
     255 characters, notice the text box stops you at 255
  5. update the assignment
  6. make sure the assignment saves with no DB errors

Change-Id: I71ac0b58cdd1a906fd62bdd7fc66ad8d28ebf41d
Reviewed-on: https://gerrit.instructure.com/14032
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-28 16:06:22 -06:00
Sterling Cobb 3b0fada705 Alphabetize files and folders
fixes #10036

This commit removes the ability to sort files and folders by
dragging and replaces it with a default of alphabetizing every
item.

Test plan:
  *Folder
    1. Go the to files page http://localhost:3000/dashboard/files
    2. Create a folder named "d_folder" then add a folder named "a_folder"
    3. Ensure "a_folder" is before "d_folder"
  *Files
    1. Go the to files page http://localhost:3000/dashboard/files
    2. Upload a file named "d_file.txt" then add a file named
"a_file.txt" (must have characters in the file"
    3. Ensure "a_file.txt" is before "d_file.txt"

Change-Id: I3776ff996e338f8aa6fc3858b59e1460b8b1cdf0
Reviewed-on: https://gerrit.instructure.com/13554
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-28 14:49:05 -06:00
Cody Cutrer 0e78c63102 don't close connections when switching to slave
test plan:
 * in script/console, do Account.count, and then
   a slaved { Account.count }; there should be two connections now
 * ActiveRecord::Base.connection_handler.clear_all_connections!;
   both connections should be gone now
 * repeat for Delayed::Job.count with a separate queue config

Change-Id: I4858221e959fb91207470b84943843687751b2ee
Reviewed-on: https://gerrit.instructure.com/13889
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-09-28 13:49:22 -06:00
Shawn Meredith 13724f141e spec: context modules intermittent failure
Change-Id: Ie374793a559488b80d06dbdd484d6113de7d3eb5
Reviewed-on: https://gerrit.instructure.com/13988
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-28 13:15:42 -06:00
Cameron Matheson 49f46a2376 fix crocodoc edit permissions
fixes #11004

Test plan:
  * open a crocodoc submission in speed grader, and/or the submission
    details page
    - you should be able to see/make annotations
  * open the same submission in the user's files area
    - you shouldn't be able to see or make annotations

Change-Id: I2755079dedd057a1db326cf4cc865ac5a36debd0
Reviewed-on: https://gerrit.instructure.com/14029
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-09-28 13:06:15 -06:00
Ryan Shaw 602f693781 clean up code in ujsLinks
clean up update code style to not use $.proxy,
like we talked about in our meeting and a couple
other minor fixes

Change-Id: I9537f7e40bc63fe17b14fac20e80111fbd48af24
Reviewed-on: https://gerrit.instructure.com/14021
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-28 11:08:57 -06:00
Cameron Matheson 6e230d1b3b don't leak crocodoc api key in attachment json
Change-Id: I7dea60d27f6b07ce50f820c616129f0d89b97517
Reviewed-on: https://gerrit.instructure.com/13987
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-28 10:55:56 -06:00
Brian Palmer 4b6189d6f3 batch up delayed message sending jobs
test plan: set some notification preferences to daily/weekly for a few
different users. after the SummaryMessageConsolidator job runs, the
messages should still get sent, and DelayedMessage.summarize jobs should
be created in batches rather than individually.

Change-Id: I81c0404ad641ef0e89e585b104c7727b16cd800a
Reviewed-on: https://gerrit.instructure.com/13775
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-09-28 10:41:37 -06:00
Jeremy Stanley 231e0842e0 respect section privs in Quiz#show and Quiz#moderate
refs #9548

test plan:
 * create a course with two sections and a quiz
 * enroll a student in each section
 * enroll a TA in one section, with privileges limited to
   that section
 * take the quiz as each student
 * log in as the TA
 * verify that the "Show Student Quiz Results" button
   does not let you see the results for the student
   outside your section
 * verify that the "Moderate This Quiz" button
   does not let you see the results for the student
   outside your section

Change-Id: I5f25f3b8272790366c9213ba4e1d58abbdfd6752
Reviewed-on: https://gerrit.instructure.com/13979
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-28 10:41:04 -06:00
Jon Jensen bbcdfdfe21 fix conversation recipient list clipping, fixes #10961
fix regression caused by #8684 where recipient/course popovers (e.g.
"3 others" link) would get clipped. move popover up a bit in the dom and
change how it gets positioned (now we clone the hidden contents).

test plan:
1. in each supported browser, go to conversations
2. if you don't already have any, create conversations with many
   recipients and many courses (so you get those links)
3. ensure the popovers work in the left-hand pane
   1. they should not get clipped
   2. they should be positioned under the link
   3. they should scroll
4. ensure the popovers work in the right-hand pane (when the conversation
   is selected)
   1. they should not get clipped
   2. they should be positioned under the link

Change-Id: Icfb3ce3686e664b13edcf1d4f6e7ef261bf360de
Reviewed-on: https://gerrit.instructure.com/14020
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-28 10:16:40 -06:00
Zach Pendleton 0dfff81712 add aria-label to dropped assignments. fixes #9253
on the student grade summary page, notify users using
screen readers of assignments that will be dropped.

test plan:
  * as a student using a screen reader, navigate to a
    course grade summary page that has dropped assignments;
  * navigate to the points column of a dropped assignment and
    verify that a notice that the assignment will not be
    considered in the final calculation is read.

Change-Id: Iad2bb9ef60bf14cfc39dbab0867592fd34a6761a
Reviewed-on: https://gerrit.instructure.com/14017
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
2012-09-28 10:16:30 -06:00
Cameron Matheson 30d3cf7c83 use crocodoc for eligible files in full_files.js
closes #10956

Test plan:
  * make a crocodocable homework submission
  * preview the file in the user file's page and make sure it opens in
    crocodoc (not google docs)

Change-Id: Ifa9557dbfba2f1253fa02b99ece20de7a7f9cd21
Reviewed-on: https://gerrit.instructure.com/14006
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-28 10:08:16 -06:00
Jon Jensen 61f348387f fix jt bug, fixes #10929
fix inline js translation helper (jt) so that it works with absolute keys

test plan:
1. change the locale for the root account
2. log out
3. follow the "forgot password" link
4. put in your email and submit
5. the green "email sent" notification that pops down should be translated

Change-Id: I3f8cf0cb3ac87823c44482bba1f4dcf1cc601c0c
Reviewed-on: https://gerrit.instructure.com/13960
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-28 09:56:55 -06:00
Jake Sorce d65c55a532 add data validation to calendar2 popup for adding an assignment
fixes #10969

test plan:
  1.Create a new course
  2.Navigate to Calendar2
  3.Double click one of the dates on the month calendar
  4.Try to add  some text that is greater than 255 characters
  5.Notice the text stops at 255 characters, click 'Submit'
  6.Notice that the assignment is created without a DB error

Change-Id: I4566e2b1756bd1984554eb35fda7094fa00ea2f4
Reviewed-on: https://gerrit.instructure.com/14014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-28 09:30:06 -06:00
Shawn Meredith 64a28a2aca gem parallelized_spec version update
Change-Id: If5a1a5b5505a2ccd3edbaa9ffb46c94c2cd80970
Reviewed-on: https://gerrit.instructure.com/14018
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2012-09-27 17:23:09 -06:00
Shawn Meredith 446636f622 updated parallelized gem
Change-Id: I0567e6bdd70bd1c71cba54cbe16aa47e3dd2955c
Reviewed-on: https://gerrit.instructure.com/14015
Tested-by: Jake Sorce <jake@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-27 16:36:39 -06:00
Jacob Fugal 88f41882ba spread weekly notifications over saturdays
notifications were happening on monday because
TimeWithZone.advance(:days => x) does nothing. move them to saturday for
real and also spread them over the Eastern-time day instead of lumping
them all at 8pm (admittedly by timezone, but that's only 4 hours for the
continental US, which is the current majority of users).

add an indicator to the notification preference page to show a rough
time block in which they can expect their weekly messages to be sent.

fixes #8296

test-plan:
  setup:
  - create two accounts the same id but on different shards (shard ids
    should not differ by a multiple of four)
  - in each a account, create a user with a communication channel; call
    them Alice and Bob.
  - create a third account on the same shard as Bob's account but with a
    different id (account ids should not differ by a multiple of four)
  - in this account create two users with a communication channel each;
    call them Charles and David.
  - for each of the four users, assign a notification to deliver to the
    user's communication channel weekly
  - on Friday, trigger the associated notifications for each user
  - on Sunday, trigger David's notification again

  expectations:
  - each user should receive the messages on saturday (Eastern-time),
    not monday
  - Alice's and Bob's emails should arrive in different "quarter days"
  - Bob's and Charle's emails should arrive in different "quarter days"
  - Charles' email and David's first email should arrive in the same
    "quarter day" but in different hours
  - David's emails should come a week apart, but in the same hour both
    times

  UI:
  - go to the notifications preference page
  - should see note at bottom indicating two hour block during which
    their weekly notifications will be sent
  - actual send time of weekly notifications should fall within that
    block

Change-Id: I97bb75762ef8c03fae99ad5499b441f7c026d2c8
Reviewed-on: https://gerrit.instructure.com/13963
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-09-27 15:24:13 -06:00
Jake Sorce 2213ff9e9b add data validation to assignment title, fixes #10898
test plan:
  1. Create a new course
  2. Create a new assignment
  3. Try to add a title to the assignment that is longer than 255 characters long
  4. Notice the input box stops at 255 characters
  5. Click 'Update', notice the assignment is saved with no DB error

Change-Id: I7e5d2374d699c25c15d13cebef2403bea3121e73
Reviewed-on: https://gerrit.instructure.com/13966
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-27 14:48:10 -06:00
Simon Williams e465cf7eb4 render correct page after joining self-signup group
fixes #10880

when joining a self-signup group, permissions were being incorrectly cached
causing a 'membership pending' page to be shown.

test plan:
- as a teacher, create a set of course groups, and allow self-signup
- as a student, join one of these groups
- it should not say 'membership pending'
- it should say 'you joined the group'

Change-Id: Ic11cdeead8db23293e64faa0dc3c803310e426cc
Reviewed-on: https://gerrit.instructure.com/13959
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-27 14:42:46 -06:00
Jake Sorce 309ed65411 add data validation to assignment group name, fixes #10900
test plan:
  1.Create a new course
  2.Create a new Assignment Group
  3.Try to enter a name for the group that is more than 250 characters long
  4.Click on the Update button
  5.Group gets saved with no DB error

Change-Id: I99074a0d8e2ed816640be9cf881d65638928d79d
Reviewed-on: https://gerrit.instructure.com/13978
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-27 14:19:16 -06:00
Shawn Meredith 718c773721 spec: intermittent announcement_spec failure
Change-Id: I8b1829adb9fc7baf6b70789ba03508a495fda071
Reviewed-on: https://gerrit.instructure.com/13984
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-27 13:20:53 -06:00
Shawn Meredith 6178d301d7 spec: people_spec intermittent failure
Change-Id: I5b48b5abb9156377f90612cad7237623ac06f05f
Reviewed-on: https://gerrit.instructure.com/13943
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-27 13:09:13 -06:00
Jon Jensen 841aed6063 fix variable hoisting issue and brittle spec
gravatar now proxies fallback urls, meaning they don't work for private
hosts/ips (e.g. dev or test). the profile pic ui tries to remove broken
images, so depending on gravatar's behavior the number of images in the
dom could vary. so we remove that check, since we don't really need it.

also fix a related issue where if one of the images is missing, the last
one in the list will get removed (variable hoisting). incidentally this
fixes a sporadic failure

test plan:
1. run specs, they should pass
2. run canvas locally
3. upload a profile pic and click "Select Image"
4. reload the page and go to edit profile pics again
5. the uploaded pic should not get removed (the broken gravatar one should)

Change-Id: I31c82a983ba6451d7abc4465e7ca345ddaa5697f
Reviewed-on: https://gerrit.instructure.com/13975
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-27 12:31:33 -06:00
Jeremy Stanley ecae448a0e deal with missing margin in view; fixes #10785
also make the spec actually test the correct view

test plan:
 * import the course in the imscc attached to #10785
 * take the quiz as a student
 * try to view the results
 * you should not get a page error

Change-Id: I7c63d884c5af96c783aed82c64409b6a6218138c
Reviewed-on: https://gerrit.instructure.com/13891
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-27 09:45:45 -06:00
Zach Pendleton 80e5d8fbc9 add more descriptive text to course people page avatars.
fixes #9188

test plan:
  * turn on voiceover or another screen reader and navigate to
    the course people page;
  * verify that the avatar link reads, "<username> profile" and
    that the user's name reads, "<username> course profile."
  * verify that the page looks/functions as expected for sighted
    users.

Change-Id: I0be0131a695a1c1715bc318c532c2ffccaff2db5
Reviewed-on: https://gerrit.instructure.com/13451
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
2012-09-26 18:20:19 -06:00
Shawn Meredith 8cd9d21c94 spec: speed_grader intermittent failure
Change-Id: Id0c2bdc624e4d891292d992a29cd4c97bbd31779
Reviewed-on: https://gerrit.instructure.com/13973
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-26 17:18:17 -06:00
Jeremy Stanley e43bdf8816 respect locks on external url items; fixes #9054
test plan:
 * create Module A with at least one item in it
   having a completion requirement other than "must view"
   (e.g., a quiz with "must score X")
 * create Module B with an external URL item in its first slot
 * configure Module A as a prerequisite of Module B
 * as a student, view the last item in Module A
 * click the Next button at bottom right
 * you should see a page explaining this content is part
   of a locked module, and listing the prerequisite(s)
   to unlock it
 * click the "view full course sequence button" to return
   to the module view
 * there should not be a green check/"viewed the item"
   next to the external url item

Change-Id: I0805f5814f033c0adbc3a54a83b7a5bcac25a97a
Reviewed-on: https://gerrit.instructure.com/13924
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-26 16:47:40 -06:00
Shawn Meredith 7ac806ecb2 spec: intermittent assignment_student_spec failure
Change-Id: I32704c0b2581c0f5fa91f59cff055e79f73c20fd
Reviewed-on: https://gerrit.instructure.com/13944
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-26 16:34:14 -06:00
Jon Jensen a59a4e7196 direct-to-s3 profile pic uploads, fixes #10578
don't proxy profile pic uploads through canvas

ensure s3_success returns the same JSON as create

fix issue with upload_only prepared uploads (success callback was not
getting the submitParam)

test plan:

1. w/ s3 storage, upload a profile pic
2. it should work
3. w/ local storage, upload a profile pic
4. it should work

Change-Id: I606ad761ea3e4a3e3023ebc199f2df06dfaaeb83
Reviewed-on: https://gerrit.instructure.com/13699
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-26 16:26:14 -06:00
Ryan Shaw 75f73d2c04 fixes: #10113, submit login form in IE by hitting enter
test plan:
in IE9 & IE8, When logging into canvas press the enter
key to submit the form instead of clicking button.
it should do same as hitting button

Change-Id: I1f394cb0dc8727301d86c8409726cd49c4168b4b
Reviewed-on: https://gerrit.instructure.com/13949
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-26 16:10:40 -06:00
Bryan Madsen 6a881a9648 spec: add student_access_spec to parallel_exclude
Change-Id: I265b9e4284997c52f63db3b3f62dd34285f8dec2
Reviewed-on: https://gerrit.instructure.com/13962
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-09-26 15:33:27 -06:00
Brian Palmer a193f8c4d9 batch up delayed jobs in some controller actions
fixes #10889

Also some new functionality in Delayed::Batch -- you can now give it a
priority, and it'll create all jobs in one batch at that priority rather than a
separate batch for each priority seen. Also, if the batch only contains
one job, it'll just enqueue that job.

test plan: No user-visible changes. The following actions
where changed and should be checked for breakage:
 - changing a grade in gradebook1/speedgrader
 - changing a grade in gradebook2
 - starting a quiz
 - submitting a quiz
 - sending a conversation message

Change-Id: I2f68eec7de1b1c4fc1ec417b8e89d69ec1c0e8ae
Reviewed-on: https://gerrit.instructure.com/13930
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-26 12:42:50 -06:00
Brian Palmer f426b505e5 optionally shuffle the candidate jobs returned before locking
This will cut down on lock contention if many jobs workers are trying to
pop at once.

Change-Id: I1cce8ef5cceb35de2b5f2e274d59b199fc68018f
Reviewed-on: https://gerrit.instructure.com/13953
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-09-26 11:40:09 -06:00
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
Jon Jensen 2c6241510f ensure translation scope works in optimized js, fixes #10456
fixes issue with js translations not working in optimized js. for reals

test plan:
1. use canvas w/ optimized js
2. switch to another language (e.g. spanish)
3. go to the web conferences page
4. click to delete a conference
5. the confirmation dialog should be translated

Change-Id: I67766d05b39a58e79e5f895f99a6157adff7b9ea
Reviewed-on: https://gerrit.instructure.com/13919
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-09-26 09:46:25 -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
Jeremy Stanley 0d22568b75 improve link handling in exports
fixes #9345
fixes #10702

test plan:
 (for #9345)
  * create a course with a file and an assignment
  * put a link to the file in the assignment description
  * make the link text also be the link to the file
    you should have something like this:
    <a href="/courses/XXX/files/YYY/download?wrap=1">/courses/XXX/files/YYY/download?wrap=1</a>
  * export the course.  the assignment export should succeed (no errors in the summary)
  * import the export, and the assignment should be there

 (for #10702)
  * create a course with two assignments, each in separate assignment groups, and a file
  * put a link to the file in the syllabus description, using the link itself as the
    link text, as above
  * export/import, and verify the assignment groups don't disappear

Change-Id: Icb0a8727a5d7f703bdf7646d98b72b2877246576
Reviewed-on: https://gerrit.instructure.com/13863
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-09-26 09:32:33 -06:00
Shawn Meredith d8244fd65b spec: rubrics intermittent thread ending
Change-Id: I57733a3b945785510d9a1ac7a12a84ecff8c301e
Reviewed-on: https://gerrit.instructure.com/13939
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-25 16:30:49 -06:00
Shawn Meredith eff3333ff1 spec: intermittent assignment_student_specs failure
Change-Id: I496fcde7aea16989a2e4cc2219df64a02ae9fca0
Reviewed-on: https://gerrit.instructure.com/13928
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-09-25 14:02:57 -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