Commit Graph

2890 Commits

Author SHA1 Message Date
Brian Palmer 6dd5a15064 don't fail restarting delayed jobs if the pid file is orphaned
previously, delayed_job restart/stop would fail if the pid file was
there, but the process didn't exist

test plan: start delayed jobs, then kill -9 the pool. then try
restarting delayed jobs, it'll still be successful.

Change-Id: Iaedbdc6c0381a6f79ab488eefd19344645e3e2df
Reviewed-on: https://gerrit.instructure.com/8266
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-02-01 14:01:43 -07:00
Brian Palmer 51f1d9273b allow overriding periodic jobs schedules
using a new config/periodic_jobs.yml file

test plan: edit config/periodic_jobs.yml, and verify that the overridden
jobs run at that new schedule. add an invalid override, and verify that
`script/delayed_job run` dies immediately.

closes #6875

Change-Id: Ia4611fb6f81fe82feda784300a3adf82e37a53e4
Reviewed-on: https://gerrit.instructure.com/8262
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-02-01 14:01:28 -07:00
Brian Palmer f436c8f0d4 add indexes that weren't created because of too-long names
also add some code to AR to raise an exception if this happens again,
rather than just log a warning to the log file.

testplan (for all 3 supported dbs):
  * run all the migrations on a new db
    * no error, and check that the indexes in the new migration exist
  * run the new migration on a db that is up to date
    * before running, verify that the indexes in the new migration don't yet exist due to this problem
    * no error, and check that the indexes in the new migration exist

Change-Id: Iaf7ebb31763bf7e5848c26d0daf179a0b31c6625
Reviewed-on: https://gerrit.instructure.com/7162
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-02-01 14:00:31 -07:00
Simon Williams a737df9866 allow ignoring learning outcomes for grading; fixes #5271
when you add a learning outcome to a rubric, you can optionally choose to
ignore it when grading. this commit ensures that point totals acutally ignore
the line consistently across the varios places they are displayed, including
when creating the rubric, when grading from the speed grader, and when grading
from the assignment submission page.

test plan:
- create a learning outcome
- create an assignment with a rubric for grading
- make sure the rubric has at least one normal criterion for grading
- include the learning outcome, and choose ignore for grading
- make sure point totals are consistent in the rubric form
- grade the assignment with the speed_grader, make sure point totals are
  consistent.
- modify the grade at /courses/c.id/assignments/a.id/submissions/user.id and
  make sure point totals are still constistant.

Change-Id: I454d73897ee5d4e6413b7c653ffafa1c4ac98e2e
Reviewed-on: https://gerrit.instructure.com/8263
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-02-01 13:54:07 -07:00
Cody Cutrer bc48b1ef34 normalize user_id out of notification_policies
fixes #6585, #7096

by normalizing, it's impossible to not maintain a column that isn't
there (yes, triple negative is intended in that sentence), thus
preventing sending notifications to the wrong user after a merge
or any other bugs that would have missing maintaining the
denormalization.

test plan:
 * test notifications in general
 * merge two active users together - their notification preferences
   should survive the merge

Change-Id: I239d810c5499b94550b65128cac71c42cedd11ba
Reviewed-on: https://gerrit.instructure.com/8013
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-02-01 12:42:23 -07:00
Jake Sorce 9096efcf94 fixed multiple selenium files to work with postgres
Change-Id: I11b7d5590ec83257645c5fc469b5dba6e60d29df
Reviewed-on: https://gerrit.instructure.com/8384
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-02-01 10:01:36 -07:00
Jake Sorce e1d734f7b0 fix for intermittently failing selenium specs
Change-Id: I577827ce1252e52e808984673c227d239cf0f298
Reviewed-on: https://gerrit.instructure.com/8407
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-02-01 10:01:26 -07:00
Zach Pendleton 519427119f fix messaging for group assignment submissions. fixes #6178
when user submits a group assignment that is graded individually,
he/she no longer receives messaging about their submission counting
for all members of the group.

