Commit Graph

394 Commits

Author SHA1 Message Date
Jon Jensen fb2fe0d6b8 ensure context tags are shared by 2+ participants, fixes #7231
when sending bulk private messages, ensure that each created/updated
conversation only gets contexts that are relevant to both participants

also fix an issue where the tags were not getting cleared once the
last message was deleted

test plan:
1. test bulk private conversations
 1. send a bulk private conversation to several contexts
 2. ensure that only the appropriate tags show up on each
    created/updated conversation
2. test clearing out
 1. delete all messages from a conversation
 2. ensure the tags are empty in the db
3. make sure tagging/filtering isn't generally broken

Change-Id: I416a1e809bdcb0835cd9f3d281cc71ab7df057f4
Reviewed-on: https://gerrit.instructure.com/8615
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-02-13 13:29:45 -07:00
Jon Jensen 626f12645d prevent duplicate messages for submissions, fixes #7221
includes a data migration to remove duplicate messages

test plan:
1. create multiple teacher enrollments for yourself in a course
   (invited/active/whatever)
2. masquerade as a student, submit homework with a comment
3. unmasquerade and go to your inbox
4. ensure that you see the submission and comment in your conversation
   with the student, but only once

Change-Id: I05c1db702b328e855aa7bcd2187617fa073d7261
Reviewed-on: https://gerrit.instructure.com/8595
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-02-13 13:29:41 -07:00
Brian Palmer 0b2fc926f9 fix for zero-point pass/fail assignments
The values of "pass" and "fail" are allowed in the API, but they were
intended to be saved to the DB as "complete" and "incomplete". A bug
prevented the translation from happening for zero-point pass/fail assignments.

fixes #7234

test plan:
  * create a complete/incomplete assignment worth 0 points (or leave points blank)
  * using gradebook2, give a student a passing grade (green checkmark).
    * this bug only affects grades given in gradebook2, not the old
  * masquerade as the student and go to your grades page. you should
    correctly see your grade as complete, not incomplete.

Change-Id: If5fd920af97db9181dafc0330af6aa9d8d1497a4
Reviewed-on: https://gerrit.instructure.com/8632
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-02-10 12:58:48 -07:00
Zach Pendleton 95806983ac shorten migration names to avoid postgres index max-length.
test plan:
  * on an empty postgres database, run rake db:initial_setup
    and ensure that no errors are thrown.

Change-Id: I2a4b43a7fa60bcb8e81c5c578b9dfccd19b38a28
Reviewed-on: https://gerrit.instructure.com/8625
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-02-10 09:11:13 -07:00
Jon Jensen 55bbf9e87a sent filter for conversations, fixes #7012
test plan:
1. click on the sent filter
2. ensure you only see non-archived conversations where you have written
   at least one message
3. ensure that the timestamp and preview on the left reflect your latest
   message (not necessarily the latest in the conversation)
4. ensure the conversations are sorted by the timestamp of your most
   recent message
5. ensure that when you delete the last message by you in a given
   conversation, that conversation is removed from the ui

Change-Id: I85468d19122f1190bd2c53cb640145b7d14e2b42
Reviewed-on: https://gerrit.instructure.com/8416
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-02-08 21:06:26 -07:00
Brian Palmer 286e1e283d remove the unique constraint for a skipped index
This is one of the indexes that was supposed to be created long ago but
was silently skipped because of a too-long name.  We have current data
that breaks this unique constraint. It'll take some time to investigate
and determine the correct course of action, so for now, we're making the
index non-unique.

Change-Id: I3e49a11db3cab49834a4a1d41d4b9effebeab4bf
Reviewed-on: https://gerrit.instructure.com/8613
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-02-08 16:57:55 -07:00
Jon Jensen 5e34680921 fix submission comment migration, clean up data. fixes #7203
also make view resilient to bad data in the future

test plan:

confirm that the dummy conversation messages go away and that people stop
getting dashboard errors

Change-Id: I2d59bf400f7b5b92debf4a4e0af2de2204878cf8
Reviewed-on: https://gerrit.instructure.com/8578
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-02-07 16:08:54 -07:00
Jon Jensen 71a7af2be3 set empty tags for conversations affected by #7178 (refs #7178)
recently created (or resurrected) conversations with no common
contexts (explicit or inferred) did not get the tags set to '',
and this was preventing the course filter from displaying in the
ui

test plan:

ensure that the course filter shows up

Change-Id: I2c332eedab7765a9d8e3bcb2f41cae260e89a611
Reviewed-on: https://gerrit.instructure.com/8542
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-02-07 15:01:10 -07:00
Brian Palmer ccc1458046 remove duplicate sis imported enrollments
prior to b6300298d it was possible to generate multiple enrollments for
the same user+section+type through deleted enrollments. that changeset
included a cleanup migration but it wasn't complete. this completes the
cleanup.

fixes #7181

Change-Id: Ia1630fdfb2714594492b87805089c02645891796
Reviewed-on: https://gerrit.instructure.com/8525
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-02-06 14:34:16 -07:00
Bracken Mosbacker c7969a2368 allow requested_authn_context to be configured on saml auth
Test Plan
 * Try a SAML login with the value set to secure password
 * Try a SAML login with the value set to no value

Change-Id: I72ff456b7ce6a6ff691f9447a7b6684e8793ec16
Reviewed-on: https://gerrit.instructure.com/8350
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-02-02 15:36:05 -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
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
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
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 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
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 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
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
Jon Jensen 0b1655e76d conversation messages for submission comments, fixes #5443
this commit makes submission first-class citizens in conversations. this
means that when submission comments are added/deleted, or assignments are
unmuted, conversations and messages will be updated accordingly

the main impacts in the ui are:

1. submissions can be deleted from conversations. if a new comment is
   added, they will reappear
2. submissions factor into the message total for the conversation. each
   submission counts as a single message, even if there are multiple
   comments
3. submission messages affect unread-ness, and are reflected in the
   timestamp and text in the conversation preview

test plan:

1. confirm submissions appear in the appropriate conversations, i.e.
   * submissions with no comments should not appear in any conversations
   * submissions where there are comments but not by instructors:
     * should appear in each instructor's private conversation with the
       submitter
     * should not appear in the submitter's private conversations with
       anyone
   * submissions where there are comments by instructors:
     * should appear in each commenting instructor's private conversation
       with the submitter
     * should appear in submitter's private conversations with each
       commenting instructor
   adding or removing submission comments should update private
   conversations accordingly (e.g. when one teacher comments on a
   submission, it should be removed from the other teachers' private
   conversations with the submitter).
2. for each scenario above where the submission comments are added and
   appear in conversations, ensure that the submission as a whole behaves
   like a single conversation message, i.e.
   * the unread conversations count is incremented and the private
     conversation is marked as unread (if it didn't exist or was already
     read)
   * the latest submission comment and timestamp should be reflected in
     the conversation pane on the left side
   * you can delete the submission from the conversation. if new comments
     are posted on the submission, the submission should reappear in the
     conversation (provided it still matches the criteria in 1.). note
     that submission can not be forwarded to other conversations.
3. submissions should differ from traditional conversation messages in
   that:
   * they should not trigger conversation notifications
   * they should not create/bump conversation stream items. if a
     conversation has non-submission messages, the submission and its
     comments should appear in the stream item, but they should not
     cause it to jump to the top

migration:

existing submissions/comments will be migrated in, but not necessarily
through a traditional rails migration. to bring in those messages, run
the following from the rails console:

 Submission.find_each{ |s| s.create_or_update_conversations!(:migrate) }

Change-Id: I06dcb8728402a6c4c613d445b80432a1f2973b73
Reviewed-on: https://gerrit.instructure.com/8086
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-01-20 15:56:32 -07:00
Brian Palmer edf2e0a43a clean up some unused and inefficient indexes
We optimize one index to leave out null values, and drop a bunch of
indexes that aren't used, or aren't generally used.

Dropping the unused stream_items.user_id column also drops two more
large unused indexes.

test plan: n/a

Change-Id: I3872365151676e5ce0867f7d6826e5a0d4447bbd
Reviewed-on: https://gerrit.instructure.com/8200
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ben Chobot <bench@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-01-20 13:53:50 -07:00
Zach Wily 179a10ff87 don't send files to users in public courses we shouldn't; fixes #6868
ContentZipper for some reason was allowing fetching all files (as if a
teacher) when user was not specified. This fixes that and requires correct
permissions when zipping up a folder.

It also runs a migration which will delete existing folder zip files for
anonymous users, since those are cached.

test plan:
 * Create a public course and put some files in it.
 * Lock and hide some of those files.
 * Log out and browse to the course files.
 * Choose "download zip file".
 * Verify that the zip file you get only has visible files in it.

Change-Id: Icf5929f7d1dbc4a7f2122337aff9ed6ae003af12
Reviewed-on: https://gerrit.instructure.com/8085
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-16 10:50:47 -07:00
Cody Cutrer 7e97621462 store sis_batch_id as an integer, not a string
test plan:
 * run the migration
 * redo the migration
 * do a batch mode sis import

Change-Id: I0204256f3825ffe0b4d252bbb83a0604d7a58942
Reviewed-on: https://gerrit.instructure.com/7904
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Ben Chobot <bench@instructure.com>
2012-01-11 09:14:36 -07:00
Bracken Mosbacker cc146e1b2e make saml entity use the account's domain
AccountAuthorizationConfigs now require the entity_id to
be set for SAML configs. It will be set to the domain of
the account. For existing SAML configs, the entity_id will
be set to what is in the SAML config file if there is one.

