Commit Graph

2864 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
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
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
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
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
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
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
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
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
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 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
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
Zach Pendleton 5086519de9 optionally turn off notifications in enrollment#create api.
refs #8927

test plan:
  * create an enrollment with the api, passing a value for the
    enrollment[notify]. Verify that no notification is generated;
  * create an enrollment without passing enrollment[notify] and
    verify that notifications are still created as expected.

Change-Id: I40bd3787cd59936fa5ba38a28d7ecd49523d4242
Reviewed-on: https://gerrit.instructure.com/11383
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-07-16 16:54:40 -06:00
Joe Tanner d16318c1e0 add multiple students to an observer in the UI, closes #7768
other changes:
- makes it possible to add a student to multiple sections in the course
- pagination of the user lists
- converted user tab js to coffee and backbone

test plan:
- as a teacher go to /courses/*/settings#tab-users
- verify that multiple students can be linked/unlinked to an observer
- verify that users can be added to and removed from multiple sections
- verify that 'Resend Invitation' and 'Remove from course' work

Change-Id: I0f64f72f1937348817990b6f13b6310185b68a73
Reviewed-on: https://gerrit.instructure.com/10865
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
2012-07-16 15:48:27 -06:00
Ryan Shaw e4630f5b9f add paginatedView mixin for views that deal with PaginatedCollections
Change-Id: I6884bfc0e614edcef168b645002ed65304a33877
Reviewed-on: https://gerrit.instructure.com/12167
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
2012-07-16 15:47:56 -06:00
Ryan Shaw 40473082fd add paginated collection class for things that use our API
Change-Id: Iad14ff867187160c7b000a59e446c93715e319dd
Reviewed-on: https://gerrit.instructure.com/12166
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
2012-07-16 15:47:48 -06:00
Zach Pendleton a09d0a0656 stop assigning grader_id of 4 on grade passback.
fixes #9422

when a submission was graded via grade passback, it was being
assigned a grader_id of 4 because grade passback isn't sending
any grader information.

this fix replaces a potential call to nil.id with nil.try(:id),
which will properly return nil instead of 4.

Change-Id: I9d131043e716a2b4d04e7fba1104d04cd0b15ff3
Reviewed-on: https://gerrit.instructure.com/12266
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-07-16 15:08:44 -06:00
Ryan Shaw 73e6d19108 fix ordering of ui-dialog buttons and make primary ones blue again
our old jquery ui theme css was float:right'ing these
which means to have them show up in the right order
you would have to create them in the wrong order.
we fixed that with the new jquery-ui-theme but now
we need to fix places where they were in the wrong
order in code.

also the class name to make them blue has changed
so I fixed that too

Change-Id: If0cbebce4788b0c68cd71a08cd2880076e139bc0
Reviewed-on: https://gerrit.instructure.com/12214
Reviewed-by: Joe Tanner <joe@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-16 13:05:25 -06:00
Jon Jensen 6221e9c3bb have self enrollment on by default for new courses, fixes #9219
when creating a course from the new dashboard, have self enrollment on by
default (provided that the account allows self enrollment)

test plan:
1. enable the new dashboard
2. on your root account, allow self enrollment for manually created
   courses
3. create a new course from the dashboard
4. it should have self enrollment turned on
5. on your root account, disallow self enrollment
6. create a new course from the dashboard
7. it should have self enrollment turned off

Change-Id: I79f22b720cf86872b479b3b0fec4bd2a97d08d4e
Reviewed-on: https://gerrit.instructure.com/12225
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-07-16 13:05:23 -06:00
Joe Tanner fe99951d28 allow editing appt group options, fixes #8169
Also adds showing a help dialog on two of the options where there are
already more users per time slot than allowed or a user signed up for
more than the allowed appointment limit.

test plan:
* option editing
- as a teacher create an appt group with some or all of the options
  checked
- edit the appt group and change the options
- save
- edit the group again to verify that the changes remain

* per slot help dialog
- edit the appt group and uncheck 'Limit each time slot'
- save
- reserve one of the appointments with two students
- as a teacher edit the appt group and check 'Limit each time slot'
- verify that when the input value is '1' the help icon shows
- and verify that when the input is increased to '2' the help icon
  disappears

* limit appointments help dialog
- edit the appt group and uncheck 'Limit participants to attend'
- save
- as a student reserve more than one appointment slot
- as a teacher edit the appt group and check 'Limit participants to attend'
- verify that when the input value is '1' the help icon shows
- and verify that when the input is increased to '2' the help icon
  disappears

Change-Id: I34cd4e0604db30e7e752fd092fd70c6af2443dfe
Reviewed-on: https://gerrit.instructure.com/11863
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-16 11:15:56 -06:00
Ryan Shaw a73b37b8e5 new-new breadcrumbs (that look like the old ones)
closes: #9243

test plan: look at how breadcrumbs look

Change-Id: Ib55dfd8b0eb7c30bab08b38732b7eb108baa73f2
Reviewed-on: https://gerrit.instructure.com/12232
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-07-16 10:54:13 -06:00
Ryan Shaw 5419af6dfd fix jquery ui datepicker styles, refs: #9247
test plan:
go to a page that has a date picker,
make sure it looks good

Change-Id: I02d2846e5bc7064e261bfb26cf0b23d8bae7ec75
Reviewed-on: https://gerrit.instructure.com/12160
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-07-16 10:51:50 -06:00
Brian Palmer a5c973b64f don't allow TAs to delete or reset courses
fixes #6227

test plan: Make a non-SIS course. Verify that teachers and designers can
still delete and reset the course, but TAs cannot.
They shouldn't see the buttons to do so, either.

Change-Id: I413a7646eaf7132b6b41d51bce4b05bb1b490b1c
Reviewed-on: https://gerrit.instructure.com/12151
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-16 10:50:10 -06:00
Cameron Matheson fa7e99203c revert "enable calendar2 by default"
closes #9443

This reverts commit 31ec2fb58d

Change-Id: Ie54ae9ee681a538398fc78ccf9b0af6a48baa5a6
Reviewed-on: https://gerrit.instructure.com/12207
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-16 10:39:52 -06:00
Jon Jensen ce3f3a2935 remove loadDir since the optimizer has issues with it. fixes #9441
our current version of require.js is unable to optimize loadDir correctly.
just explicitly include each template and create a map.

test plan:
1. on unoptimized canvas, go to the registration page
2. dialogs should appear when you click the buttons
3. on optimized canvas, go to the registration page
4. dialogs should appear when you click the buttons

Change-Id: Ifb55d739ac0bc485e64969bc4251c3a2d678d4c6
Reviewed-on: https://gerrit.instructure.com/12224
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-07-16 09:25:55 -06:00
Simon Williams 9fc42cde44 remove visible traces of anonymous peer reviews
refs #3341

there is some backend support for anonymous peer reviews but it was never
finished and exposed in the UI, except for when posting a peer review via ajax.
this removes the visible traces of the feature until it can be completed.

test plan:
- leave a peer review comment on an assignment
- when the comment is inserted into the page, the author should be your name,
  rather than 'Anonymous'

Change-Id: I8ecaf4ab8941b4c0f3f80605445d7361ed2b2747
Reviewed-on: https://gerrit.instructure.com/12171
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-07-16 09:10:18 -06:00
Jon Jensen 5ac7b56684 calendar API documentation, fixes/tweaks
API documentation and examples for Calendar Events and Appointment Groups.

Clean up some value_as_boolean usage, and fix a couple little issues in
the calendar APIs

test plan:
* build documentation
* it should generate and be correct
* run API specs
* they should pass

Change-Id: I4c57ac91a99e4eb04f5ba1741bb4f5968d0a0b14
Reviewed-on: https://gerrit.instructure.com/12209
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-16 08:54:11 -06:00
Ryan Florence e676dad920 fix eportfolio section list fixes #9430
should look like this:
https://dl.dropbox.com/u/10952887/screenshot.png

Change-Id: I3fe9bad1e4b944990082c06371b5c648b4b59cc4
Reviewed-on: https://gerrit.instructure.com/12208
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-07-13 18:32:21 -06:00