test plan:
  * create a group assignment and select 'Assign grades to each
    student individually;'
  * login as a student in the group;
  * open the assignment submission page and verify that no message
    is present.

Change-Id: I83eca7a8ab211f58868f0f7c6c97e91b039f4d69
Reviewed-on: https://gerrit.instructure.com/8380
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-02-01 09:33:03 -07:00
Brian Palmer 1d533ef154 don't wait on media object processing when importing a course
Just fire off the kaltura upload jobs in the background, so that the
import can continue. Attachments in the special media_objects export
folder will still be deleted when those uploads complete.

Note we still wait for canvas common cartidge imports, since we need the
completed media object imports in order to translate the rich text
content. We plan to address this limitation later.

test plan:

 * do a course import from a source other than canvas CC, verify that
   the import finishes without waiting on Kaltura.
 * do a course import from a canvas CC package with
   some audio/video. Verify that the import finishes after waiting on
   kaltura, but the attachments in /media_objects are removed as the
   kaltura jobs complete.

fixes #5383

Change-Id: I7dbf12c211fc332fe9d4f16bc4d31fd0656c1941
Reviewed-on: https://gerrit.instructure.com/8031
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-02-01 09:05:23 -07:00
Cody Cutrer b6300298d2 don't duplicate enrollments on sis import if all enrollments are deleted
test plan:
 * import the same deleted enrollment several times; only one should be
   in the db

Change-Id: If067578fc1b42e501e4c43243f9745654b633701
Reviewed-on: https://gerrit.instructure.com/8417
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-31 22:28:59 -07:00
Zach Pendleton 1ba6e37fe0 add pseudonym update api. fixes #6866.
affects: pseudonym/login api
test plan:
  * send request as authorized user and verify that
    pseudonym is updated;
  * send request as unauthorized user and verify that
    request is rejected with 401;
  * attempt to set a protected attribute like password_salt
    and verify that 400 is returned;
  * attempt to change your own pseudonym and verify that it's
    allowed.

Change-Id: I83562ddd6dbf83c47bcc1adadfda9f9e1a4867da
Reviewed-on: https://gerrit.instructure.com/8233
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-31 16:35:34 -07:00
Jake Sorce da0858ae68 changed selenium implicit wait time to 3 from 10
Change-Id: I0509424fb1dfd2c73eb11164470c5eb711ea6907
Reviewed-on: https://gerrit.instructure.com/8394
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-01-31 15:46:58 -07:00
Bracken Mosbacker 355dbf97d9 find relative pathed files when translating links on assessment questions
sometimes urls to files/images have relative urls instead of
the id of a file. Those should also be attempted to be
translated.

Test Plan:
 * Make an assessment question with both types of urls
 * run translate links on that question
 * The urls should be happy when done

refs #6951

Change-Id: I9d4a526357871ac8ea7e1018df6c39f0dda95060
Reviewed-on: https://gerrit.instructure.com/8196
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-31 12:13:07 -07:00
Cody Cutrer ed73654089 allow observers to see the observed quiz submissions fixes #6300
test plan:
 * enroll a student, and link an observer
 * as the student, take a quiz
 * as the observer, go to the grade summary page
 * click the quiz
 * you should see the quiz results for the student

Change-Id: Id0bfa2e0c1c0c7f0ce9f21095781251be47d2847
Reviewed-on: https://gerrit.instructure.com/8392
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-01-31 12:03:43 -07:00
Ryan Florence 574a56f0ea show correct context in "coming up" list fixes #6333
was using a cached @context, so the first person
who viewed the assignment was the context

Change-Id: I35fe55040d00ee6cc7375e3e830fd38316b4e6f0
Reviewed-on: https://gerrit.instructure.com/8314
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-01-31 10:38:00 -07:00
Bracken Mosbacker 27f4d24c75 allow importing of multiple module links to same external tool
The importer was incorrectly using the external tool's
migration id as the content tags migration id. This made
it so that links to the same tool just updated the first
tag instead of creating a new one.