This commit also allows SAML meta data to show up for all
domains even if they're not configured for SAML. This helps
admins set up initial SAML configurations.

Test Plan:
 * Create a saml configuration for an account
 * Look at the metadata, the entity_id should be set to the domain/saml2 and not what is in the saml config file
 * Try loading the meta data for an account with no SAML config. It should load and have the proper entity_id

closes #6713

Change-Id: Ia98543c996285d9b1febd788c3f3ec072b672b12
Reviewed-on: https://gerrit.instructure.com/7967
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-10 12:45:08 -07:00
Cody Cutrer c2ffd6e973 drop unused sis sticky columns
these are unused since we refactored sis stickiness

test plan: run the migration

Change-Id: Ie898cefa796b2b2391caf780ad5e5481a05ee5c0
Reviewed-on: https://gerrit.instructure.com/7899
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-10 10:49:55 -07:00
Cody Cutrer f491308163 drop unused user.creation_* columns
test plan: run the migration

Change-Id: I75184edd64ddee384de485c443d4c7eee45cc26f
Reviewed-on: https://gerrit.instructure.com/7895
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-01-10 10:49:49 -07:00
Simon Williams 64d687ec87 handle decimal points in rubrics correctly
allow points in rubric criteria and ratings to have decimal values. in working
with brian, we're operating under the following assumptions:
- round to 2 decimal places
- splitting always gives you a integer by default (you can change it yourself after)
- if there's not room to split with an integer, repeat the low value

test plan
- create a new rubric
- change a criterial value to something with a decimal point
- try setting specific ratings with decimals
- try to split between a large space (ie 10.5 and 0), should be 5
- try to split between a small space (ie 0.5 and 0), should be 0

closes #5355

Change-Id: I17e26fe18dda0847fa59dd40976e4d6f38851287
Reviewed-on: https://gerrit.instructure.com/7882
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-01-06 16:34:48 -07:00
Cody Cutrer 3686b2d1eb drop unused column accounts.type
test plan: run the migration, then the specs

Change-Id: Idec29c0a9cf43a581e0ca9eae00248599270745c
Reviewed-on: https://gerrit.instructure.com/7896
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-01-06 15:56:23 -07:00
Bracken Mosbacker 1cb590e216 make the migration only send later if production
refs #6718

Change-Id: Ib931b28e4b2ecacba109959d067ede1acea7fddb
Reviewed-on: https://gerrit.instructure.com/7929
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-01-06 15:22:00 -07:00
Jon Jensen 80c90587d6 calendar and scheduler apis; refs #3395
Change-Id: I0bafb21630086ff2a99b8b881568bff51afabedc
Reviewed-on: https://gerrit.instructure.com/7823
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-01-06 12:35:27 -07:00
Bracken Mosbacker fefb81420c migration to fix bad assessment question data
AssessmentQuestions updated after Dec. 22, 2011 lost
their numerical values. This tries to fix them.

Test Plan:
 n/a

refs #6718

Change-Id: Ieca6e1fa9ec2b7ae23b2e3dd7db433e5f98457d7
Reviewed-on: https://gerrit.instructure.com/7785
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-01-06 12:30:09 -07:00
Cody Cutrer c37a83b4f8 fix existing bad data from the sis_cc bug refs #6707
the bug meant that multiple pseudonyms would point to the same
cc.  with this migration we just remove the pointer from the
pseudonym that doesn't match the the user.  in order to fully
repair the data, the SIS Import will need to be run again

test plan:
 * run the migration, and check that
   SELECT COUNT(*) FROM pseudonyms p INNER JOIN communication_channels cc ON p.sis_communication_channel_id=cc.id WHERE p.user_id<>cc.user_id;
   returns 0.

Change-Id: Idb4c9bed425bb5164ada5b4bda24871a029156e1
Reviewed-on: https://gerrit.instructure.com/7845
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-05 09:05:37 -07:00
Cody Cutrer 795b372024 don't add items to list if their scope is nil
also remove existing attachments that aren't in a folder from their list

test plan:
 * run specs
 * create sis batches - make sure their position is NULL
 * destroy their associated attachment, the query logs should not indicate
   an UPDATE attachments SET position = position - 1... being executed

Change-Id: I6117c2ade0ef5ec41a3ffeeb13096b9d8473f3f9
Reviewed-on: https://gerrit.instructure.com/7843
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-01-04 11:16:50 -07:00
Cody Cutrer 2b2f49d66f search for communication channels case insensitively fixes #6750
test plan:
 * create a user via SIS import with an e-mail address
 * add a different e-mail address to the user
 * re-import the user via SIS, and set their e-mail address
   to the second e-mail you added, but with a different case
 * the user should have a single e-mail address, the one set
   in the second SIS import

Change-Id: Iab6b16e0b37cfb8caac3faa453be570b99621a9e
Reviewed-on: https://gerrit.instructure.com/7784
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2011-12-30 19:36:29 -07:00
Cody Cutrer e363203c36 better indexes for pseudonyms closes #6193
test plan:
  * run the migration

Change-Id: I24e9895ab35087fdeb607bd3ad4a1fc569e02c1f
Reviewed-on: https://gerrit.instructure.com/7721
Reviewed-by: Ben Chobot <bench@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-12-30 10:07:30 -07:00
Zach Pendleton 3ca0c208c9 fix spelling of "privileges" in enrollments.
enrollments previously had attribute
"limit_priveleges_to_course_section," but should
be spelled "privileges." replaced spelling in a
migration and across app.

affects: enrollments model
test plan:
  * run specs

Change-Id: I15dcf9a023ead9bb1aed42abc2d1a7c233610840
Reviewed-on: https://gerrit.instructure.com/7431
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-12-19 16:48:42 -07:00
Jon Jensen edd59601ee stricter checks to avoid casting error
test plan:

ensure migration runs correctly. in production this should update ~14k
rows

Change-Id: I623a3fa4fffe6faff069fb44cb2c053a97d3e4c4
Reviewed-on: https://gerrit.instructure.com/7478
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-12-14 09:11:29 -07:00
Jon Jensen d1d6143ce7 fix quiz_submission.quiz_points_possible
this column is copied from quiz.points_possible whenever the submission
is updated, thus the type needs to match.

test plan:
confirm that quizzes with fractional points dislay the correct message
when you go to edit fudge points on a submission.

Change-Id: Ib3f2c920ac7392b3c4a4a92a273657fe8dfcbc43
Reviewed-on: https://gerrit.instructure.com/7111
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-12-06 09:07:06 -07:00
Zach Pendleton 6d5ddda4c5 correctly update quiz status re: essay questions. fixes #5436
When student submits a quiz with an essay question, it now
displays as ungraded in Speedgrader until the grader reviews/
grades the essay question.

test plan:
1. create a quiz with an essay question;
2. complete the quiz;
3. view the quiz assignment in speedgrader;
4. verify that assignment is marked as "not graded"
   in the student dropdown menu;
5. grade the essay question;
6. verify that the assignment is now marked as "graded"
   in the student dropdown menu.

Change-Id: I67ca56df2ec08380c75aa1ddf64fe8848e2b574d
Reviewed-on: https://gerrit.instructure.com/6619
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-11-29 10:18:25 -07:00
Cody Cutrer 85138859a9 disable open registration for accounts with delegated authentication
refs #5833

delegated authentication means the user has to already have an account
in the delegated auth system in order to log in (without using
canvas_login=1), so even creating them a canvas account won't do them
much good.

test plan:
  change an account to use CAS authentication (doesn't really need to be
  a valid config, since as a site admin user you can still log in), and
  open registration will no longer appear in account settings, and as a
  teacher in the account, you can't invite users that don't already exist

Change-Id: I26cfa8c6eaffd24572e7c16f1d935163b7143d84
Reviewed-on: https://gerrit.instructure.com/7082
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-11-28 15:52:50 -07:00
Cody Cutrer 23d0a6d8c9 drop sticky_xlists from course_sections
test plan: n/a

Change-Id: I246f5f9bcd955f5f2034fd8c20402e6fa1fea792
Reviewed-on: https://gerrit.instructure.com/7170
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-11-28 14:58:08 -07:00
Cameron Matheson d315baa896 keep root_account_id in sync between course/enrollments
fixes #6142

test plan: Create a course and enroll some students.  Move the course to
  another root account.  The following SQL query should return 0:

    SELECT COUNT(e.id) FROM enrollments e
    INNER JOIN courses c ON e.course_id = c.id
    WHERE e.root_account_id != c.root_account_id

  To test the migration, mess up some of the enrollment
  root_account_ids:

    UPDATE enrollments SET root_account_id = 99

  Before migrating, the SELECT COUNT snippet above should return
  false, after migrating, it should return true.

Change-Id: I9b18dded8a763a8a05f5e631907f77b4e9a1bd49
Reviewed-on: https://gerrit.instructure.com/7081
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-11-28 14:29:58 -07:00
Cody Cutrer 6caf502bb8 drop SisCrossListedSection
it's ancient cruft

test plan: n/a

Change-Id: I20912454e9b35be4a292efff33a5fe2913f0bd09
Reviewed-on: https://gerrit.instructure.com/7169
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-11-28 14:27:10 -07:00
Jacob Fugal 5e9ae28f13 cleanup links in quiz questions; fixes #6212
find links in quiz questions from courses other than the course the
question's quiz is in; find related assessment question and pull the
corresponding link from there to use instead.

