Commit Graph

42 Commits

Author SHA1 Message Date
Jeremy Stanley 6b0051494a copy-folder and copy-file endpoints
test plan:
 0. render API documentation
 1. note the new Copy Folder and Copy File endpoints
    in the Files API documentation
 2. exercise these endpoints to copy folders and files
    (a) inside a course
    (b) from user files into course files
    (c) from course files into user files
 3. confirm that, when copying a folder to a destination
    that already includes a folder with the same name,
    the new folder is renamed
 4. confirm that, when copying a file to a destination
    that already includes a file with the same name,
    and on_duplicate is not specified, the call returns
    an "already exists" error
 5. confirm that, when copying a file to a destination
    that already includes a file with the same name,
    and on_dupliate _is_ specified, the parameter is
    honored (to either overwrite or rename)

fixes CNVS-17812

Change-Id: Ibf32f9b568bfe8e239403f9064ae3a9d69806aa4
Reviewed-on: https://gerrit.instructure.com/48185
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-02-09 22:13:55 +00:00
Dan Minkevitch 7424223755 Fixes bug with iterator going beyond two digits
fixes CNVS-18146

Test Plan:
* Enable "Better File Browsing" feature flag
* Go to any course's Files page as an admin
  or teacher
* Click the "+ Folder" button, then press enter
  on the input (leaving the folder's name blank)
* Repeat the above step 10 or more times
* The folders created should be named "New Folder",
  "New Folder 2", "New Folder 3", etc, and should
  continue past "New Folder 10", "New Folder 11",
  "New Folder 12", up to however many you created

Change-Id: I151c9baa8b6fd6176c434144f10165f23a600a22
Reviewed-on: https://gerrit.instructure.com/47709
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-01-23 21:45:33 +00:00
Dan Minkevitch 80ec21ab17 Adds an iterator to duplicate file names
When a file is uploaded via the WikiSidebar,
it can be uploaded multiple times with the same
name.  This commit adds an iterator to uploaded
files so that if the file has already been uploaded
or a file with the same name already exists,
an iterator is added to the newly uploaded file
to prevent duplicates (e.g. file.jpg, file-1.jpg, file-2.jpg).

fixes CNVS-17361

Test Plan:
* Enable "Better File Browsing" feature flag
* Go to any course's Pages section (as admin/teacher)
* Create a new page or edit an existing one
* On the create/edit page, select the "Files"
  tab from the WikiSidebar on the right
* Click "+ Upload a new file"
* Select some file, then upload it
* Upload the same file again, multiple times
* Go to that course's Files page
* In the course files (or wherever you chose to
  upload the file), the file you uploaded should be
  there, along with additional files with the same name
  followed by an iterator (e.g. yourfile.png, yourfile-1.png,
  yourfile-2.png, etc)

Change-Id: Iaa1307305659bf3b1b38991f0981ac6e48423209
Reviewed-on: https://gerrit.instructure.com/45550
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2014-12-10 22:26:31 +00:00
Dan Minkevitch bbc1327313 Changes 'folder' to 'New Folder'
For New Files.  Any new, unnamed folder
will now be named 'New Folder' instead
of just 'folder'.

closes CNVS-17122

Test Plan:
* Enable "Better File Browsing" feature flag
* Go to any course's Files page as a teacher
* Click the "+ Folder" button
* Press enter on the text input that becomes
  focused, leaving it blank.
* The folder created should be called "New Folder"
* Create another new folder
* That folder should be named "New Folder 2"

Change-Id: If58d0979731a82852b39cf5c443fd29aa5e277be
Reviewed-on: https://gerrit.instructure.com/45155
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2014-12-03 00:09:47 +00:00
Dan Minkevitch caf46091fb Fixes duplicate folder creation bug
Blank folder names are now named "folder" by default.
A folder created with the same name as one that already
exists now attaches an iterator (e.g. "folder 2")
A folder cannot be expanded if the name hasn't been set yet.

fixes CNVS-16842, CNVS-16910

Test Plan:
1. Enable "Better File Browsing"
2. Go to any course's Files page
3. Click the "+ Folder" button to add a new folder
4. Leave the name text field blank
5. Press Enter
6. A folder should be created with the name "folder"
7. Repeat Steps 3-5
8. A new folder should be created with the name "folder 2"
9. Repeat Steps 3-5 but instead give this folder a name
10. Repeat Step 9 (with the same name you used before)
11. Two folders should exist, one with whatever name
    you gave it, and one with that same name, but with "2"
    added to it.

Change-Id: I23ea30eb0474494a6b9bc3cbcf60f560d3735d18
Reviewed-on: https://gerrit.instructure.com/44490
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2014-11-25 21:52:53 +00:00
Cody Cutrer 102fdfc849 no more dynamic finders (models)
refs CNVS-15126

Change-Id: I2996e0e262c41274c34d0ea3bfde757074416b8c
Reviewed-on: https://gerrit.instructure.com/40973
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-09-24 20:51:48 +00:00
James Williams f06611aa6e fix infinite parent folder loop
test plan:
* try to update the name for a root folder of a course
* should give an error, instead of catastrophically
 freezing your server

fixes #CNVS-14868

Change-Id: If0a1c305f3103f3bb7e17ff6ceead7db2e2173de
Reviewed-on: https://gerrit.instructure.com/39512
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-08-19 16:47:25 +00:00
Jon Jensen 5480c8fecd spec: speed up api specs
liberal applicataion of once-ler and bulk_insert helpers, reduce runtime
from 50min -> 25min

Change-Id: I07c1952c4ead0a1c6caafc389de0b9586b27dc68
Reviewed-on: https://gerrit.instructure.com/37794
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2014-07-29 16:11:16 +00:00
Cody Cutrer 1277aaae90 stabby lambda scopes for rails4
Change-Id: I34f2527471cdb4d8cab5cde426ba959baa26189e
Reviewed-on: https://gerrit.instructure.com/37151
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-07-04 02:11:56 +00:00
Nick Cloward eea4718d6b clean up calls to cached_context_grants_right?
refs: CNVS-11425

Change-Id: I0487d98b839d33a339592d312ed8ed2134c4b62e
Reviewed-on: https://gerrit.instructure.com/35528
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-06-19 18:10:51 +00:00
Nick Cloward e9595976c1 clean up permission calls for grants_rights?
refs: CNVS-11425

Change-Id: Ia0145e4b4d1da9e0f83a1845647ce203b3586057
Reviewed-on: https://gerrit.instructure.com/34280
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-06-19 18:10:30 +00:00
Braden Anderson 45d19f3003 validate types on polymorphic associations
fixes ALYT-26

test plan:
	* regression test

Change-Id: Ie93e89b842e354f1f76d75f3492145b86c79a035
Reviewed-on: https://gerrit.instructure.com/34560
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-05-28 17:05:34 +00:00
Jeremy Stanley 3ed42f27e0 make resolve_path API operate relative to course root
fixes CNVS-13260

test plan:
 - in course, group, and user context:
  - ensure /api/v1/{context}/folders/by_path alone returns
    an array containing only the context's root directory
    (usually named "course files" or "my files", etc.)
  - ensure /api/v1/{context}/folders/by_path/{path} returns
    an array containing the context's root directory
    followed by the folders in the path

Change-Id: Iecf6de0aed301041f8aa55b3d13123e0c503844e
Reviewed-on: https://gerrit.instructure.com/35352
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-05-27 22:21:11 +00:00
Anthus Williams 828981e72c define exportable attributes/associations on models
instead of passing an :exportable option to
ActiveRecord::Associations, simply define a constant
on the class containing exportable associations and
attributes. This is due to :exportable breaking
ActiveRecord, and we can't simply monkey-patch in
config/initializers because models are included in
migrations before the initializers are run

Change-Id: I11f1a6b4570c397d8e01010c517bc6efdac7afca
Reviewed-on: https://gerrit.instructure.com/33235
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Anthus Williams <awilliams@instructure.com>
2014-05-06 23:54:24 +00:00
Jeremy Stanley 7fc35e3145 add "Resolve path" to Folders API
fixes CNVS-11494

test plan:
 0. on both rails2 and rails3...
 1. find the "Resolve path" endpoint in the API docs
 2. in Course, Group, and User contexts:
   a. create some folders and subfolders
   b. use the new endpoint and confirm that
      (1) a full path such as "course files/folder/subfolder"
          returns an array containing each Folder in order;
      (2) status 404 is returned if the path doesn't exist
          (even if a partial match exists);
      (3) status 404 is returned if the requested folder or
          a parent folder is locked, the caller is a student,
          in Course context
      (4) users not authorized to access files receive a 401

Change-Id: I6438317fc8c847fa0a5c140bc9e91890d727514c
Reviewed-on: https://gerrit.instructure.com/33447
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2014-04-28 20:05:52 +00:00
Cody Cutrer 27fc32d736 put scopes that query the db for capabilities into lambdas
so that they don't try to connect to the db during initialization

Change-Id: I91616c73b0881ffa0782a7d39be47abd51436d86
Reviewed-on: https://gerrit.instructure.com/29289
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-01-31 17:46:56 +00:00
Cody Cutrer c375a63c9a fix MediaObject.refresh_media_files job for assessment questions
don't puke trying to find folders for things that don't have folders

Change-Id: Ie2291ecb4a8bf63b3c550b5c35b543bdb5257ddd
Reviewed-on: https://gerrit.instructure.com/27943
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-01-20 20:08:28 +00:00
Jacob Fugal 34893f80bd remove uses of memoize
fixes CNVS-9331

instead, as appropriate, use one of (or a combination of, if necessary):

 * instance variable caching
 * Rails.cache
 * query caching (implicit)

also:

 * remove the buggy cc.active_pseudonyms (didn't account for
   sharding) in favor of cc.user.all_active_pseudonyms
 * streamline assignments in the menu to not need to construct method
   names

test-plan: N/A

Change-Id: Id0dec60464a283985e39493b90711b32cb5cca82
Reviewed-on: https://gerrit.instructure.com/26936
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-12-06 22:03:24 +00:00
Rob Orton 9cae25c185 record when a quiz or user gets deleted
also force deleted_at to be utc

test plan
 - delete a user
 - the user should have deleted_at populated
 - delete a quiz
 - the quiz should have deleted_at populated

Change-Id: Ibf3442b832f648d754ac9959f053570bc8c06a19
Reviewed-on: https://gerrit.instructure.com/25585
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2013-10-29 23:07:12 +00:00
Jacob Fugal 4520f0043e use rails3 style validate/before_validation
rather than rails2.3 style validate_on_* and before_validation_on_*

fixes CNVS-8752

test-plan: (in script/console)
 - initialize a discussion entry (not yet saved)
 - set entry.depth to DiscussionEntry.max_depth + 1
 - try to save it; should raise an error about the maximum depth
 - set entry.depth to nil
 - save it; should not encounter an error
 - check entry.depth; should be 1
 [this next part seems weird to me, but follows the letter of the code]
 - with the same, no-longer-new entry, set entry.depth to nil
 - try to save it; should not encounter an error
 - check entry.depth; should still be nil

Change-Id: Ia56a7ab17d36698e59fda4b520b07352d61ce02e
Reviewed-on: https://gerrit.instructure.com/24997
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2013-10-14 19:28:28 +00:00
Cody Cutrer 5051b79c0e create folder shard-safely
fixes CNVS-8069

test plan:
 * have a user on one shard. use the API to upload a file to
   a specific folder for that user
 * arrange to have a user on another shard with the same local
   id (either by creating the user in script/console and assigning
   the id before saving, or just creating both users on a fresh
   shard each, so they both end up as id 1)
 * use the API to upload a file to the second user *with the same
   path*
 * it should not error out due to foreign key constraints

Change-Id: I06724e148df82d15629b4133a0a5c75bdf32caf7
Reviewed-on: https://gerrit.instructure.com/23991
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-09-12 20:19:51 +00:00
Cody Cutrer d3f3ddae37 add foreign keys part 5
refs CNVS-6202

Change-Id: I482bc4d2dbb95e1962ce4a7dacd95351bfd0ed7c
Reviewed-on: https://gerrit.instructure.com/11534
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-08-06 22:37:54 +00:00
Cody Cutrer 8c94e53dc7 arel-ify scopes
s/named_scope/scope/g

refs CNVS-4707

Change-Id: I930d229fc9985c7c0096a0f4888933addd4f3aee
Reviewed-on: https://gerrit.instructure.com/18834
Reviewed-by: Duane Johnson <duane@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-04-01 21:57:16 +00:00
James Williams 67b9f83722 don't allow multiple root folders for courses
change the way we create the default course root folder
("course files") to use a atomic sql statement

this should prevent suspected race conditions from creating
multiple root folders for a course, as this causes the
files page to become unusable

test plan:
* Unfortunately there seems to be no consistent way to
 reproduce the errors, and thus no consistent way to
 test that this fixes the error

Change-Id: I223a2b230921752ef1175c82adfdd854e1331668
Reviewed-on: https://gerrit.instructure.com/17014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
2013-02-01 16:02:16 -07:00
James Williams 75b8817510 don't show hidden/locked files/folders to students in wiki sidebar
checks for locked/hidden status for the files and images tabs
on the wiki sidebar and doesn't show them to students

test plan:
* create a folder
 * lock it
 * or hide it
 * or disable the files navigation tab
* should not see the folder on sidebar as a student

* create a text file
 * lock it
 * or hide it
* should not see the file on sidebar as a student

* create an image file
 * lock it
 * or hide it
 * or disable the files navigation tab
* should not see the file in the images tab as a student

fixes #CNVS-2

Change-Id: I8d17a3c9b19d275a242c74a593736b17905e5ba9
Reviewed-on: https://gerrit.instructure.com/16511
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-17 13:19:01 -07:00
Jake Sorce eb49f9b1c8 add data validation to new folder creation, fixes #10906
test plan:
  1. login as a teacher
  2. go to a course
  3. click on files on the left nav
  4. click 'Add Folder'
  5. try to give it a name over 255 characters
  6. text stops at 255 characters, press enter to add
     the folder
  7. folder is saved with no DB error

Change-Id: I1da8595350b3d0c6f23e3052e514bcb55446f141
Reviewed-on: https://gerrit.instructure.com/13982
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-10-02 15:54:37 -06:00
Jeremy Stanley 5b8524b14a Batch file notifications; closes #9012
Test plan:
(We need two users here because Canvas doesn't notify you about
files you upload yourself.  We'll call them Student and Teacher
here, but they don't actually have to be these things.)

 * As Student, enable notifications for new files in Profile.
 * As Teacher, upload a file.
 * Within an hour or so (everything about notifications occurs
   in low-priority background tasks), Student should receive
   a notification for the file.
 * As Teacher, upload multiple files.
 * Student should eventually receive a notification that
   X number of files were added.

Note that files are batched over a five-minute period; that is,
if a file is added to a course within five minutes of a previous
file, it will be counted in the same batch.

Change-Id: I09b5f497cae1d726b7aaf85824e98e69e45b0c1b
Reviewed-on: https://gerrit.instructure.com/12346
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-07-20 14:45:12 -06:00
Bracken Mosbacker c6c7247749 files/folders api
A complete api for folder and file management
Also updates the alphabetical sorting features to escape
a backslash caused errors when casting a string to a
bytea in postgres

Test Plan:
 * CRUD yourself some files
 * CRUD yourself some folder

closes #9163

Change-Id: I0b937f9273077b66ab9d6c37171bec1fcc5380dd
Reviewed-on: https://gerrit.instructure.com/12085
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-07-11 14:32:14 -06:00
Brian Palmer abe0bc7305 protect against recursive folder structures
test plan: in the file browser, try to move a folder into its own child
folder. you should get an error message, rather than a loading progress
indicator that never goes away.

Change-Id: I0e0ed12c07781b92c371068d6e47423b77f15cc2
Reviewed-on: https://gerrit.instructure.com/10952
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-05-23 14:33:11 -06:00
Jon Jensen 506ec04514 save attachments before message creation, fixes #7229
rather than proxy attachments through the conversations controller and
cause a long-running db transaction, we now just send them to the right
place (files controller, s3, whatever), and then create the message. we
now store the attachment in a special folder on the user so that they
can more easily be tracked in the future for quota management.

because we now just store one instance of each attachment, sending a
bulk private message w/ attachments should be a bit less painful.

known regression:
if a user deletes a conversation attachment from their files area, it
deletes if for all recipients. this is essentially the same problem as
tickets #6732 and #7481 where we don't let a "deleted" attachment to
still be viewed via associations with other objects.

test plan:
1. send an attachment on a new conversation and confirm that was sent
   correctly and can be viewed by recipients
2. send an attachment on an existing conversation and confirm that was
   sent correctly and can be viewed by recipients
3. send an attachment on a bulk private conversation and
   1. confirm that was sent correctly and can be viewed by recipients
   2. confirm that only one attachment was actually created, but each
      message in each conversation is linked to it
4. send multiple attachments and confirm that they were sent correctly
   and can be viewed by recipients
5. perform steps 1-4 for both local and s3 uploads

Change-Id: I7cb21c635f98e47163ef81f0c4050346c64faa91
Reviewed-on: https://gerrit.instructure.com/9046
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-02 16:39:27 -06:00
Cody Cutrer 0ce24b5887 remove unused notification categories fixes #7394
also move notifications in "new email messages" to "administrative alerts",
because that's a much better description of them

test plan:
 * go to communication preferences
 * the last one should be "administrative alerts"
 * "Files", "Private message from student", "New email messages",
   and "Context Message" should be nowhere to be found

Change-Id: I8b30d53b8137ab4b17cb436920d87331327e01f9
Reviewed-on: https://gerrit.instructure.com/8996
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-02-27 13:24:50 -07:00
Zach Wily 0e3265f26f redirect to new files with the same path as deleted files
Change-Id: I7b5e9736bc06901dde4f16a493f15e5c5f5124ae
Reviewed-on: https://gerrit.instructure.com/5038
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-08-10 20:58:30 -06:00
Zach Wily 10f8bb16b5 fix uploading profile pictures
also switched to storing profile pictures in a new folder ("profile pictures")
so that users will not see a ton of unrelated pictures.

Change-Id: Ia2fd55e1c090db886349319613a7d5ecb33805ac
Reviewed-on: https://gerrit.instructure.com/4950
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-04 16:18:31 -06:00
Cody Cutrer 7f5cc0693b optimize AdheresToPolicy
Basically, don't call a bazillion procs everytime you check_policy;
just the "given" statement.  Everything else is evaluated just once,
and cached on the class.  This does lose functionality (the ability
to access the instance inside of set_policy, and set methods), but
none of it was currently in use.

Change-Id: I736879d98beb4115a2e8c492931c755076291d08
Reviewed-on: https://gerrit.instructure.com/4665
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-07-14 13:25:28 -06:00
Jon Jensen fba0c94e4a string extraction for most i18n oddities
Change-Id: Ibdf9315b6165269af2ee0c99a27093d5abc75641
Reviewed-on: https://gerrit.instructure.com/4509
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-30 16:48:12 -06:00
JT Olds e693123f82 folder i18n
Change-Id: If8bb0ec83eb794b456e5e5912a6947192bb4a148
Reviewed-on: https://gerrit.instructure.com/4142
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-06-09 17:43:24 -06:00
Zach Wily 38ed1ce6b6 look up attachments by relative path by walking the heirarchy; refs #3382
Previously we were just checking every single attachment in the course, which
could take forever in the case of a course with many files. Now we walk the
file heirarchy, which should be much more efficient.

Change-Id: Iab131c7a41c78deff09a9b848eb5a59554f08ba3
Reviewed-on: https://gerrit.instructure.com/3808
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-05-24 09:01:51 -06:00
Brian Palmer 020a92dcf3 make "imported qti files" folder hidden by default, closes #4440
Change-Id: Ifa82c83b459422bff192442025ee99f01262ef99
Reviewed-on: https://gerrit.instructure.com/3497
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-05-06 08:11:32 -06:00
Jon Jensen 528e4aa6e0 let teachers see hidden files, fixes #4489
Change-Id: Ia5a6fb7f3fbe4465851a30440c5ed51c3773eb50
Reviewed-on: https://gerrit.instructure.com/3479
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-05-05 08:55:41 -06:00
Brian Palmer 23e71e669a remove attachments created on import soley for media object import
closes #4382

Change-Id: I1b79ac0ad1043450b7c5ade09f8509b76c9bdc85
Reviewed-on: https://gerrit.instructure.com/3298
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2011-04-27 10:33:35 -06:00
JT Olds ba735d41b6 direct-to-s3 server side changes
Change-Id: Ie7b415b84f403c98d82f0e67212ae2e7b051b67d
Reviewed-on: https://gerrit.instructure.com/2096
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 10:49:47 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00