Test Plan:
 * Create an external tool
 * Link two module items to it on the modules page
 * Export that course and import it into a different course
 * The imported module should have both items and not just the second one

refs #7017

Change-Id: Iba377b9085607e3503f7f0113a4b9720bf8f0305
Reviewed-on: https://gerrit.instructure.com/8290
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-31 10:19:48 -07:00
Zach Pendleton 8521d0226a add user update api. fixes #6863
affects: users api
test plan:
  * as account admin, send request to update
    user's name, short name, sortable name,
    and time zone and verify that changes are
    made and user json is returned;
  * as unauthorized user, send same request and
    verify that 401 is returned.

Change-Id: I3ede1b0ae62143c47a564a709fade9259a07543e
Reviewed-on: https://gerrit.instructure.com/8027
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-31 09:33:36 -07:00
Bryan Madsen fe98679dcc update parallel_tests-instructure to 0.6.18
there was a bug when logging failures

Change-Id: I6672e5b5157268d2f7ddf2df042bf3877e6840eb
Reviewed-on: https://gerrit.instructure.com/8378
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-01-30 15:18:40 -07:00
Jake Sorce 4e24561540 more selenium file cleanup
Change-Id: I3e805f804e710ac8674bde7474e5463e33cc37d6
Reviewed-on: https://gerrit.instructure.com/8202
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-01-30 15:18:33 -07:00
Jacob Fugal cf67f3f239 delay MediaObject creation from uploaded files
in some S3 regions uploads are only eventually consistent. this means a
file may not be immediately available for reading after we've finished
uploading it. when an appropriate Attachment is created,
MediaObject.add_media_files is called to tell Kaltura to try and
download the file from S3; given the eventual consistency this download
could fail. so we'll delay the add_media_files call by a configurable
amount to give S3 time to settle. fixes #6787

test-plan:
  - need delayed jobs running
  - record media to kaltura (e.g. discussions); should still work
  - set attachment_build_media_object_delay_seconds to something large,
    such as 300 (5 minutes).
  - record media to kaltura; new media should not be available for 5
    minutes, but should be available shortly after the 5 minutes expire

Change-Id: Ie39a4a32c9819dcd577fb84c3a1e6df60b2b3da0
Reviewed-on: https://gerrit.instructure.com/8298
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-30 13:24:17 -07:00
Jacob Fugal 94eb14e109 fix up adding logins through the UI
api actions use params[:user][:id] and an Account @context, non-api
actions use params[:user_id] and and either params[:account_id] or the
@domain_root_account. correctly handle both paths.

while we're at it, when the API call was added, the json response
changed (lost the pseudonym[] wrapper) and the javascript broke. fix
that, and fix the html so the javascript can correctly populate the
template.

test-plan:
  - log in as a site admin
    - add a login to a user with a non-default account selected in the
      dropdown; the login should be created in the correct account
  - log in as a non-site admin account admin
    - add a login to a user (no account dropdown); the login should be
      created in the current domain root account
  - while adding accounts through the UI, observe proper addition of new
    login to the logins list
  - through the API, add a login to a user via a root account; should
    succeed
  - through the API, add a login to a user via a non-root account should
    fail with a 400 Bad Request
  - through the API, attempt to add a login without specifying any
    parameters; should return a 404, not a 500
  - through the API, attempt to list logins without specifying any
    parameters; should return a 404, not a 500

Change-Id: Ic28e73a992916b81a18b40244bbb6d919cccf858
Reviewed-on: https://gerrit.instructure.com/8269
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-01-30 13:23:48 -07:00
Bryan Madsen 990e4906a1 use parallel_tests-instructure and remove custom loggers
Change-Id: Id71849f40ae94fa073d235e178a5497284a8e3ed
Reviewed-on: https://gerrit.instructure.com/8362
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-30 11:14:50 -07:00
John Harrison 4c3602cf9d updated stats lib to include quartiles method
Change-Id: Ie949feca3066ef639959a49ced57e6ddcb46a6fa
Reviewed-on: https://gerrit.instructure.com/8159
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-01-27 12:17:35 -07:00
Cameron Matheson 1b42bcd1f5 Fix "needs grading" count for assignments
fixes #5968