Change-Id: I4dd2f0c279a6263f753ec898dc17e91e62997923
Reviewed-on: https://gerrit.instructure.com/6910
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-11-22 16:23:44 -07:00
Brian Palmer 4ef50c16d8 make "stay logged in" use a one-time token
closes #6382

Previously, the "stay logged in" cookie just used the authlogic default
implementation, which is the pseudonym persistence_token. This is a
problem, because that persistence_token only ever changes when the
pseudonym password changes, so it's the same everywhere; so if that
cookie is stolen, it's valid for a very long time.

This switches us to one-time-use tokens that expire as soon as the token
logs the user in once. Each user agent also gets a different
one-time-use token.

Change-Id: I4f20cd7759fd74590e82ed55797552e342243d49
testplan:
  * Check that no token is set at all when "stay logged in" isn't
    selected.
  * Check "stay logged in", and verify:
    * That you don't have to login again after restarting your browser,
      but your _normandy_session got reset.
    * That if you save and try to replay using the same
      pseudonym_credentials, they don't work the second time.
    * That a second browser will get a different pseudonym_credentials
      value, and using one token doesn't affect the other.
    * That once the token is used, a new one is generated and set in
      your cookies. Verify this new token works as well.
    * That logging out removes the pseudonym_credentials cookie in your
      browser. And also that manually restoring this cookie still
      doesn't log you in, since it was removed server-side as well.
  * Change your password, and verify that the existing "stay logged in"
    tokens no longer work.
  * Delete your pseudonym, and verify the same.
Reviewed-on: https://gerrit.instructure.com/7093
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-11-22 10:15:13 -07:00
Jon Jensen ca0c0c43b4 fix performance and correctness of triggers, closes #4471, #5168
fixes the behavior such that we only toggle ungraded assignment counts
related to a particular user when his active enrollments in a given
course go from zero to one and vice versa.

also fixes performance issues in mysql. this required a custom trigger
body. see https://github.com/jenseng/hair_trigger/commit/326a10c for
the related hairtrigger commit to support this

Change-Id: Ie36b3d33ced69321f3a87468ab56480b1378d235
Reviewed-on: https://gerrit.instructure.com/6808
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-21 09:06:43 -07:00
Cody Cutrer 081b3d4463 remove_column, not drop_column
Change-Id: I9801854e4123a97053c8264317637839881d76bb
Reviewed-on: https://gerrit.instructure.com/7063
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-18 13:38:02 -07:00
Bracken Mosbacker ba28a28d16 copy and export/import external tool assignments
External tools weren't copied when copying a course
so that is implemented here as well

test plan:
 Export/Import:
  * Create an external tool assignment
  * export the course
  * import the course into a new course
  * set the secrets on the external tool
  * make sure the assignment works in the new course
 Copy:
  * Copy a course into a new course
	* make sure the assignment works

refs #5892

Change-Id: I4aab8966b53ca2d144fddd71eefd0acbdb7c0bff
Reviewed-on: https://gerrit.instructure.com/6958
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-15 15:33:20 -07:00
Jacob Fugal a88081100b update submissions with null submission type
when creating submissions during cleanup, if a submission with null
submission type (indicating the assignment was graded or commented on
for that student, despite lack of submission) exists, update it instead
of trying to create a new conflicting submission.

Change-Id: I3fc7a4a1eba4341d8ad6f0551754a92c93082a61
test-plan:
 * create graded discussion
 * have student post in discussion, creating a submission
 * in script/console, remove the submission's submission_type
 * run migration
 * note no new submission, but submission_type on existing submission is
   restored
Reviewed-on: https://gerrit.instructure.com/6978
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-14 15:50:31 -07:00
Jacob Fugal 23ebfa123e fix migration
fixing ability to run, not effect of running. if you already
successfully ran the migration, you don't need to rerun it. if you
haven't successfully run it, now you can. so it's kosher to fix in
place.

manually tested with full test-plan (i.e. putting migratable data in
place) this time.

Change-Id: I0db5b800a0a08a3865fd7f926c6fe8e833a88cea
test-plan:
  * create graded discussion
  * participate in discussion as student
  * in script/console, delete the corresponding submission
  * run migration
  * verify submission was recreated
Reviewed-on: https://gerrit.instructure.com/6904
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-11-14 12:16:58 -07:00
Jon Jensen 84e766de0d add index on favorites.user_id
Change-Id: I832394907df87eb996b8cb4e6efc3a8f881557aa
Reviewed-on: https://gerrit.instructure.com/6961
Reviewed-by: Ben Chobot <bench@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-14 10:11:29 -07:00
Jacob Fugal 777cd13f6d require skip_callbacks in migration that needs it
Change-Id: I8c3b4cfb52b2dc37616f5cfc94230d2c1b661b6c
Reviewed-on: https://gerrit.instructure.com/6865
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-10 17:19:07 -07:00
Jacob Fugal 89d79c1ac3 create submissions when a discussion gains an assignment
if a discussion goes from ungraded to graded create any missing
submissions in the newly associated assignment for existing entries.
also, find any situations where this should have already happened and
rectify them.

test-plan:
 * using old code, create two ungraded discussions
 * have a student contribute to each discussion
 * switch the discussion to being graded
 * note there are no submissions for the student in the speedgrader
 * apply migration
 * note there are submissions for the student in the speedgrader
 * using new code, create a third ungraded discussion
 * have the student contribute to the third discussion
 * switch the third discussion to being graded
 * note there is a submission for the student in the speedgrader

fixes #5748

Change-Id: I30b90ba36c5d688cd9512bdb2d9d2df2cee06a08
Reviewed-on: https://gerrit.instructure.com/6822
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-10 13:06:53 -07:00
Brian Whitmer 6b83b9227c basic lti navigation links
By properly configuring external tools (see
/spec/models/course_spec/rb:898 for examples) they can
be added as left-side navigation links to a course,
an account, or to the user profile section of Canvas.

testing notes:
- you have to manually set options on the external tool:
- for user navigation the tool needs to be created on the root account
  with the following settings:
  {:user_navigation => {:url => <url>, :text => <tab label>} }
  (there are also some optional language options you can set using
  the :labels attribute)
- for account navigation it's the same
- for course navigation it's the same, except with :course_navigation
  there's also some additional options:
  :visibility => <value> // public, members, admins
  :default => <value> // disabled, enabled

test plan:
- configure a user navigation tool at the root account level,
  make sure it shows up in the user's profile section

- configure a course navigation tool at the account level,
  make sure it shows up in the course's navigation

- configure a course navigation tool at the course level,
  make sure it shows up in the course's navigation

- make sure :default => 'disabled' course navigation tools don't
  appear by default in the navigation, but can be enabled on
  the course settings page

- make sure :visibility => 'members' only shows up for course members

- make sure :visibility => 'admins' only shows up for course admins

- configure an account navigation tool at the account level,
  make sure it shows up in the account's navigation, and
  any sub-account's navigation

Change-Id: I977da3c6b89a9e32b4cff4c2b6b221f8162782ff
Reviewed-on: https://gerrit.instructure.com/5427
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-04 17:07:17 -06:00
Brian Palmer c1957aac1a launch lti tool when viewing external_tool assignment
There isn't current any way to create this assignment type in the UI.
This just gets us far enough that we can test out the API functionality
against the IMS tests and some other tools that use grade passback.

refs #5892

Change-Id: I6f806a53bca0708702ff9e64e8e520be26234430
Reviewed-on: https://gerrit.instructure.com/6661
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-11-04 09:42:13 -06:00
Brian Palmer 25d77ac15d add replaceResult support to LTI grade passback, refs #5892
Also versioned the URI and removed the tool_id param. As part of the
processing it pulls the tool from the assignment and verifies that it's
the same tool as was used to launch, by looking at the sourcedid.

Assignments now have an external_tool type and link to a
ContextExternalTool.

testplan: there isn't a way in the UI to configure an assignment as an
external tool yet, so it'll need to be manually configured in the
console.

Change-Id: I0cf5ec85d450409d6ea1ec71ce1d5d4c19622d4c
Reviewed-on: https://gerrit.instructure.com/6652
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-02 16:32:55 -06:00
Cody Cutrer 3f3f72637a expose sortable name to user, fixes #5317
* expose sortable name directly to the user
 * don't downcase it
 * use a LOWER(sortable_name) index for postgres
 * set sortable name as "last_name, first_name" explicitly for SIS imports
 * populate sortable name intelligently in the UI

Change-Id: I476641f4817e27a11b573d91f102c5a74d3eba26
Reviewed-on: https://gerrit.instructure.com/6512
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-10-31 12:22:08 -06:00
Cody Cutrer c4c79f5d23 grandfather in accounts with old not-secure-by-default settings
refs #5833

Change-Id: Ic283bc7665e76ff0a19635faef3d5751f2d06e6b
Reviewed-on: https://gerrit.instructure.com/6581
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-31 10:53:06 -06:00
Ryan Shaw 8dd5ad8c2b make sure discussion subentry is deleted with parent
Change-Id: I5de4bb1a5527e6c7dc73205c1f6f8c329e74ad68
fixes: #6081
Reviewed-on: https://gerrit.instructure.com/6502
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-28 12:42:32 -06:00
Cody Cutrer f99abb4e56 Revert "add distinct name part fields refs #5317"
This reverts commit 995110f555.

