Commit Graph

4452 Commits

Author SHA1 Message Date
Jon Jensen 0fa86f7224 use dropdowns for birthdate in registration form
change to dropdowns since the datepicker control is not very friendly for
selecting the year

test plan:
1. go to sign up as a student (w/ course code)
2. it should not let you sign up without putting in a birthdate
3. it should save the birthdate correctly
4. go to sign up as a higher-ed student
5. it should not let you sign up without putting in a birthdate, or if you
   are under 13
6. it should save the birthdate correctly

Change-Id: I68fb35afa179ab57aaff22624282f218791b10e0
Reviewed-on: https://gerrit.instructure.com/12437
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-07-24 09:31:49 -06:00
Bracken Mosbacker 4a627488a8 fix file reordering
Fixes a regression from the files API

Test Plan:
 * Reorder some files in the files UI
 * It should work
 * Be sad that the files aren't in alphabetical order
 * Be sad that there aren't other filtering options in the files UI

closes #9576

Change-Id: I97f2d6b771e3bf94612c450aced265968bb4a509
Reviewed-on: https://gerrit.instructure.com/12429
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-23 22:11:56 -06:00
Simon Williams 9fcdba5ae3 improve html on course settings page; refs #8956
fix a few broken tags and validation errors on the course settings page in
hopes that it will help with IE 8/9 bugs that pop up on that page.

test plan:
- in IE 8/9 go to a course settings page
- click edit, enable grading scheme, set grading scheme
- click the edit pencil in the dialog that pops up
- the text boxes to enter the grade and % breakdown should show up
Change-Id: I03213b06126d76832af0ae74aeee8528511e24e4
Reviewed-on: https://gerrit.instructure.com/12367
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-23 09:48:53 -06:00
Jake Sorce 99437a524a spec: add more coverage for conversations
also clean up and refactor files

Change-Id: Ibf59eeafd6f36b087369e301fac500f17f2c3ebb
tested:
  * star a conversation
  * mark as unread
  * unstar a conversation
  * archive a conversation
  * delete a conversation
  * forward a conversation
  * filter - unread
  * filter - starred
  * filter - sent
Reviewed-on: https://gerrit.instructure.com/12337
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-07-23 09:41:36 -06:00
Zach Pendleton 9e8c6faaa0 add keys for all supported languages in I18n.translations.
previously only languages with translations on the page were
being added as keys to I18n.translations. this caused problems
in some cases where an empty translation file was being used
to send a language code to an external system.

test plan:
  * run rake i18n:generate_js;
  * open any page in canvas and, in a js console, examine
    I18n.translations;
  * verify that keys exist in the object for all languages in
    config/locales.

Change-Id: I64f5058dbfee5df0eacdd3a07374592e56523714
Reviewed-on: https://gerrit.instructure.com/12341
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-23 09:38:27 -06:00
Zach Pendleton 6fba24a4d1 harden curve grades dialog to accept undefined + null.
this fix resolves an issue where the "assign zeroes" function
of curve grades dialog was receiving undefined values for scores
instead of null values.

the function now accepts both null and undefined values.

Change-Id: I56db70316b3a4b4b1a2e0f18a7e38ea2880d355f
Reviewed-on: https://gerrit.instructure.com/12403
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-07-23 08:00:23 -06:00
Simon Williams ee6ddf3351 fix messageable_users caching problem
check for presence of two new arrays in messagable_users because the method
they come from is cached for 1 day and so may not include them immediately.

test plan:
- you'll only see this if you have sent a conversation message in the 24
  hours before applying 7e3c30b1 and have caching enabled
- make sure sending a conversation message works.

Change-Id: I4670893e077efc5c5734b01338364175384deb80
Reviewed-on: https://gerrit.instructure.com/12408
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-21 10:43:07 -06:00
Zach Wily f263132121 don't set a default when adding a couple columns on conversation_messages
The default value would force a table rewrite. The code should just handle
NULL already.

Change-Id: I449c406e204afc97d13693d288c5876373f25eb1
Reviewed-on: https://gerrit.instructure.com/12407
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2012-07-21 07:11:53 -06:00
Jon Jensen 5249178632 sensible year range for birth date, fixes #9553
* fix year range in birth date input
* localize display of birth date
* fix javascript to display changes to birth date
* fix es.yml mis-translation (those symbols shouldn't be translated, but
  we do want per-locale ordering)

test plan:
1. edit your profile
2. confirm you can set your birth date to something sensible (last year,
   all the way back to 125 years ago)