test plan:
  - create a homework assignment with online text entry (or file upload)
  - as a student, comment on the homework assignment (don't answer it
    though)
  - the teacher should not see a todo item for grading the homework
  - the assignment page should not show a submission needing grading

Change-Id: Ibfd35b41ced27e59d865f42e823a0d9d46d25dac
Reviewed-on: https://gerrit.instructure.com/8273
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Zach Pendleton <zachp@instructure.com>
2012-01-27 10:09:16 -07:00
Jacob Fugal ce63808952 be explicit about inline vs. download in safe files redirect
if we're redirecting to safe files and it's not for download, it's for
inline and we need to include that in the redirect url. also, be
explicit about wanting to download when clicking a link labeled
"Download".

fixes #5433

test-plan:
  - have s3 storage enabled and a safe files domain
  - upload an image as a file submission
    - view the submission in speedgrader; image should be displayed
      inline rather than being downloaded
  - upload an image on the files tab
    - click the download link; should download the image rather than
      being shown in browser
    - preview the uploaded image from the files tab; it should display
      inline
  - upload a flash file on the files tab
    - preview the uploaded image from the files tab; it should display
      inline (independent check necessary because flash is touchy about
      content-disposition headers)
    - click the download link; should download the file rather than
      being shown in browser

Change-Id: Ibd48eb4629aa26052d3d1bce90444146033b9eeb
Reviewed-on: https://gerrit.instructure.com/8275
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-27 09:15:19 -07:00
Jacob Fugal b97f204b5d variable content-disposition in s3 urls
we use content-disposition to force a filename. but we don't always want
the attachment disposition. split cacheable_s3_url into two explicit
methods (cacheable_s3_download_url and cacheable_s3_inline_url) and use
the one at each call site that matches what the non-s3 code uses. refs #5433

while we're at it, switch to using rails caching (redis, memcache, etc.)
instead of the cached_s3_url db column (dropped, along with
s3_url_cached_at).

test-plan:
  - turn on s3 file storage.
  - put files into s3 then get them out again
  - places a download (vs. inline) is expected, should get a download
    prompt
  - places an inline (vs. download; e.g. speedgrader) is expected,
    should not get a download prompt

Change-Id: I34045279ebcf20f0fb0ba0d215b4fdd182176b24
Reviewed-on: https://gerrit.instructure.com/8220
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-27 09:14:55 -07:00
Ryan Shaw 08c3d0d17d put the url back into ErrorReports, fixes: #7038
test plan,

* fill out the "report a problem" form in the help
  dialog and submit
* make sure the last ErrorReport in the db has a
  url attribute 
  OR 
  if zendesk is enabled up for your environment,
  check to make sure that the ticket created at 
  zendesk has a url and a become_user_id_uri

Change-Id: I4f05b2ebe5a0ba9412395a51457e4f5079e0ff69
Reviewed-on: https://gerrit.instructure.com/8297
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-01-26 16:49:31 -07:00
Ryan Florence f5e6c571af media comment event handling fixes #6984
test plan:
1. go to an assignment submission page that allows
   for media comments
2. click the media tab
3. close the dialog
4. open the dialog again
5. record media and save

The UI should update showing that the media was
saved. For a full circle approach, go into speed
grader to verify the recording is there.

Change-Id: I2e0b5eaaf4dd257e47a585d75b1917fbcaf5d1dd
Reviewed-on: https://gerrit.instructure.com/8214
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-01-26 16:47:04 -07:00
Jon Jensen 4f77f047f0 don't show the filter until everything in the scope is filterable
since the data migration will take a long time to run, we don't want to
show the filter dropdown thingy until it can be used. along with that,
we now differentiate between not-yet-tagged (null) and no tags (empty
string).