Change-Id: Ic00e7ced20ca9d912587e3440862ceb50e601d15
Reviewed-on: https://gerrit.instructure.com/6511
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-27 10:17:29 -06:00
Ryan Florence 8e3067e44b added favorite courses option to main menu
Features
--------

- The course menu shows the top 12 courses in
  alphabetical order

- Users with > 12 courses will get a button to
  edit the courses in their menu.  Any courses
  they add become favorites and will remain
  in the course menu, and visa versa for those
  they remove

- Users can reset the menu to the default 12

Noteworthy Ruby changes:
------------------------

- Added Favorites model
  Favorites are polymorphic so we can save other
  contexts as favorites in the future.

- Added FavoritesController

- Added User#menu_courses
  This opens up some room to remove lots of code
  that's used to build the main menu, but that
  isn't in this commit.  Gives a list of all the
  courses that show up in the user's menu.

- Added User#favorites

- Added User#favorite_courses

- Refactored Enrollment::readable_type to cache


Noteworthy JavaScript changes:
------------------------------

- Jasmine specs are totally working

- Added CustomList constructor

- Added courseList (CustomList instance)

- Added objectCollection
  Utility function that extends an array with
  methods useful for collections of objects.
  Used to manage the data state in CustomList

Fixes #4827

Change-Id: I59468e517ad07678741402bf9cf479cba1dfeaa1
Reviewed-on: https://gerrit.instructure.com/5982
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-10-24 15:50:34 -06:00
Cody Cutrer 995110f555 add distinct name part fields refs #5317
Change-Id: I0d11c51d4e0e9be093b65cca2ea85ba18e99bce9
Reviewed-on: https://gerrit.instructure.com/6314
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-10-24 12:06:59 -06:00
Cody Cutrer eaf7df0777 drop completely unused attachments.enrollment_id
Change-Id: If402062a2a8a2ef58b793316b0006b6f384337d0
Reviewed-on: https://gerrit.instructure.com/6361
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-21 10:41:34 -06:00
Cody Cutrer 2df7fceadb drop unused Enrollments#invitation_email
Change-Id: I4e80fda6312e4050c4316aceb8de07cfe4c6df51
Reviewed-on: https://gerrit.instructure.com/6287
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-21 10:41:22 -06:00
Zach Wily a4e55af920 make sure links in assessment questions are correctly translated, fixes #6012
Assessment questions can be shared among multiple contexts, so we need to make
the Canvas links used inside authorized to anyone with the link.

Change-Id: I0df4907405fd518ee0efebccf1b9fb8717dca141
Reviewed-on: https://gerrit.instructure.com/6341
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-21 08:36:34 -06:00
Zach Pendleton f089518e6b use first discussion topic post for late deadline. fixes #5828.
For discussion topic assignments, submissions now use the time
from the first post to determine whether or not the assignment
is late. Previously they were using the time from the last post
which lead to false late flags.

Change-Id: I8327b14e4ce9a8a5d50143e6ca60c85845da5f29
Reviewed-on: https://gerrit.instructure.com/6253
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2011-10-20 09:23:41 -06:00
Jacob Fugal 5acf427984 cleanup migration to go with 70c18ac
does the work that group_category_data_migration pre-70c18ac missed,
no-op if group_category_data_migration post-70c18ac was run

Change-Id: I39cc35cf385857f11cdcbdab3c462dbff9c4ce12
Reviewed-on: https://gerrit.instructure.com/6235
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-17 16:01:55 -06:00
Jacob Fugal 70c18acc39 fix group_category migration
Wasn't updating group_category_id on assignments; instead it was
updating groups again when it should have been doing the assignments.
This didn't mess up any groups, it just left the assignments unmigrated.

Change-Id: Id36cb9c90aecfe77c1af432a0149053239427520
Reviewed-on: https://gerrit.instructure.com/6234
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-10-17 12:42:47 -06:00
Jon Jensen 0dd97c664b fix for existing turnitin assignments, closes #5977
Change-Id: Icfd23d06d0542ce5df3f0d4a3f5506184544214e
Reviewed-on: https://gerrit.instructure.com/6233
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-17 12:35:17 -06:00
JT Olds 9d4a4944b6 allow sis imports to make things sticky or clear stickiness altogether
* adds ui

Change-Id: Id8f3639457879d23125c0fb04ef5038d91826f21
Reviewed-on: https://gerrit.instructure.com/6050
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-13 10:54:58 -06:00
Cody Cutrer d2a5328993 drop Pseudonym#sis_source_id closes #5897
Change-Id: I81f2df5324ae7f9747f5d72ac1f8686932c815ff
Reviewed-on: https://gerrit.instructure.com/6093
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-12 12:18:37 -06:00
Jacob Fugal e07e64b9ef self signup group categories
group categories can be flagged as self sign-up, and optionally
restricted to be section-homogenous. like normal groups and unlike
student-organized groups, a student may be in at most one self sign-up
group. but like student-organized groups and unlike normal groups,
students can assign themselves to the group of their choice. if the
section restriction is enabled, students can only be assigned (whether
by themselves or their teacher) to a group which is either empty, or
whose existing members are in the same section as the student.

also added an edit UI to group categories allowing renaming and
management of the self sign-up options. polished the existing UI for
creating categories.

fixes #4624

Change-Id: Ib623f4c6afd20e9700984f8294cd42950107252c
Reviewed-on: https://gerrit.instructure.com/6052
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-10-11 17:22:46 -06:00
Cody Cutrer 966f196fc4 drop Pseudonym#deleted_unique_id closes #5896
Change-Id: I5072b341cebd0221d6b06bb74bb012c61b62610f
Reviewed-on: https://gerrit.instructure.com/6080
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-10-11 14:10:54 -06:00
JT Olds b5c95cad85 inverted logic fix for stickiness migration
Change-Id: Ie890b4620202039d5852e66129ad8ae1edadea3c
Reviewed-on: https://gerrit.instructure.com/6087
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-11 14:00:33 -06:00
Cody Cutrer 133f2a156a make Pseudonym#unique_id sis sticky refs #5897
Change-Id: If969d8bfd8844a2dcd5263a11c9bc06dcaa47c55
Reviewed-on: https://gerrit.instructure.com/6092
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-10-11 10:16:06 -06:00
Cody Cutrer 31c83ef741 update avatar urls for twitter to https in migration
refs #5194

Change-Id: Id6aace4a0e6a1ebc25fd20eb42ee187d96fdf83d
Reviewed-on: https://gerrit.instructure.com/6068
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-10 13:01:18 -06:00
Jacob Fugal 5c8406bd35 GroupCategory model
Group#group_category_name (groups.category) and
Assignment#group_category_name (assignments.group_category) are now
deprecated.

refs #4624

Change-Id: I8fc5d03a75e962c3f649305986f77ad242d3a694
Reviewed-on: https://gerrit.instructure.com/5765
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-10 09:36:06 -06:00
Brian Whitmer 522abc26d4 option to open BLTI links in a new tab
We are getting requests from some vendors to have some way to
load tools in a new tab. The preferred behavior is still to load
tools in the current window, but if a new tab is absolutely
necessary then there is the option now.

We can't reliably open links in a new tab without user intervention,
so we provide a button that users can click to load the tool
themselves in a new tab. That means we also need to add some
timeout functionality in case they take more than a few minutes
to load the tool, since BLTI links expire over time.

fixes #5814

Change-Id: I126f1aaa9cdcfe49b8f2b8ef8b7fbbaf8c56fe67
Reviewed-on: https://gerrit.instructure.com/5957
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-10-07 13:44:52 -06:00
Zach Wily 8cbac7e710 add a migration to update account associations for users with duplicates; refs #4565
The root issue has already been fixed - duplicate account associations are no
longer being created. This migration will fix installations that have the
associations in their db already (causing duplicates in search results, etc).

Change-Id: I86cac21fd5d722a2520cef94959ba544e138da00
Reviewed-on: https://gerrit.instructure.com/6020
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-06 16:25:28 -06:00
Jacob Fugal 6acf93ee75 don't try and scribd html
we still need to call a text/html downloaded from a google docs
'document:blah' document id a .doc, since the assignment may be
restricting submissions to '.doc'. however, we don't want to claim that
said document is scribdable, because it's not. fix already uploaded docs
that were scribd when they shouldn't have been.

be smarter about inferring extensions for google docs downloads while
we're at it.

fixes #5811

Change-Id: Ie8025563d99c653e40d719d7dd2fecda0ec9c9d7
Reviewed-on: https://gerrit.instructure.com/5956
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-06 16:15:51 -06:00
Zach Pendleton 9572eb1fa2 add "mute" function to assignments. fixes #5101
"Mute Assignment" links in gradebook and speedgrader
stop all announcements, emails, and stream items for grades
and comments from appearing until the teacher unmutes the
assignment.