3. confirm that when you set the birth date, the ui reflects it after you
   save
4. confirm that you can clear out the birth date

Change-Id: Ic9894070076a0d5b23f2005b36effee32c2fefc2
Reviewed-on: https://gerrit.instructure.com/12399
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-07-20 16:56:20 -06:00
Zach Pendleton acf0e65914 clean up accounts#show stylesheets, js.
remove hover javascript that was adding .info_hover class and
replace it with :hover css rules. additionally, always show
action links on touch devices.

test plan:
  * navigate to /accounts/:id;
  * mouse over the listed courses and verify that the action links
    display on hover;
  * add the "touch" class to the body element and verify that all
    of the action links display.

Change-Id: I5fb7fc8070f03addf0ee5e40b9ddba154023e615
Reviewed-on: https://gerrit.instructure.com/12379
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-07-20 15:19:04 -06:00
Zach Pendleton 5dc3a17133 add state filtering to account courses api. refs #9485
filter courses returned by the account courses endpoint by workflow
state, allowing users to return courses in all states, or in any
combination of states.

test plan:
  * make a call to accounts/:id/courses, passing some accepted value
    for state[]; verify that only courses in that state are returned.
  * make a call without a state[] param; verify that all courses
    except deleted ones are returned.

Change-Id: I9c85e3e237ebeb8addb58e6da39037848f8958f5
Reviewed-on: https://gerrit.instructure.com/12269
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-07-20 15:16:58 -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
Simon Williams e9eba4bf63 allow group members to create announcments
fixes #8934

when we disabled group members from editing each other's discussion topics, we
inadvertantly prevented them from creating announcements.  this restores that
ability.

test plan:
- as a student in a group
- go to the announcements page
- you should be able to create an announcement

Change-Id: I0e47ffbd4ea00d301490d95970d842cfa4ce7845
Reviewed-on: https://gerrit.instructure.com/12384
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-07-20 14:41:49 -06:00
Jon Jensen 58d1797e8e fix calendar2/assignment rendering regression, fixes #9516
fix regression in #7927 where assignments due close to midnight didn't
display in week view (due to some dance of display/height/position, and
full calendar clearing out content of clipped elements)