also tweaked it so we show the computed default tags if the conversation
is not-yet-tagged. this way the transition will be seamless from a ui
point of view (there will never be a period where we don't show common
contexts in the ui)

test plan:
 1. clear out all tags on conversations, conversation_participants, and
    conversation_message_participants
 2. confirm that common contexts still appear in the ui, but the filter
    is not visible
 3. re-run the tag migration
 4. confirm that the filter appears once the migration completes (it
    could appear slightly before it's done ... basically as soon as all
    *your* conversations are tagged)

Change-Id: I6df6b0653bea9d306560917c29ff31625a7b6d93
Reviewed-on: https://gerrit.instructure.com/8340
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-01-26 16:28:37 -07:00
Ryan Florence 7159762de3 fixed spec to work with postgres
ids aren't guaranteed to be 1 and 2

Change-Id: Id5692438635b02260d565e749c9a780c574c1772
Reviewed-on: https://gerrit.instructure.com/8232
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-01-26 16:13:23 -07:00
Jon Jensen 1a61b5c4ec migrate labels to stars
test plan:

confirm that a previously labeled conversation is now starred, and that
they save without any errors

Change-Id: I36fab3f0406318fc2dd259c6db4f2da96cde9a48
Reviewed-on: https://gerrit.instructure.com/8330
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-01-26 16:04:40 -07:00
Jon Jensen e3bd30e3a0 better error handling of bad conversation data
Change-Id: Iacf5f7500520553ccb2e88c65ce4bc02e8b33ebb
Reviewed-on: https://gerrit.instructure.com/8329
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-01-26 16:04:26 -07:00
Jake Sorce 775488d1ba added specs to the announcements selenium file
changed the name clear_rce to clear_wiki_rce in common

Change-Id: I9643bce5bf81f1c6f629266cb4d936f7ab28e70e
Reviewed-on: https://gerrit.instructure.com/8303
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-01-26 09:53:56 -07:00
Jon Jensen f8caf7d4a6 true data migration for conversation tags and submission messages
test plan:
ensure the data was migrated

Change-Id: I12ddd6610ac563ab52c0236b8456a8d3bd1c6dd1
Reviewed-on: https://gerrit.instructure.com/8296
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-01-26 09:44:51 -07:00
Cameron Matheson 110ea7ce17 better ignore pattern for vim swap files
Test plan:
  - open a file in vim
  - open that same file in another vim
  - git stat

Change-Id: If79e3393b81e15fd970235c8d77225c0acd0b476
Reviewed-on: https://gerrit.instructure.com/8203
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-01-25 21:01:40 -07:00
Jon Jensen 53bd309860 conversation course filters, fixes #6827
implemented generic tags for conversations (and messages), but currently those
only track course/group asset strings. conversations are automatically tagged
with the most relevant courses/groups, i.e.

 1. if a specific course/group is a recipient, it will be added as a tag
 2. if a course can be inferred, it will be added as a tag. this can happen
    several ways:
    * if a user is added by browsing/searching under a course
    * if a synthetic context or section is a recipient (e.g. course_1_students)
    * if a group is a recipient
 3. if there are no explicit or inferred tags, we do the old behavior (tag
    courses/groups that are shared by > 50% of the audience)

some notes:
 1. as was the previous behavior, you can only see tags (courses/groups) that
    you belong to. for example, a teacher could send a message to a student
    group, but the teacher would not see the group as a tag (though the
    students would)
 2. tags can be added as recipients are added (though we still just show <= 2
    in the UI). a private conversation may get new tags if a bare PM is sent
    and a different context can be inferred (see below)
 3. private conversations may have tags removed, since we also track them at
    a message level. the scenario is if you have a bunch of messages from your
    Spanish 101 teacher. the course ends and you then take Spanish 102 from the
    same teacher, and the teacher sends the class a bunch of PMs. if you delete
    the old messages, your view of the conversation will lose the Spanish 101
    tags.