Change-Id: Id74b305b568ff86e2a0e6f9319cfa40bb98b1bcd
Reviewed-on: https://gerrit.instructure.com/5779
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Zach Pendleton <zachp@instructure.com>
2011-09-30 17:28:25 -06:00
JT Olds cb5d048c77 store grade publishing messages
Change-Id: Icfb13244dd46cdeb54b07ef4426d3ba14825b591
Reviewed-on: https://gerrit.instructure.com/5939
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-30 13:46:59 -06:00
JT Olds 8ac681f201 adding start and end date stickiness
Change-Id: Ifd23b2731725619009884ee56f0c8b1964c6a996
Reviewed-on: https://gerrit.instructure.com/5875
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-30 11:00:09 -06:00
Brian Palmer 46ffd8f35f add index to discussion_topics.assignment_id
optimizing query: SELECT * FROM `discussion_topics` WHERE (`discussion_topics`.assignment_id = xxx AND (discussion_topics.root_topic_id IS NULL))  ORDER BY created_at LIMIT 1

Change-Id: Id2f461021ae33f1466f2eee8ec66673fefb49ba7
Reviewed-on: https://gerrit.instructure.com/5895
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-28 14:54:02 -06:00
JT Olds 02e4132107 refactor sticky sis fields
Change-Id: I1cddc633b11b8937f8a3b36c2fa0a00d4d75b513
Reviewed-on: https://gerrit.instructure.com/5745
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-27 16:34:37 -06:00
Jon Jensen b3cd35662e assignment-level turnitin settings, closes #4938
Change-Id: I036391d450eed4ebe81e98ee8d0f106a26c164c3
Reviewed-on: https://gerrit.instructure.com/5802
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-27 16:02:01 -06:00
Cody Cutrer 801d9b2778 remove unused sis_data columns
Change-Id: I43ebd24cb76181b1dfb885d1ace5f89cb9b9978b
Reviewed-on: https://gerrit.instructure.com/5807
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-09-26 13:44:05 -06:00
Cody Cutrer 18440ed810 remove never-used column and index
Change-Id: I6ba75de79e35e5b7789aac76c45768d312226646
Reviewed-on: https://gerrit.instructure.com/5392
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-14 09:15:11 -06:00
Cody Cutrer 24485249b1 remove unused columns from courses
Change-Id: I064fbde82894820bacc8604779a75c8aeb060092
Reviewed-on: https://gerrit.instructure.com/5633
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-09-13 12:53:03 -06:00
Cody Cutrer 786212ffaa drop role_overrides.context_code
Change-Id: Ic4ee40132017c2a7d884cc9c08cb59cd98dde2f4
Reviewed-on: https://gerrit.instructure.com/5386
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-13 10:16:23 -06:00
Zach Wily 53b731a079 run course copy asynchronously in a job; fixes #5422
Change-Id: Ie75a95203b8187c3a7cf37966f84179ce4110118
Reviewed-on: https://gerrit.instructure.com/5461
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-08 08:23:47 -06:00
Cody Cutrer fe85551af6 migration to repair duplicate discussions
refs #5078

Change-Id: I12d0a952d860cacb81d2f4c4c0b2c40dc67d2af6
Reviewed-on: https://gerrit.instructure.com/5023
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-09-06 15:05:15 -06:00
Cody Cutrer 7c29906c6a remove dead columns and indexes
Change-Id: I0057f63589f85254ceec73c7ae67494d25e0a7d2
Reviewed-on: https://gerrit.instructure.com/5391
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-06 09:20:58 -06:00
Cody Cutrer 3d47925bfe drop mailboxes table
Change-Id: I7b614d42f5c8d5538bc2a36a42e9d1980cd3a379
Reviewed-on: https://gerrit.instructure.com/5385
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-09-06 09:20:46 -06:00
Brian Palmer 71bccbac17 eliminate next-job strand subquery, closes #5485
Change-Id: I500ea891ad67ef37702aae39c5734bed90052793
Reviewed-on: https://gerrit.instructure.com/5373
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-02 15:16:23 -06:00
Bracken Mosbacker 795d10776f clear whitespace on sis csv imports
Also clear old whitespace that was missed before this fix

closes #5448

Change-Id: I6096685223c43bfec9fd0c669c737af422687e10
Reviewed-on: https://gerrit.instructure.com/5354
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-31 18:26:42 -06:00
Cody Cutrer 2d4c9f6558 re-do reset course refs #4583
create a new course and move the sections and enrollments over, rather
than hard delete content

Change-Id: I34787b64c6983057f6203665c1bd04aa696e7ff7
Reviewed-on: https://gerrit.instructure.com/5336
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-30 11:40:40 -06:00
Jon Jensen 8714649a59 fix conversation count bug, closes #5428
simplified the logic a bit, added specs. note that CPs are never auto-
marked-as-read any more for the sender (though newly created CPs are now
"read" by default, until the first message is added by someone other
than the user)

Change-Id: I3d113fe6135d1f8c6f07b52a245a6de7d25b7f9b
Reviewed-on: https://gerrit.instructure.com/5337
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-30 11:27:54 -06:00
Jon Jensen 432283d3e7 bump question_data size, limit possible combinations. fixes #4953
Change-Id: Ic716425680c2c50a0c960d391104fc5502d4fafd
Reviewed-on: https://gerrit.instructure.com/5282
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-29 13:37:09 -06:00
Brian Palmer ba7be770fa support fractional values in grading schemes, closes #5397
this required changing the data format, so a version column is added to
the table and backwards compatibility code is included. import/export is
aware of this as well.

Change-Id: I753060a6886e3896cbfbad69d16bcc2f1310d466
Reviewed-on: https://gerrit.instructure.com/5296
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-29 12:04:28 -06:00
Zach Wily cffaa78cd9 add a few useful indexes
These were found missing by watching the log of unindexed queries.

Change-Id: I1823eeb5e5e7dfc4351ced92a5a354aac05d97eb
Reviewed-on: https://gerrit.instructure.com/5261
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-25 13:58:01 -06:00
Jon Jensen f97772ae0d fix wrong hostname in message emails
root account is now tracked as the ConversationMessage#context

this also fixes a bug where these emails didn't include the footer

Change-Id: If5db3839f65fc68625497a7c8d2ee0f0be682115
Reviewed-on: https://gerrit.instructure.com/5246
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-24 15:30:37 -06:00
Cody Cutrer caae827136 alerts, closes #4317
* Daily job to evaluate alerts
   * Spawns a new job for each root account (for parallelization).
     It could be broken down to per-course level if needed (i.e.
     if there is a *huge* root account).
   * Evaluating criteria at a course level using efficient queries.
 * UI for CRUD on alerts
   * Render existing alerts
   * Delete existing alerts
   * Create a new alert
   * CRUD for criteria, recipients, repetition
   * Validations
 * Improve instructure_helper's formErrors to support passing errors
   for specific elements
 * Improve Rails' :include to be able to :exclude an :include
   inherited from a named scope
 * Specs!!
 * Note that we want to slowly roll this out, so there is a setting on
   root accounts to enable it

So I ran an alert with just an interaction criterion on a test
cluster against 50,000 courses, and it took less than 10 minutes
without any parallelization.  That seems like acceptable
performance to me (since there are only just over 3000 courses
in production that would even be elligible to have alerts sent
right now).  Of course, that's probably skewed because I'm sure
a bunch of those 50,000 courses were essentially empty.

Change-Id: Ie028ef206c9155b9a72fb2a820f3e0e516de562a
Reviewed-on: https://gerrit.instructure.com/4799
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-24 10:19:44 -06:00
Brian Palmer c8f7529d4e oauth2 web app flow, refs #5029
accepts a redirect_uri to return the code to, in addition to the OOB uri
support. matches the redirect_uri domain host against the one stored on
the developer key.

this doesn't yet include a UI for registering developer keys.

Change-Id: I6fbfe6ff3dbd6ebea9c2f9fc5ce3e45447a1cbc8
Reviewed-on: https://gerrit.instructure.com/4963
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-23 17:27:47 -06:00
Cody Cutrer 0763c48b82 workflow_state is a string, not a symbol
Change-Id: I4d7d10ae0e33a5d84c39a35fcbb0ec21f366cf4c
Reviewed-on: https://gerrit.instructure.com/5220
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-23 13:07:36 -06:00
Cody Cutrer ba786a4508 statelessly enforce enrollment date restrictions fixes #4996
Change-Id: I978c1524518fd17bbffca73071f7b500ca79c435
Reviewed-on: https://gerrit.instructure.com/5166
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-23 12:23:22 -06:00
Jon Jensen 46fbd65c0b Merge remote-tracking branch 'origin/dev/conversations'
Conflicts:
	app/models/course.rb
	app/views/context/inbox.html.erb

Change-Id: I62c650ebd0bb20dd1f0a9a43843bf7f8d0b86c83
2011-08-20 08:22:14 -06:00
Jon Jensen ccbf57557d fix notification pref migration
Change-Id: Iae2a29bed902a4868a64032c02fae9493445fc0b
Reviewed-on: https://gerrit.instructure.com/5179
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-20 07:54:51 -06:00
Jacob Fugal b543701f17 conversation message notifications prefs
Change-Id: Ida26bebdda7991afa132cbacb3e0eef283ba2020
Reviewed-on: https://gerrit.instructure.com/5163
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-19 16:53:38 -06:00
Bracken Mosbacker b7b66f39ed allow folder paths to be longer than 255 characters
refs #5315