test plan:
1. create an assignment due at midnight
2. confirm that it displays on weekview (both on the night and morning
   it's due)
3. create another assignment due at the same time
4. confirm that both are visible and readable (i.e. regression test #7927)

Change-Id: Ic2e6d3b523e5090a2bb5136cc74ba496a0b4ff34
Reviewed-on: https://gerrit.instructure.com/12380
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
2012-07-20 14:29:21 -06:00
Cody Cutrer 1f75aeb634 Notifications are unsharded, so don't try to apply this migration again
Change-Id: I933bff0420db83bc415436c384a3d7f8cb693945
Reviewed-on: https://gerrit.instructure.com/12375
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-19 14:05:25 -06:00
Bracken Mosbacker 549e965ab1 correctly copy media urls if media id is available
Some href values are incorrect for media comments in
existing data. When those links are copied the import
code tried to find the file at the href value. Since the
file doesn't exist it strips out the media comment id even
though that is still valid. This commit will instead grab
the media id and make the link copy correctly.

Test Plan:
 * Create a media comment
 * Edit the html of the media comment and change the href in it to just "%24IMS_CC_FILEBASE%24/#"
 * Copy the course
 * In the new course the media comment should work correctly and the href should be "media_objects/#{the_id}"

closes #9471

Change-Id: Ieae7e65a22099afab32a3a1af91e3e227ef27250
Reviewed-on: https://gerrit.instructure.com/12360
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-19 13:49:18 -06:00
Jon Jensen 1916e76d68 registration refactor, temp login functionality, closes #9372
change registration flows for teachers, higher-ed students, and parents.
now users can start using canvas immediately before confirming their
email address (and setting a password). they get a nice big reminder when
they first view the dashboard, and can't edit their profile (or related
things) until they do so.

test plan:
1. go to the signup form for a teacher
2. fill it out
3. confirm that you are immediately logged in to the dashboard
4. confirm that you get a big popup when you first view the dashboard
5. confirm that you can't edit your profile
6. repeat steps 1-5 for higher-ed students (no join code)
7. repeat steps 1-5 for parents (observers)
8. confirm that students registering with a join code do not need to
   verify their email address (since no email is sent)

Change-Id: I4e7e1c083d70725fffd345016f1ca1eec4aeab13
Reviewed-on: https://gerrit.instructure.com/12172
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-19 13:21:05 -06:00
Zach Pendleton 955b41595c fix "create a new course" button for accounts with no courses.
fixes #9526

when clicking the "create a new course" button in an account with
no courses, a javascript error was thrown preventing the new course
modal from displaying.

test plan:
  * create an account with no courses in it;
  * on the /accounts/:new_account_id page, click the "create a new
    course" button;
  * verify that the new course dialog appears and no javascript
    errors are thrown.

Change-Id: If16e23086bbfd3dd9aa515ce9961b091d580f733
Reviewed-on: https://gerrit.instructure.com/12348
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-19 12:46:34 -06:00
Jon Jensen c906c49e49 restyle flash messages and unauthorized-style pages, fixes #9466
test plan:
1. go to a course page when not logged in
   1. you should see the unauthorized message
   2. it should be styled correctly
2. go to a course page when logged in that you are not enrolled in
   1. you should see the unauthorized message
   2. it should be styled correctly
3. perform an action that generates a flash notice (e.g. send a message in
   conversations)
   1. the notice should appear and should overlap the header
   2. it should disappear when clicked (or after a few seconds)
4. perform an action that generates a flash error message
   1. the error should appear and should overlap the header
   2. it should disappear when clicked (or after a few seconds)
5. go to a page that has an initial flash notice (e.g. view course you've
   been invited to)
   1. the notice should appear and should shift all content down
   2. it should only disappear if clicked
6. go to a page that has an initial flash error
   1. the error should appear and should shift all content down
   2. it should only disappear if clicked

Change-Id: I3a1ca8f44e9f36bc7ce191392a7bf8922eb4fcc4
Reviewed-on: https://gerrit.instructure.com/12324
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-18 17:12:52 -06:00
Jeremy Stanley cc72146538 fix fix loading periodic jobs
test plan:
 * clear delayed_jobs table
 * make sure it's repopulated by script/delayed_job run
 * make sure jobs run (not fail with "no longer scheduled")

Change-Id: I830368040c0e4f09a727e09cd694c0783051d73c
Reviewed-on: https://gerrit.instructure.com/12350
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2012-07-18 16:24:09 -06:00
Jon Jensen 716a74c91d new login page styles, fixes #9458
gets rid of the old green modal style. adds a new modal style (light gray)
and a login style (dark gray). a few form tweaks.

test plan:
1. confirm the login page works and looks correct
2. confirm the unauthorized page (e.g. /courses/1 when not logged in)
   works and looks correct
3. confirm the confirm registration page works and looks correct
4. confirm the course self-enrollment page works and looks correct
5. confirm the oauth2 confirm page works and looks correct

Change-Id: Ib9197693ec7b45349f25d69b9931bbae4c7ee831
Reviewed-on: https://gerrit.instructure.com/12246
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-07-18 16:12:00 -06:00
Ryan Shaw e9fe01419b put drop arrow back on speed grader menu, fixes: #9533
test plan:
open speegrader,
make sure there is a drop down arrow on the menu in the
header

Change-Id: Id9ff18345b245c67cc0976c4da859c1ff4d77a7a
Reviewed-on: https://gerrit.instructure.com/12339
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-18 16:08:58 -06:00
Cody Cutrer db43bb21a4 fix loading of periodic jobs
periodic job auditing now happens inline in the forked process,
instead of scheduling an intermediary job. So switch where we load
the periodic job config from.

test plan:
 * clear your delayed jobs
 * start your dj pool
 * periodic jobs should get scheduled

Change-Id: I0cc1745e1229a6ab8ac932eebe6ed4dbea1aa11e
Reviewed-on: https://gerrit.instructure.com/12347
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2012-07-18 16:07:03 -06:00
Simon Williams 323283c237 sub-account branding; closes #9368
allow sub accounts to include their own global scripts and stylesheets. if
global includes are enabled on the root account, root account administrators
will have an option to enable them for immediate child accounts.  those child
accounts can then choose to enable them for their sub-accounts, and so on down
the chain.

these includes are added to the page in order from highest to lowest account,
so sub-accounts are able to override styles added by their parents.

the logic for which styles to display on which pages is as follows:
- on account pages, include all styles in the chain from this account up to the
  root account.  this ensures that you can always see styles for account
  X without any sub-account overrides on account X's page
- on course/group pages, include all styles in the chain from the account which
  contains that course/group up to the root
- on the dashboard, calendar, user pages, and other pages that don't fall into
  one of the above categories, we find the lowest account that contains all of
  the current user's active classes + groups, and include styles from that
  account up to the root

test plan:
- in a root account, create two sub-accounts, create courses in each of them,
  and create 3 users, one enrolled only in the first course, one only in the
  second course, and one enrolled in both courses.
- enable global includes on the root account (no sub-accounts yet) add files,
  and make sure all three students see them.
- now enable sub-account includes, and add include files to each sub-account
- make sure both users in course 1 see include for sub-account 1
- make sure user 1 sees include for sub-account 1 on her dashboard, but user
  3 does not.

Change-Id: I3d07d4bced39593f3084d5eac6ea3137666e319b
Reviewed-on: https://gerrit.instructure.com/12248
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-07-18 13:57:52 -06:00
Ryan Shaw 14917cece8 remove $.fn.shake because it was buggy in ff14, fixes: #9525
test plan:
open speedGrader on new mac with accelerometer in
firefox 14, ensure that it does not just keep skipping
to the next student.

Change-Id: I5bf38dc979312ce9839e08df484bcedbf26533e1
Reviewed-on: https://gerrit.instructure.com/12333
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-18 13:54:42 -06:00
Zach Wily 54924a331b 1.9 - fix failures in courses controller spec
We were passing frozen strings (memoized from an AR object) as request
parameters, and our encoding stuff was complaining that it couldn't force
encoding on them.

(Another option is to not attempt forcing encoding on a frozen object in
ruby_version_compat in force_utf8_params, but that needs to be thought through
carefully.)

Change-Id: I78290464104746852eaf8745d50e2c35218a486f
Reviewed-on: https://gerrit.instructure.com/10897
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-07-18 13:54:21 -06:00
Simon Williams d9573828ae redirect to cross-listed course; closes #9196
if a user is enrolled in a crosslisted section, and tries to access the course
home page with the original course's id, they will be redirected to the home
page of the course that now contains the crosslisted section.

test plan:
- create a course (note the id, X)
- enroll a student in the course
- cross list the course's section to another course
- as the student, go to /courses/X
- you should be redirected to the other course

Change-Id: Ibd52cc75790ca86842fa194ced2638bd92528b54
Reviewed-on: https://gerrit.instructure.com/12316
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-18 13:43:23 -06:00
Simon Williams f4c1c2832b api: list current user's groups; closes #4749
an api endpoint which lists the active groups for which the current user is
an active member.

test plan:
- hit /api/v1/users/self/groups
- you should get back the groups you belong to

Change-Id: Iace05a70f4a77af0cebbb7dbaa3e6f77eb6785c8
Reviewed-on: https://gerrit.instructure.com/12230
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-07-18 12:39:56 -06:00
Jake Sorce 75e8e9318d word wrap event title and bootstrap close icon
fixes #8515

test plan:
  1. go to the main calendar in scheduler
  2. click on a day to create a new event
  3. give the new event a really long name
  4. click on the event to open the popup dialog
  5. notice the new format of the title
  6. notice the close button is using bootstrap
     class

Change-Id: I636325fca7c73f7ddeaf22c67a7e2e38f1276a97
Reviewed-on: https://gerrit.instructure.com/10769
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-18 11:10:20 -06:00
Cameron Matheson a8e556f768 create user_profile table
this moves the user bio to a new user_profile table.  We previously had
a UserProfile model that was a regular ruby class, but now it is using
ActiveRecord

Change-Id: I8848ef9b5f7e2a7bbb5c12df8044efe26388ae78
Reviewed-on: https://gerrit.instructure.com/12178
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-18 10:07:17 -06:00
Ryan Shaw ea7df0a103 pull in css files needed by handlebars templates
if you have a template: 'app/views/jst/foo/bar.handlebars'
and you make a sass/scss file in 'app/stylesheets/jst/foo/bar.scss'

it will pull in those styles for you so you do not have to add them
to assets.yml

Change-Id: I0a7705471208deaeb50c1f7fa4116fa4fc4dadb1
Reviewed-on: https://gerrit.instructure.com/12165
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-18 09:48:10 -06:00
Ryan Shaw af092ae3dd `require` handlebars partials that are used inside a template
Change-Id: I3f2d0af56fa9ece4dafc33ab7cc707458477eb7e
Reviewed-on: https://gerrit.instructure.com/12164
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-18 09:45:43 -06:00
Brian Whitmer 36f2d3a7c3 support checking quota for API uploads
Course/group/users file uploads must be checked
against the context's storage quota before new
files can be added. This commit adds that check
for API uploads. It also adds a note to the API
documentation since this is an additional type of
response developers will need to anticipate.

test plan:
- preflight a file upload in a course that is not over quota
- ensure everything works correctly

- set a small quota for a course
- preflight a file upload in a course that is over quota
- ensure that an appropriate error message is returned

- set a quota of zero for a course
- preflight a file upload for a homework submission
  (a case that isn't quota-enforced)
- ensure everything works correctly, even though the
  course is at quota

Change-Id: I28cc02d91799b1ff27501c3ff919c54834597d74
Reviewed-on: https://gerrit.instructure.com/12142
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-07-18 09:14:57 -06:00
Brian Whitmer 8a7a42ffff developer keys mgmt page
Site admins can manage developer keys. This provides a
basic interface for allowing key management. Admins can
add new keys, edit existing keys, etc. Also adds an
icon url for each key. If keys have an icon url, then
the oauth screen will display this icon to end-users.

test plan:
- manually add a key from the "developer keys" page in
  the site admin account
- confirm that the key is created correctly
- edit the key
- confirm that the changes persist
- delete the key
- confirm that the key is properly deleted

- create more than 15 developer keys
- confirm that the page properly paginates

- set an icon url for a key
- do the oauth dance
- confirm that the icon appears in the approval step

- do the oauth dance for a key without an icon url
- confirm that no icon appears in the approval step

Change-Id: I5d64d14974fdcef8be21c6aa84ab13f681217bd7
Reviewed-on: https://gerrit.instructure.com/10979
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-18 09:13:52 -06:00
Ryan Shaw 97eb6d1077 fix styling for selectmenus, fixes: #9434
test-plan:
look at the drop down in: speedGrader (in a course with multiple sections)
multiple choice quiz question answers,
the "expand all/unread" button on a discussion topic page
…and make sure they look good

Change-Id: I2c56059990dc526ca2ca82a024748a138b4ee7dc
Reviewed-on: https://gerrit.instructure.com/12308
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-07-17 20:35:04 -06:00
Ryan Shaw c6a0c817e0 get rid of double '+' icon on button, fixes: #9498
test plan:
go to /courses/654304/groups and make sure there
are not 2 '+' icons on the "Start a New Group" button

Change-Id: I9ec83be92bedd9a1c0300490764655f33efd1d33
Reviewed-on: https://gerrit.instructure.com/12300
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
2012-07-17 20:34:56 -06:00
Brian Palmer 6c8efd8322 create the media object for submissions and comments if it doesn't exist
Check Kaltura to verify the media id is valid, then create the object,
so that we can track it as we normally do.

fixes #5775

also update some of the submission api documentation around media
comments and file uploads.

test plan: there isn't a UI to show media objects yet, so you'll have to
have console/db access. submit a video/audio submission comment through
the API, then verify that after jobs run, a MediaObject exists for the
media id you gave.

Change-Id: Id0f5b4cdc23330ea952e674df4fc0d1f1c81bf23
Reviewed-on: https://gerrit.instructure.com/12245
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-17 16:17:08 -06:00
Joe Tanner 1edc78ea73 fixes a bug in fetching the next page of users, refs #7768
Change-Id: I7e8a100de7c8824d873fa4c64276c3199410bb1c
Reviewed-on: https://gerrit.instructure.com/12301
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-07-17 15:25:03 -06:00
Jake Sorce a787ee4b6a spec: remove un-needed instance variables
Change-Id: I0e2cf0e8dcdf0bf017113c3582b880c57937ef31
Reviewed-on: https://gerrit.instructure.com/12309
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-07-17 14:27:52 -06:00
Bracken Mosbacker 2278ce66f8 allow non-api deleting of folders with contents
The folders api feature made it so that you can't delete
folders with content without setting a flag and this broke
the current files UI. This restores the old functionality

Also fixed the curl examples in these API docs since I was
in the area

Test Plan:
 * Create a folder with another folder or file in it in a course
 * Delete that folder
 * It should work

closes #9486 #9463

Change-Id: I82f93ebc6a5edab2e2bfc23b0e58dbb561b55c84
Reviewed-on: https://gerrit.instructure.com/12296
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2012-07-17 13:19:57 -06:00
Jake Sorce a571e513b8 spec: used shared examples to test sub accounts
Change-Id: I71cc0287f994d3ac74fbf9f71375647f9349c5b5
Reviewed-on: https://gerrit.instructure.com/11941
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-07-17 11:39:42 -06:00
Jacob Fugal f46faca4b5 correctly associate group assignment submissions
when a student uploads a file as a submission to a group assignment,
associate the attachment with the group, not with the individual
student. this was happening correctly for attachments created through
the submissions_controller, but not for those where the attachment was
created through the files controller before being associated with the
submission in the submissions controller.

fixes #8965

test-plan:
 - ensure s3 uploads are enabled
 - create a course with at least two students (e.g. Jane and Bob)
 - create a group category in that course
 - create at least one group in that category
 - assign both Jane and Bob to the same group in that category
 - create a group assignment associated with that category with file
   uploads allowed
 - masquerade as Jane
 - go to the assignment and upload a file
 - stop masquerading
 - go to the speedgrader for the assignment
 - both Jane and Bob should show the uploaded submission

Change-Id: I4d837fe35fe318ea216e2d3af71d3332115a9ae3
Reviewed-on: https://gerrit.instructure.com/11840
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-17 11:39:17 -06:00
Ryan Florence 585d0e38b6 removed animation from "more_link" fixes #9442
it was ugly anyway even without the strange jump
shown in the ticket :|

Change-Id: I166672bfc4d1fb308ca009328111d4ae20a405d7
Reviewed-on: https://gerrit.instructure.com/12234
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-07-17 10:01:50 -06:00
Jake Sorce 175a7c6a9d make max-height attribute the same as when editing
fixes #8326

test plan:
  1. go to default account
  2. click grading schemes
  3. notice height of table when not editing
     is much bigger and easier to read
  4. click the edit button on the right of the table
  5. notice the table stays the same size

Change-Id: I2ba1421f0c9ca659e2f85c712094057d86836ce3
Reviewed-on: https://gerrit.instructure.com/12259
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-17 09:56:50 -06:00
Ryan Shaw cf5ff5a1cc upgrade backbone
did this so I could use the Collection::where method

Change-Id: I8507b9fceffdc993e28c0a0e3d619ccd909d7f2b
Reviewed-on: https://gerrit.instructure.com/12162
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-07-17 09:34:18 -06:00
Ryan Shaw 40cc2b8d86 handle drag-n-drop on touch interfaces
test plan:
try to drag drop things (like on the discussions
index page) on an iPad or other touch interface

make sure it works

Change-Id: I4bfc443569846afa0ab07f7c818a8fd2ab9c0943
Reviewed-on: https://gerrit.instructure.com/12161
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-07-17 09:34:07 -06:00
Ryan Shaw 8dafbebedf let gradebook1 be full-width, fixes: #9497
Change-Id: I74a6ec59cc47e036f6c72ca6871ad19e9767d740
Reviewed-on: https://gerrit.instructure.com/12290
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-07-17 09:33:19 -06:00
Brian Palmer 9a121c89b1 always show student module progression button to teachers
fixes #9351

test plan: as a student visit the course modules page, verify that the
"view student progress" button doesn't appear. as a teacher visit the
page and verify the button appears, even if no students have started
progression through the modules yet, or if all students have finished
all modules.

Change-Id: I0fab645fb7302b90fe46b8c72950889418f1933d
Reviewed-on: https://gerrit.instructure.com/12079
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-17 08:57:40 -06:00
Jeremy Stanley 7290ff6470 don't rename every text header when you rename one; fixes #9373
text headers do not correspond to a database row; all have a
content_id of 0.  recent change to allow items to appear in
multiple modules did not take this into account, and treats
all text headers as instances of the same thing.

the same thing applies to external tools and external urls--
renaming one would rename all.

test plan:
 * find or create a module with multiple text headers.
 * rename one.
 * the others should not change.
 * repeat the above with external tools.
 * repeat the above with external URLs.

Change-Id: I063c0e5a769c8bdefd1dbda569b983506add971d
Reviewed-on: https://gerrit.instructure.com/12295
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-17 08:55:16 -06:00
Ryan Florence 684971ce71 added ValidatedFormView to display form errors
handles server-side validation error responses
and displays an errorBox for the field's errors

NOTE: this isn't implemented in the app anywhere
yet and may need some slight tweaking

Change-Id: Icdfd40141aed1100840877657fae6b2c68c98f9e
Reviewed-on: https://gerrit.instructure.com/12016
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-16 22:02:50 -06:00