added a course filter dropdown in the ui. currently this is limited to active
enrollments, and only returns courses (no groups)

test plan:

 1. test automatic tagging for new conversations
    * ensure explicit tags work (course as recipient)
    * ensure inferred tags work (e.g. user under a course)
    * ensure default tags work (e.g. send a PM to someone you have a class with)
 2. test automatic tagging for adding recipients (same as above)
 3. test automatic tagging for a new message on a private conversation, i.e.
    1. find a user you share 2+ contexts with
    2. start a private conversation w/ a single inferred tag, ensure that only
       that tag is on the conversation
    3. start another private conversation w/ a different inferred tag (this will
       reuse the existing conversation), ensure it has both tags
 4. test private conversation tag recalculation, i.e. perform test 3, remove a
    message, and ensure there is just one tag again
 5. test conversation filtering in the UI

migration:

there is no traditional migration per se, rather we will run something like:
Conversation.find_each{ |c| c.migrate_context_tags! }

Change-Id: If467c8739ef39a655ef5a528b0da77213130e825
Reviewed-on: https://gerrit.instructure.com/8225
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-01-25 13:51:53 -07:00
Brian Palmer 9112bd3b39 job ui hold/unhold improvements
* hold/unhold/delete in one query, instead of loading each job and then saving it
 * fix a long-standing bug where searching for a job by id and then
   acting on it, would actually act on all jobs (holding all jobs, etc)
 * tweak the timeouts/sleeps on jobs specs to remove about 10s from their runtime

refs #6875

Change-Id: I4db5df1a938bf60b95b9972ce8891adcdc16f4f5
Reviewed-on: https://gerrit.instructure.com/8210
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-01-25 10:49:25 -07:00
Bryan Madsen cf47d06b59 break up xml in selenium external tools spec
sending the xml all at once in the selenium tests was causing
intermittent failures

Change-Id: I6fa0b589cb1be5d2207912ae2d19254e1236ef82
Reviewed-on: https://gerrit.instructure.com/8272
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-25 09:34:21 -07:00
Cameron Matheson 74e82ff818 Properly add/remove external tool tabs from nav
fixes #6769, #6939

Test plan:
  - enable caching with redis or memcached
  - log in to a course page
  - use the api to  add an external tool with course navigation (see the
    redmine bug)
  - refresh (you should see the external tool in the navigation)
  - delete the external tool
  - refresh (nav item should be gone)

Change-Id: I734bd726818ea84ffe333597eb0197db2200c235
Reviewed-on: https://gerrit.instructure.com/8141
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2012-01-24 21:15:07 -07:00
Simon Williams 911070ba27 problem editing imported rubric; fixes #6754
after importing a rubric into a new course, if you try to add that rubric to
a new assignment, and then immediately editing before saving the assignment
(and making the association), the edit will fail rather than properly creating
a new rubric with the edited changes.

test plan:
- create a course, assignment + rubric
- create a new course and import all content from old course
- create a new assignment, add the imported rubric
- try to edit the rubric immediately, and hit save
- the save should be successful

Change-Id: Ic1993bb5d1523e0066ff8ebd6e02b6d71b338aa4
Reviewed-on: https://gerrit.instructure.com/8111
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-24 16:42:07 -07:00
Bracken Mosbacker ead438c545 make course copy have lower priority
Test Plan:
 * run course copy and observe priority

Change-Id: Iaab8ccaa9c3c8b3f6b21c1bc3648e8eb42f08f36
Reviewed-on: https://gerrit.instructure.com/8260
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-24 15:45:26 -07:00
Cody Cutrer 72d4e66db8 fix admins being able to change passwords of other accounts
test plan:
 * create a user with pseudonyms in multiple accounts
 * log in as a user that's an admin in one account
 * that admin should not be able to modify the first user's
   pseudonym in other accounts