Change-Id: I7423b1429242d221c9a3a634384382ba7c26480e
Reviewed-on: https://gerrit.instructure.com/5134
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-08-18 08:59:59 -06:00
Jacob Fugal 281311b03b submissions.has_admin_comment
Change-Id: Ied0b1dc0763c2a401a65ce3e58284695f538e9b5
Reviewed-on: https://gerrit.instructure.com/5129
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-08-17 17:58:12 -06:00
Jacob Fugal 839755146e attachments and media comments for new conversations
Change-Id: Ie3c9a16a78747a58504d5279a6a996c2a150d567
Reviewed-on: https://gerrit.instructure.com/5010
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-17 17:00:36 -06:00
Jon Jensen 8360ebdd06 typo fix
Change-Id: I8e2c52e5e9081e98ab0415bb52930ed05fb09f34
Reviewed-on: https://gerrit.instructure.com/5126
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-08-17 14:27:42 -06:00
Jon Jensen d2f04c94da submission comment inbox_item cleanup
Change-Id: Id16c68de3d90f56285ad0dcdb785746f713f5ae3
Reviewed-on: https://gerrit.instructure.com/5123
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-08-17 14:02:42 -06:00
Jon Jensen a4177f4c90 de-dup context_message_participants
Change-Id: Ia6f2a6f363530f11a343a68360a1b9e37ecdfe55
Reviewed-on: https://gerrit.instructure.com/5120
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-17 12:21:59 -06:00
Jon Jensen 02f644a368 some migration speedups
Change-Id: Iaa2e3e88193b428001e3861bd0210a493f45e561
Reviewed-on: https://gerrit.instructure.com/5112
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-17 07:05:40 -06:00
Jon Jensen 44f27185cc fix index typo
Change-Id: I26f9dc0750207e0cc43d799bb7a8aa8f85b97abe
Reviewed-on: https://gerrit.instructure.com/5111
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-17 01:14:56 -06:00
Jon Jensen 871086c4c4 performance fix for mysql
Change-Id: I2060aba5addd284603ab3a4669464344804101fe
Reviewed-on: https://gerrit.instructure.com/5110
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-16 23:10:17 -06:00
Jon Jensen 8e0bc399ae context_message -> conversation migration
Change-Id: Ic2f2543ead4eb69fdfd01c59cc19d0bc8e1c977a
Reviewed-on: https://gerrit.instructure.com/5104
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-16 21:21:27 -06:00
Jon Jensen f5c5292b3f add columns for media comments so the user can be the context
also fixed some migrations

Change-Id: I8067f9d51328baaf566d32ea054f77bcead185dc
Reviewed-on: https://gerrit.instructure.com/5094
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-16 21:14:08 -06:00
Jacob Fugal 0cc2f48b32 Merge remote-tracking branch 'origin/stable/2011-08-20' into dev/conversations
Conflicts:
	app/controllers/context_controller.rb
	config/assets.yml
	spec/integration/files_spec.rb
	spec/models/user_spec.rb

also removed test "ContextController GET 'inbox_item' should exclude
recipients if protect_recipients" since ContextMessage inbox items
aren't used any more on this branch.

Change-Id: I99d0e4914cb1bf9617993c1cb1afdbca0e9ba32f
2011-08-16 15:45:39 -06:00
Cody Cutrer 6a65bf5b4e add setting for hiding total in grade summary
closes #4623

also fixes the UI for "what-if" score showing when you really can't
use them

Change-Id: I19a5f41512e0d162a78c10b0c7c23f22624b6af0
Reviewed-on: https://gerrit.instructure.com/5030
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-08-11 16:43:56 -06:00
Jon Jensen a641bc4112 integrated new messaging design, added forward functionality
Change-Id: I60a528b72b8b7c5569b9c97d3c8de82f75d81bcc
2011-08-10 16:24:16 -06:00
Jon Jensen a6b85efd4d new messaging ui
Change-Id: If666ce11de3582fc45b911e7c1b5f7386496a108
Reviewed-on: https://gerrit.instructure.com/4106
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-07-29 10:16:17 -06:00
Jon Jensen bfd41381f0 Merge remote-tracking branch 'origin/master' into dev/conversations
Conflicts:
	app/models/user.rb

Change-Id: I0deccd885436ae570c423c7dbf4fb570e223671f
2011-07-20 10:06:34 -06:00
Jon Jensen 5e66286c14 locale detection and selection, refs #4994
Change-Id: I0f1e50d912ba7ac81b9ceb3ae95baaba3a12425b
Reviewed-on: https://gerrit.instructure.com/4661
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-07-20 09:24:55 -06:00
Zach Wily 4cf56a75b1 finish conversion of storage_quota to bytes from MB
At this point, nobody should be writing quotas as bytes anymore, so we mass
convert the remainder to bytes and get rid of the backwards-compatible code.

Change-Id: Ic5d6f8c8eaed947aef48dd7b1da348158f4ea2a4
Reviewed-on: https://gerrit.instructure.com/4276
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-07-19 09:28:59 -06:00
Cody Cutrer f3c5cd2807 record real_user in page_view fixes #5013
Change-Id: Ifa29fee1abeff0c318113c57167e08fffdfbf65a
Reviewed-on: https://gerrit.instructure.com/4611
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-08 11:54:48 -06:00
Brian Palmer 248f989406 remove a now-unused stream_item_instances index, closes #4586
Change-Id: I6861235c11e4fd30cfa7e677fd2da2bd7aca78c4
Reviewed-on: https://gerrit.instructure.com/4572
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-07-06 12:56:34 -06:00
JT Olds 3683a8d4d9 refactor abstract courses stage 2
add in refactored abstract courses

Change-Id: Ifce691c9dbc4452f39cab3364d8538792f8a1803
Reviewed-on: https://gerrit.instructure.com/4093
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-06-27 11:01:06 -06:00
JT Olds 5cd6d3b679 make non-sis crosslisting sticky
if a user crosslists via the ui, we don't want the SIS to blow away those
changes. fixes #4840, refs #4815

Change-Id: Ia3f844b3a33d9c9a6e9433dc79ce74e433f1f389
Reviewed-on: https://gerrit.instructure.com/4162
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-16 08:42:46 -06:00
Brian Palmer 929bd2fa02 optimize delayed jobs failed jobs, strands, and held jobs, refs #4792
To simplify the queries done on jobs:
  * failed jobs now go in a separate table
  * jobs that go past their max_run_time don't immediately get re-run.
    instead a periodic job goes through every 5 minutes and unlocks
    expired jobs
  * strand performance is much improved
    * we filter out jobs that can't be run because of strand
      restrictions completely in the database query now
    * better indexes help with these queries and the sub-select

Change-Id: Ida494da2fcec409bff330b7676c9a6b9413b3a06
Reviewed-on: https://gerrit.instructure.com/4163
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-13 12:49:46 -06:00
Jon Jensen b90efd5bab Merge remote-tracking branch 'origin/master' into dev/conversations
Change-Id: I583f201dbdcb6d01910f110fffaa36808d39b27f
2011-06-10 16:11:41 -06:00
Brian Palmer b4620b8704 Revert "modify strand sequencing strategy, close #4792"
We're re-visiting this for more awesomeness.

This reverts commit bbf0721c08.

Change-Id: I485a657ea6d5004985a1a6055458b63bf35eeb2d
Reviewed-on: https://gerrit.instructure.com/4155
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-10 15:32:47 -06:00
Brian Palmer bbf0721c08 modify strand sequencing strategy, close #4792
Instead of advancing the job's run_at, we try to avoid selecting the
strand at all. We only move the job's run_at forward if a previous job
on the strand requires it (since strand order is determined by job id,
not job run_at).

Change-Id: I005eaa7452ea7e0f89dafef1dcf50a785c24f796
Reviewed-on: https://gerrit.instructure.com/4098
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-10 13:35:44 -06:00
Brian Palmer d17dfcd883 add groups/group_memberships to sis csv import, closes #4247
Change-Id: I49fd646c8f4ce9c5d3fa8f9b1a7ba2e0a6d84e9d
Reviewed-on: https://gerrit.instructure.com/4034
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-06-03 15:17:08 -06:00
Brian Palmer 1dd7454e47 add root_account relation to groups, refs #4247
This will be necessary for looking up groups by SIS ID.

Change-Id: I9282d6377d846a6659210348884088c4f6e36028
Reviewed-on: https://gerrit.instructure.com/4025
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-03 10:45:34 -06:00
Brian Palmer 50c4687c84 oauth 2 requests via access tokens
Added support for oauth 2 API requests.  HTTP Basic
only works for Canvas-auth and LDAP accounts, but
oauth 2 will also work with SSO accounts.  Also added
ability for users to create access tokens from the
profile page.

Change-Id: I13581b4e77bfa77bf11dbb732900012dd1e50ede
Reviewed-on: https://gerrit.instructure.com/3775
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-02 09:15:11 -06:00
Brian Palmer b7bd537fb0 optimize delayed jobs table indexes, closes #4736
I also removed the "unlock this job if locked_by = worker_name" logic,
since we don't support persistent worker names anyway, so all it
accomplished was slowing down the query.

Change-Id: Ic24ad0903d2d1343e26716cf99efdd3d79ccf2bd
Reviewed-on: https://gerrit.instructure.com/3967
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-01 10:32:57 -06:00
JT Olds c63bd9c558 keep crosslisted course data up-to-date via sis imports for original course
Change-Id: Ibfbc5a22c8778bd5188505812f3f5abbdd807578
Reviewed-on: https://gerrit.instructure.com/3652
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-05-31 13:03:05 -06:00
Cody Cutrer c3531f7d43 explicitly version submissions refs #4189
Extend simply_versioned to do explicit versioning, meaning keep
the last version up-to-date on save, but only create a new version
when explicitly asked to.