Change-Id: Ib076cffa00a748d03a45aa2c72f15cb0120a1825
Reviewed-on: https://gerrit.instructure.com/8258
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-01-24 15:00:03 -07:00
Ryan Shaw 8a9a0b8f16 fix zendesk not getting the right user on new tickets
In the old form, the form would post a blank
report[email] value.  because of the way
guess_email works we can't just not submit it. 
because it needs to override the "unknown" value 
that was put there in the after_save callback when
it was created (but did not yet have an associated
user)

test_plan:
 * run the spec 
Manual steps:
 * in an environment with the canvas_zendesk_plugin
   set up, submit something a problem from the 
   help dialog
 * make sure the ticket in zendesk has the right
   email address.

Change-Id: I23d983da41e154815c7f28fe64fb70f03a0a9803
fixes: #7018
Reviewed-on: https://gerrit.instructure.com/8255
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-24 13:35:47 -07:00
Jon Jensen b4687d2a6a fix course export regression, closes #6992
include all course files when doing a course export

test plan:

1. do a course export
2. confirm that all files are in the export and can be imported

Change-Id: I2cfcd9008f7ba9ef34a19b65c0beaca2d98eb810
Reviewed-on: https://gerrit.instructure.com/8252
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-01-23 20:40:21 -07:00
Jon Jensen e65c5f97ba fix service visibility updating, closes #6675
test plan:

ensure you can turn service visibility on/off in the various places in
the ui

Change-Id: I0c59405a419aba73a881d70fd368e34d50cacac5
Reviewed-on: https://gerrit.instructure.com/8246
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-23 19:25:50 -07:00
Brian Palmer f2040d6392 make sure the page view has created_at set for the bucketing
test plan: perform an ajax request or other page view update (rather
than page view generation) request.

Change-Id: I8bad85b84fce7ee6a2f1b3379b0f18db011d20c0
Reviewed-on: https://gerrit.instructure.com/8249
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-23 17:05:19 -07:00
Zach Pendleton c28280cbd6 update documentation for course enrollments list. fixes #6999
test plan: N/A

Change-Id: I72c6caba3fc7c01be2b16f2aaac5859bb865b7c9
Reviewed-on: https://gerrit.instructure.com/8245
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-23 16:23:33 -07:00
Brian Palmer 2a7b09505d optionally store active user counts in redis
Based on page views created in each 5 minute period. Each 5 minute
bucket stores the user id for each user who requests a page during that
interval.

To get active user counts over long periods, just take the set union
(sunion) of multiple buckets. Buckets are named using the ISO8601
timestamp, rounded down to the 5 minute period.

The only downside of this approach is if you only want counts from the
sunion, you either have to get every user id back and count the returned
rows, or use sunionstore and then scard on the new set (and should
probably delete the tmp set after scard'ing)

test plan: generate page views as multiple users by visiting pages in
the app, then check the redis buckets -- e.g. "keys active_users*"

Change-Id: I3cb31c193096b588e161ba021197c8770bce45b8
Reviewed-on: https://gerrit.instructure.com/8241
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-01-23 15:55:48 -07:00
Bracken Mosbacker f26cafb881 don't fail when copying/importing large courses
Rack has a set limit for how large the "keyspace" for
requests can be. For courses with lots of items the request
exceeded this limit. This commit changes the copy/import
forms to have a single list of items to import instead of
lots of key/value pairs.

Test Plan:
 * Manually run some course copies and content imports

closes #6889

Change-Id: I18b1e49261ef8c4ea724a8e0d02ac6bbdaac2fbc
Reviewed-on: https://gerrit.instructure.com/8120
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-23 15:28:54 -07:00
Jake Sorce c26d166e39 marking spec in file uploads as pending
Change-Id: Ic4c18683d76293580e68d11aa3bae509ee37889c
Reviewed-on: https://gerrit.instructure.com/8238
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-01-23 15:12:20 -07:00