Change-Id: I922dcd5d6fe559a5a656c452131b535f55a2e3fa
Reviewed-on: https://gerrit.instructure.com/3894
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-05-31 11:14:45 -06:00
Brian Palmer d3d6a266cf remove question id from data on clone, fixes #4684
Change-Id: I1ba23dfe1e20b33503b40711098ea7d329a5aba6
Reviewed-on: https://gerrit.instructure.com/3880
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-05-26 16:14:01 -06:00
Cody Cutrer 326f249679 allow reports to have parameters. refs #4315
Change-Id: I03e6a846f3d2dea38e662e4c784d218ed63499db
Reviewed-on: https://gerrit.instructure.com/3858
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-25 19:39:12 -06:00
Brian Palmer 04d36dcdf5 support batch mode for sis imports, refs #4397
In this mode, any courses, sections or enrollments that aren't
referenced in the sis import will be deleted.

This is the back-end piece, support in the UI and API are coming next.

Change-Id: Ica634f9fa7008ef7b612c4ea43163792f5d54fa5
Reviewed-on: https://gerrit.instructure.com/3768
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-23 09:52:56 -06:00
Brian Whitmer 70e984bff6 grading standards improvements
- can attach a grading standard to a course
- interface for managing standards at the course
  and account level
- added final grade to gradebook page
- added final grade to student grades page
- added final grade to gradebook csv export

fixes #3868

Change-Id: I555b9f66b621d8967e893e50a671748267da9373
Reviewed-on: https://gerrit.instructure.com/3025
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-21 19:20:34 -06:00
Jon Jensen 7e9183b256 models and controllers for new messaging, refs #3977
Change-Id: Ida82491d0161f13516baf55625ccce71d1b4036c
2011-05-19 16:21:32 -06:00
Brian Palmer 68a1e6d29f Merge branch 'delayed_jobs'
Change-Id: I7a9f1eae3d6177e61e53a48ea5818203f82067bf
2011-05-19 13:02:58 -06:00
Brian Palmer 417f62c3c1 add strand support to delayed jobs, refs #4226, closes #4415
Change-Id: I3d439c834d9daa29ffda2460256e9e04048c4e3c
Reviewed-on: https://gerrit.instructure.com/3684
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-05-19 10:51:01 -06:00
Brian Palmer 8d76be0b8c hiding stream items on the dashboard, closes #4387
This is permanent, if a stream item is updated it doesn't re-appear on
the dashboard. This is done by marking the stream item instance as
hidden, which means adding the hidden field to the two indexes.

Change-Id: Ifa544cef4ea2d46f4214e8317af4c9e3baed76eb
Reviewed-on: https://gerrit.instructure.com/3603
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-17 07:57:01 -06:00
Brian Whitmer cc81de2d43 better support for disabling plugins
There wasn't a good way in the interface to
disable a plugin other than the manually go through
and empty out all the text fields.

refs #4194

Change-Id: Ia095160323c907a43fb98f4f3fe85f1babf7eebc
Reviewed-on: https://gerrit.instructure.com/3544
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-05-14 23:52:04 -06:00
Brian Palmer b657f4e959 generate an error report for all errors, not just some of them
refs #4487

This consolidates our ErrorReport class with our ErrorLogging mechanism,
it's all in ErrorReport now and you call ErrorReport.log_error or
ErrorReport.log_exception to both create an ErrorReport object, and call
the hooks similar to what ErrorLogging did so that plugins for other
error handling mechanisms can be injected.

ErrorReport has a category field now, similar to how ErrorLogging used
to take a type. the /error_reports UI can filter by category.

The plugin interface was designed with Hoptoad integration in mind, but
it should be pretty general.

Change-Id: I59f7a0d44cf4b6215ad13ff92d30e1d1af607b74
Reviewed-on: https://gerrit.instructure.com/3577
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-05-11 10:36:56 -06:00
JT Olds 1b900f660e update existing sis communication channel instead of creating new ones. fixes #4538
Change-Id: Idf6e03ee14b2f93e4393a36229305dcdb3da14e8
Reviewed-on: https://gerrit.instructure.com/3585
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-05-11 10:34:08 -06:00
Brian Palmer 4465b1fc7b create error report locally on javascript errors, refs #4487
Change-Id: I2cb09c7f7d9a5ffe9d5286da36da9ddbc999ed86
Reviewed-on: https://gerrit.instructure.com/3575
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-11 08:47:49 -06:00
Brian Palmer 6bec0722ad thumbnail support when using local storage, closes #4500
Change-Id: Ib11b2513e64179637ef3cce4f2bc4eb0b9c4cd68
Reviewed-on: https://gerrit.instructure.com/3492
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-06 08:11:18 -06:00
Brian Palmer d6dd066e3d increase limit of content_migrations.migration_settings to 500kb
fixes #4477

long-term we should probably move a lot of this data out of this column.

Change-Id: Ib2bc853eb7c3fe4d3c79240d3a5a491c1b2e41fc
Reviewed-on: https://gerrit.instructure.com/3471
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-05-04 08:27:11 -06:00
JT Olds 4457002281 sis grade publishing backend
Change-Id: I7338cae9275320aa6900758df22a3a8ac6a3718d
Reviewed-on: https://gerrit.instructure.com/3108
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-04-27 16:23:00 -06:00
Brian Palmer a693f310fe add support for per-job max attempts, refs #4311
Change-Id: I014c5b62eca7b8093a0ab5771b150e9cf9778e2f
Reviewed-on: https://gerrit.instructure.com/3272
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-04-26 10:38:38 -06:00
JT Olds 33854cbc4b renaming last_course to nonxlist_course and changing crosslisting semantics
Change-Id: I0b017d4506c54151f34c50c28754b6e1c1a46691
Reviewed-on: https://gerrit.instructure.com/3171
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-04-21 15:43:39 -06:00
Zach Wily f122fa7e28 adding ldb requirement for viewing quiz results
Change-Id: Id011290fbd5d8ad791b016450671c88c7cba30bc
Reviewed-on: https://gerrit.instructure.com/3152
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-04-20 10:11:21 -06:00
Brian Palmer 27adf9b16a Merge branch 'ims_cc'
Change-Id: I7fc8590ab50d9ec062fd3cf609aa11f034ed582f
2011-04-18 10:20:36 -06:00
Bracken Mosbacker bb8bc24cd7 start canvas cartridge importing
started the framework for importing the canvas flavored
common cartridge packages. There is also some minor
refactoring of the export step to allow for easy testing
of both exporting and importing

course settings, assignment groups, and external tools
are imported and tested with this commit

refs #3396

Change-Id: I4e8a2ebfc9df7e31f8859b189fea23f9584d7ef4
Reviewed-on: https://gerrit.instructure.com/3042
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-04-18 08:09:16 -06:00
JT Olds 6ec333f475 xlist sis importing tests with fixes
Change-Id: Ied4b5fe75984bd399f294041e80935bd86671e0e
Reviewed-on: https://gerrit.instructure.com/3112
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-04-15 15:36:18 -06:00
Cody Cutrer 86f61efc3a ui and db migration to add voice comment to contextmessage
Fixes #3535

Change-Id: I0e299397c003d5a7fa24a72ffc848d0b7b6694ea
Reviewed-on: https://gerrit.instructure.com/3081
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-04-15 14:01:17 -06:00
Bracken Mosbacker fc4cc9ff46 added ui for course exports
refs #3396

Change-Id: I07c30535e042dada7c7d4174a7bb8148b7f6b1fb
Reviewed-on: https://gerrit.instructure.com/3039
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-04-15 10:27:14 -06:00
Brian Whitmer 28dfe1d8cb migration process for moving to new kaltura instance
This commit makes it possible to migrate media collections
from one Kaltura instance to another.  It adds an
old_media_id column to media_objects that can be used
as a fallback.  It also adds a mechanism for creating bulk
upload csv's to migrate media objects from the old
system to the new, while catching and preserving the
old id so that any links inside of content will still work
even if they have the old id.

refs #4083

Change-Id: Ifa213fd348a50ebd7e7ac7068d8eff40b23747d1
Reviewed-on: https://gerrit.instructure.com/2902
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-04-13 22:50:30 -06:00
Jon Jensen ce0040958e BigBlueButton integration, refs #3319
Change-Id: Iaa38c753592f1b39d272487b3c0f231646168014
Reviewed-on: https://gerrit.instructure.com/2962
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-04-06 16:15:30 -06:00
Jon Jensen c6b7a45ad8 string validations/fixes, closes #4154. wiki fixes, closes #3973, #4168
proactively found and fixed varchar(255)'s where we relied on mysql's
silent truncation. added validations for places where we want to
enforce these limits

made it so you can reuse titles/urls of deleted wiki pages, and added
validations to ensure sane urls and prevent orphaned pages

Change-Id: I15bcc0c7a751efba1a0f7548e9989ad2ea1792bf
Reviewed-on: https://gerrit.instructure.com/2935
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-04-05 11:22:50 -06:00
Jon Jensen 4335a882d1 allow arbitrarily long certificate fingerprint
Change-Id: Iae183171310934beca98e25b7ad1da78f840ddc1
Reviewed-on: https://gerrit.instructure.com/2907
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-03-31 08:57:54 -06:00
Jon Jensen eeb37709cd properly support attachments > 2GB, another string -> text fix
Change-Id: Id0fe3304361ef631098322b398c70d4f437b91de
Reviewed-on: https://gerrit.instructure.com/2888
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-03-30 14:22:15 -06:00
Jon Jensen 9d62c0ccbb change some columns from string -> text, refs #4136
Change-Id: I2fede0eddcb3749e021b06a139fb35e3bb624e70
Reviewed-on: https://gerrit.instructure.com/2867
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-03-30 09:19:13 -06:00
Brian Whitmer 5e9f3eaba7 option to require initial post before seeing replies
Teachers can specify that before students see any
messages in a topic they need to post at least once
in the topic themselves.  This is used for
assignment topics or to help encourage students
to think for themselves instead of just posting
"what he said".

fixes #3871

Change-Id: I946b71ec47bfe135f06faff68598c6f19c088a27
Reviewed-on: https://gerrit.instructure.com/2370
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-03-29 22:56:45 -06:00
Brian Whitmer 76bfff3157 topic podcasts
Each topic can now have its own podcast stream.  Teachers
have to manually turn on the podcast for the topic, and
can specify whether student comments show up in the stream
or not.

fixes #3538

Change-Id: I19b1b44fc2eec864cfeb298163ef34a0b0181067
Reviewed-on: https://gerrit.instructure.com/2369
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-03-28 14:32:16 -06:00
Brian Palmer 97a28cdc20 add position to the communication_channel indexes
We usually sort by position after searching by user/pseudonym.

Change-Id: I16ab104bdd42d48a50038b197b60e52b296926eb
Reviewed-on: https://gerrit.instructure.com/2828
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-03-25 16:16:46 -06:00
Brian Whitmer b7f1d5ae18 align question banks to outcomes
Question banks can be aligned to outcomes that
are part of the same context.  Whenever students
take a quiz with questions from the bank they'll
get evaluated for the linked outcomes based on
the points they got for each bank question.

Also fixed a bug which may or may not have existed
before this commit that unexpectedly deleted quiz
submissions when a user tried to re-take a quiz.

refs #3317

Change-Id: I744af3915672a5e260b078503e0bc648c238eca9
Reviewed-on: https://gerrit.instructure.com/2641
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-03-25 15:39:56 -06:00
Jon Jensen 22aadd94de hairtrigger bump, new migration. fixes postgres trigger bug
Change-Id: Id949099be3605c2dd6dec79d96c546f6b366bc85
Reviewed-on: https://gerrit.instructure.com/2816
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-03-25 12:10:36 -06:00
tom metge 54ab76f2a2 fix typo in migration script
Change-Id: Idad10e62eaf5c12aaff74095233d1a93af586bbb
Reviewed-on: https://gerrit.instructure.com/2789
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-03-23 18:02:23 -06:00
Brian Whitmer 9d131ea836 basic lti support
- external tools can be added on the course/account
  settings page
- external tools can be linked to from within modules
- clicking a tool in a module will load a new page
  with the tool embedded in an iframe
- see context_external_tools for standard procedures
  on retrieving settings for a specific link

fixes #4013

Change-Id: I8aa1934f8deac9af26d74036162b34fd1c4242e1
Reviewed-on: https://gerrit.instructure.com/2601
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-03-23 16:58:11 -06:00
Jon Jensen ef72d6fde4 Merge branch 'dev/postgres' into master
Conflicts:
	config/initializers/active_record.rb

Change-Id: I625080d12e07122351e22d15b0864572c2ea09c5
2011-03-23 10:56:46 -06:00
Jon Jensen 63d09992d4 assignments.needs_grading_count counter to speed things up, closes #3945
Change-Id: I3748a7e0551e49720d06be302df29a8e33528007
Reviewed-on: https://gerrit.instructure.com/2573
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-03-23 10:36:15 -06:00
Jon Jensen f745f40073 Merge branch 'master' into dev/postgres
Conflicts:
	app/models/user.rb
	config/initializers/active_record.rb

Change-Id: Idc3b52dad873146efbb9268ecac28cac840f115e
2011-03-22 16:23:04 -06:00
Brian Palmer ac5ad3f7a1 add infrastructure for supporting lockdown browser plugins, refs #3129
Change-Id: Ib9e9129bef7f5a8efe4a55e2fc85422469b632dc
Reviewed-on: https://gerrit.instructure.com/2745
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-03-22 14:51:01 -06:00
Zach Wily 23dfd541a4 add created_at to the page_views index on account_id
Change-Id: I2a23a1f5416eae7523260b963fa80b64c30b07b2
Reviewed-on: https://gerrit.instructure.com/2729
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-03-22 08:12:11 -06:00
Brian Palmer da5183f794 add stream_item_instances index to optimize deletes
Change-Id: Icacb4d89f04876b35de77c9c977d477f266f6447
Reviewed-on: https://gerrit.instructure.com/2709
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-03-21 09:54:25 -06:00
Zach Wily 85c4f6da0a make viewed_user_ids on context_messages bigger
This was getting silently truncated at 255 characters, which was causing some
messages to always show up new for certain people. Now it's the same length as
recipients, which makes sense.

Change-Id: I644cc4f143b167d13ba4bb4e96f56b648e84a661
Reviewed-on: https://gerrit.instructure.com/2649
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-03-15 08:56:38 -06:00
Jon Jensen c2a0157cec a couple base migration tweaks to facilitate mysql -> pg
Change-Id: Ie98c9cb2e7ac178c256795837b6517a01cd337b0
Reviewed-on: https://gerrit.instructure.com/2625
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-03-14 08:05:24 -06:00
Brian Palmer 464ce2fe64 remove errant db column in the initial migration
If anybody already migrated and has this column, it won't hurt anything.

Change-Id: Id9dfbfa358f75e3b353a014a451017bd9b2734b9
Reviewed-on: https://gerrit.instructure.com/2623
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-03-11 16:09:05 -07:00
JT Olds dd6185488d adding account field to course section model
Change-Id: I1a3d54c9f64612afc88da987e40e4974f2af71cd
Reviewed-on: https://gerrit.instructure.com/2515
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-03-08 15:14:49 -07:00
Brian Whitmer 8ba6787e01 allow decimal fudge points for quiz submissions
fixes #3932

Change-Id: I802e441db315ae31b28bc3e0b52ac4f3f38d8c49
Reviewed-on: https://gerrit.instructure.com/2494
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-03-03 12:10:55 -07:00
Brian Whitmer 41c9f12988 enforce term/course/section start and end dates
before we were recording these values but not doing
anything about it.  This commit starts scheduling
delayed_jobs to activate/conclude enrollments
in the background when dates pass.

it does not conclude/publish courses/sections
automatically, though.  if we want that to be
automated based on dates then I think we should
do that in a separate commit.

fixes #3356

Change-Id: Id94356fbc5b82196dd041fdb250607a7633cee9f
Reviewed-on: https://gerrit.instructure.com/2431
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-03-01 13:47:12 -07:00
Brian Whitmer 23404fe1c1 account-level notifications
account admins can create "Alerts" from the account
settings page that show up as sticky messages on the
user dashboards.  The alerts stay until the end_at
date, or until the user clicks the "close" link.  If
you add an alert to the site_admin account then it's
considered a global alert and will go to all root
accounts.

fixes #3738

Change-Id: I47e6eaf717145af24d847d4387e0ad5c36800094
Reviewed-on: https://gerrit.instructure.com/2293
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-16 21:34:05 -07:00
Brian Whitmer 15f6d0e1b8 ip filtering for quizzes
Teachers can specify an IP filter for a quiz, which
means students are only allowed to take the quiz
when their current computer's IP address matches
the specified filter.  The initial request to start
taking the quiz and any subsequent requests to
backup or submit the quiz attempt must all come
from a valid IP address.

Admins can pre-define named filters
so that teachers don't have to manually enter
filters all the time.  They can instead find them
from a provided list.

Change-Id: I59b6d8ddd31409fc9bd150ed695935ad2f458f86
Reviewed-on: https://gerrit.instructure.com/2167
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-11 22:16:47 -07:00
Brian Whitmer 89f5934bae quiz moderation
- added a moderation link on the quiz page
- moderators can see current quiz results for students
- moderators can add time to a current quiz attempt
- moderators can manually unlock a quiz for a student,
  which means the student can take the quiz even if
  it's locked for everyone else
- moderators can give a student extra time for every
  subsequent attempt of a quiz
- moderators can give a student extra attempts on a quiz
- moderators can also update these settings for multiple
  students at the same time

Change-Id: I31c34097fc6e19d8c6e377a6059568e591ffbab8
Reviewed-on: https://gerrit.instructure.com/2166
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-11 22:08:42 -07:00
Brian Palmer 39cca91ab4 update delayed_jobs and list most popular job types in UI
closes #3740

Change-Id: I08085fac1f4dba5aaadf61d2d55269a7085d8094
Reviewed-on: https://gerrit.instructure.com/2197
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-08 14:12:52 -07:00
Bracken Mosbacker 11f5e44e49 allow migrations to work across job servers
migrations were previously limited to being on the same
job server, now the exported data is uploaded back to
canvas and downloaded again for the importing step

closes #3519

Change-Id: I24deaf4bc1811c4b66b1a2cf79f311ffc1fa9906
Reviewed-on: https://gerrit.instructure.com/2178
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-07 15:07:49 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00