Commit Graph

2206 Commits

Author SHA1 Message Date
Joe Tanner 97f6abcc40 users API endpoint (for course settings) #7764
* merged Api::V1::Enrollment into Api::V1::User because of a circular
  dependency
* adding enrollments and email fields to #user_json
* adding associated_user_id, updated_at, and locked fields to
  #enrollment_json

/api/v1/courses/:course_id/users
test plan:
* create a course
* enroll a user twice in the course (e.g. a TA)
* call the api with 'enrollments' and 'email' in include[]
* verify that the user data includes an email and two enrollments

Change-Id: I2f09c72c0e60fb7d2cd5bc7b585834970ad7a7cf
Reviewed-on: https://gerrit.instructure.com/9607
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-04 10:27:53 -06:00
Cameron Matheson 9edcf3dce7 gradebook2 header-column fixes
fixes #6873, #7286

Test plan:
  - open the gradebook in a course with an assignment that has a very
    long name
  - verify that the assignment name is truncated
  - verify the tooltips on the column headers are sensible

Change-Id: I2309f05e0426f5d855f9e385c13934a05efa6da1
Reviewed-on: https://gerrit.instructure.com/8791
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-03 18:09:33 -06:00
Cameron Matheson 2a85d98357 fix disappearing appointment group events
fixes #7888

Test plan:
  - make an appointment group
  - reserve one of the appointments as a student
  - as the teacher, go to the month calendar view
  - edit the appointment group event
  - make sure the event doesn't disappear

Change-Id: I01574c7c343ff0681e13acd00773dc564814a437
Reviewed-on: https://gerrit.instructure.com/9661
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-04-03 18:09:08 -06:00
Cameron Matheson 038d6fac3c scheduler: per-appointment participant limit
closes #7769

Test plan:
  - create an appointment group
  - open the appointment groups and edit one of its appointments
  - change the number of users allowed to attend the appointment
  - make sure that no more users can reserve the appointment than
    configured

Change-Id: I4365113d81d123bd8c3cdc24af8761cc6b9027a3
Reviewed-on: https://gerrit.instructure.com/9648
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-04-03 15:55:32 -06:00
Simon Williams 874b5489c1 student view; closes #6995
allows course admins to view the course from a student perspective. this is
accessible from a button on the course/settings page. They should be able to
interact with the course as a student would, including submitting homework and
quizzes. Right now there is one student view student per course, so if the
course has multiple administrators, they will all share the same student view
student.

There are a few things that won't work in student view the way the
would for a normal student, most notably access to conversations is disabled.
Additionally, any publicly visible action that the teacher takes while in
student view will still be publicly visible -- for example if the teacher posts
a discussion topic/reply as the student view student, it will be visible to the
whole class.

test-plan:
- (the following should be tried both as a full teacher and as
  a section-limited course admin)
- set up a few assignments, quizzes, discussions, and module progressions in
  a course.
- enter student view from the coures settings page.
- work through the things you set up above.
- leave student view from the upper right corner of the page.
- as a teacher you should be able to grade the fake student so that they can
  continue to progress.
- the student should not show up in the course users list
- the student should not show up at the account level at all:
  * total user list
  * statistics

Change-Id: I886a4663777f3ef2bdae594349ff6da6981e14ed
Reviewed-on: https://gerrit.instructure.com/9484
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-04-03 14:11:07 -06:00
Brian Whitmer c2dfe5bba6 avatars in SpeedGrader
Add an avatar in the top right of SpeedGrader to show
the currently visible student. Also add avatars for
submission comments made on the submission.

test plan:
- enable avatars on the account
- go to SpeedGrader for an assignment
- make sure student avatars appear correctly in the top left
- add a comment to the submission
- make sure your avatar appears correctly next to your comment

- disable avatars on the account
- go back to the same SpeedGrader view
- make sure no avatars appear

Change-Id: Iac0e2305f24340a984ff5546eed7e4789f8337b5
Reviewed-on: https://gerrit.instructure.com/9675
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-04-03 13:36:36 -06:00
Brian Whitmer 8cd7a22309 add avatars to roster pages
In courses and groups, add the avatar picture below
each user's name.

test plan:
- enable avatars on an account
- load a course roster
- make sure avatar pictures appear correctly

- load a group roster
- make sure avatar pictures appear correctly

- disable avatars on the account
- load the course roster
- make sure avatar pictures appear correctly

Change-Id: Ib1f91edb153b42a20a3212aa5d12d5383d8b3325
Reviewed-on: https://gerrit.instructure.com/9024
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-04-03 10:36:41 -06:00
Ryan Florence e5cc031f25 fixed bad path for json2.js
Change-Id: I49f87d58f7b7190c004fad34b102f2db44523f82
Reviewed-on: https://gerrit.instructure.com/9800
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-03 10:31:48 -06:00
Cameron Matheson b0d798b76c scheduler: allow teachers to cancel student appointments
closes #7560

Test plan:
  - reserve a time slot with one or more students
  - as a teacher, click on the reserved time slot (in either scheduler
    or month view)
  - you should be able to remove the student from the appointment

Change-Id: I2b5faf813ebafe50fbf185ee8f61764667afa941
Reviewed-on: https://gerrit.instructure.com/9594
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-04-02 21:40:34 -06:00
Cameron Matheson 224774a345 appointment groups: allow limiting max appts per participant
closes: #7562

Test plan:
  - create an appointment group that has a limit on per-participant
    appointments
  - make sure a student can sign up for no more than that many appointments
  - remove the limit
  - make sure that a student can sign up for all slots

Change-Id: Id6d323c056369b4e76671ef10c0fa5e2dfa740ca
Reviewed-on: https://gerrit.instructure.com/9422
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-04-02 20:30:48 -06:00
Bracken Mosbacker df532a4ce6 remove unneeded selection options when choosing migration content
If all the items of a specific types are selected it
doesn't need to list each individual item. So remove all
the unneeded options to reduce the number of hash keys
sent to the server

Test Plan:
 * Import some packages from other systems
 * Check that the expected items are/aren't selected in the submitted post data
 * The import should work as expected

closes #7699

Change-Id: Ib56b2aaf4044fc3e433ca64563ff517c9db304c7
Reviewed-on: https://gerrit.instructure.com/9711
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-02 17:29:19 -06:00
Bracken Mosbacker 567eb8b068 re-add selective course copy options
add the selective course copy back in and change it to
use the updated format for what items are selected

Test Plan:
 * Copy some courses and selectively choose items
 * Only the items you selected should copy

refs #4645

Change-Id: Id5043b4e5e4a285b1f5cefd2ab16473052026484
Reviewed-on: https://gerrit.instructure.com/9763
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-04-02 17:29:06 -06:00
Bracken Mosbacker a942ede9c6 convert course copy to use export/import functionality
This adds the ability for ContentMigration to copy courses
by exporting to a content package and then importing that
package. For attachments it just creates a new Attachment
object instead of exporting/importing them.

The course copy API did not change.

The endpoints used by the course copy UI did change and this
commit doesn't allow selective copying, it only has the
option to copy everything. Selective copying will come in
another commit.

There are also various bug fixes for export/import

Test Plan:
 * copy a course through the API
 * copy a course through the Content Imports path
 * copy a course through the Copy Cours button on the course settings page
 * export a course

refs #4645

Change-Id: Ie577329ab7caaea8dfb9359542224a1a2657e167
Reviewed-on: https://gerrit.instructure.com/9742
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-04-02 17:29:01 -06:00
Bracken Mosbacker 37a65cec7c allow selective course exports
Test Plan:
  * There is no UI for this yet, so check the specs.

refs #4645

Change-Id: Ibe159d222ba9a05e2edc4ead5eeb3e48b77c3542
Reviewed-on: https://gerrit.instructure.com/9741
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-04-02 17:28:51 -06:00
Cody Cutrer ed5588147f use built-in authlogic password generation closes #8002
test plan:
 * create a new pseudonym without a password in script/console
 * after saving, pseudonym.password should return a value, and
   it should not start with "tmp-pw-"

Change-Id: Idb49ada75d0212fd068e09fbf4e77d837b25e9c4
Reviewed-on: https://gerrit.instructure.com/9778
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-04-02 16:42:56 -06:00
Jake Sorce f4bfd585be change string wording in notification.rb
fixes #7949

Change-Id: I65a76b616561187e6fe509799faff0138f2adbb5
Reviewed-on: https://gerrit.instructure.com/9794
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-02 16:41:34 -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
Brian Whitmer 0f32c1d34b avatars in gradebook2
Add a small user avatar icon to the left of each student's
name in the gradebook.

test plan:
- enable avatars for the account
- load a course gradebook
- make sure avatars appear correctly

- disable avatars for the account
- load a course gradebook
- make sure no avatars appear

Change-Id: Ibecbe25936979c115dcaa5af4f454320128bbd1c
Reviewed-on: https://gerrit.instructure.com/9397
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-02 16:00:34 -06:00
Jon Jensen c0334ed148 fix quiz issues around rich text and numerical inputs, fixes #7475
several changes to make things more correct/consistent across browsers:

1. remove blur handlers, since they are redundant
2. normalize numerical answers *before* updating the submission
3. fix regression around the numerical answer validation (the error box
   had stopped showing up) and refactor it a bit
4. simplify window blur/focus -> active input event triggering, and make
   it so it only (and always) happens in take_quiz (eventually we may want
   it in the entire app). we no longer blur/focus the input, we just
   trigger those handlers. this lets us avoid the IE infinite loop
5. by virtue of 4., fix an issue with tiny re-adding the window blur/focus
   handlers every time tiny got focus (since these editors had explicit
   ids and thus editorBoxIdCounter never got incremented)
6. add a tiny hook to ensure the change callback fires when tiny loses
   focus (fixes issue in FF and Safari)

test plan:
1. create a quiz with numerical questions, essay questions, and others
2. take the quiz in every browser (ff, safari, chrome, ie8, ie9) and:
 1. ensure that answers get marked as answered/unanswered whenever you
    change the content AND
    1. tab out of the input/editor
    2. click out of the input/editor
    3. click out of the viewport entirely
 2. ensure that numerical answers show the error box whenever the
    content is invalid, and it goes away when it becomes valid

Change-Id: I7e34a99e9b81772b3a91b7a76cab59102bcc4c90
Reviewed-on: https://gerrit.instructure.com/9677
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-04-02 15:59:27 -06:00
Cameron Matheson 644274319b make appointment event edit dialog less ugly
fixes #7430

Test-plan:
  - create an appointment group
  - click on one of the appointment group calendar events
  - confirm that your eyes aren't bleeding

Change-Id: Ie22bc1a190d2b202a926d1c7c76245bf6e56d478
Reviewed-on: https://gerrit.instructure.com/9445
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-04-02 15:15:34 -06:00
Cameron Matheson 5f8ea334bc calendar2: fix 'more options' links
fixes #7959

Test plan:
  *  Use firefox
  1. On calendar2, click on a day to create an event.
  2. Click the 'more options' link
  3. Make sure it takes you to the new calendar event page
  4. Repeat steps 1-3 but for assignments
  5. Repeat steps 1-4 for the existing events/assignments

Change-Id: I22eb38b5c3b0ec90815b78cca15452846662f788
Reviewed-on: https://gerrit.instructure.com/9752
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-04-02 14:42:36 -06:00
Ryan Florence 974bd63ff9 don't break when "take quiz" is double-clicked
fixes #7380

test plan:
1. click "take quiz" as fast as you can
2. observe the next page isn't broken

Change-Id: I1dae0414e0db6bc4972f97e6cb56abca347433d1
Reviewed-on: https://gerrit.instructure.com/9735
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-04-02 14:39:06 -06:00
Jon Jensen 4e5cf14742 faster bulk message sending, refs #7277
various tweaks to speed up bulk message sending (~75% backend runtime
reduction, for both current and stale caches. ~55% frontend runtime
reduction. ymmv). highlights:

1. lots of preloading. some vanilla rails stuff, more hand-rolled.
2. conversation model hooks to reuse existing ruby objects if requested
   (e.g. c.conversation_participants[0].conversation.equal?(c)
   when done in a ModelCache.cache block).
3. more (and better) caching. some User# methods are now cached up to a
   day (or until the user is touched).
4. various model tweaks to reduce redundant or unnecessary queries.
5. don't animate existing private conversations after the response
   comes back. for bulk private messages going out to tons of existing
   conversations, this would peg the client CPU and cause sadness.
6. defer delayed job creation

test plan:
1. run rails in production mode (so stream items and notifications
   happen in delayed jobs, otherwise it's going to be *really* slow)
2. confirm that sending a bulk private message to a lot of people (e.g.
   500) is faster
3. also confirm that nothing is broken :)

Change-Id: I92094f27ac51094a8047cb67f2cbb680a1839779
Reviewed-on: https://gerrit.instructure.com/9157
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-04-02 14:34:39 -06:00
Brian Whitmer 11ff6d2d60 max width on avatar pics
Avatar pictures had an explicit height, but
the width could be whatever. Setting the max-width
will help keep it horizontally bounded for
layout purposes.

test plan:
- pick an avatar image that is really wide
- go to a discussion where you have posted
- make sure the avatar picture is not wider than 50px

Change-Id: I1a3d26bf28f70cb6948010f096c8b940f0a0ca26
Reviewed-on: https://gerrit.instructure.com/9022
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-04-02 14:31:08 -06:00
Rob Orton 33b350b88d exclude soft concluded courses from dropdown fixes #7536
test plan
 * create a course that has ended
 * that course should not be in the dropdown
 * other courses should be in drop down
 * old course should be in pst enrollments

Change-Id: Ibf31fe72125eb05fff42dd6d8fbe123f6b6368f6
Reviewed-on: https://gerrit.instructure.com/9448
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-02 14:10:21 -06:00
Cody Cutrer 59c4bd0187 fix selecting a login when a single user is found fixes #7900
Change-Id: Iee82fd5bdad1d840c2978f4f7ee196ce1c24df9b
Reviewed-on: https://gerrit.instructure.com/9673
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-04-02 13:54:17 -06:00
Brian Palmer 549beb7bc6 strip html from .ics descriptions, fixes #7365
for both calendar events and assignments

test plan: create a calendar event and an assignment with rich text
descriptions. download the .ics for the course, verify that you don't
get html tags in the descriptions in ical, outlook, etc

Change-Id: I1d69e2a9338fdc3d8c9228b7e6cb70d58614bdac
Reviewed-on: https://gerrit.instructure.com/9666
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-04-02 13:26:17 -06:00
Zach Pendleton d536bb8c31 add public_description to course model. fixes #7761
affects: course model, api
test plan:
  * add a course with the api, included a public description;
  * verify that public description field is returned and
    exists on the course in the db.

Change-Id: If2766cf7ba946af5cb8a5cafebaa8209754ec2b3
Reviewed-on: https://gerrit.instructure.com/9723
Tested-by: Cody Cutrer <cody@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-04-02 11:40:54 -06:00
Bracken Mosbacker e51ffb965f show the quiz question title on the quiz statistics page
question data should use the :question_name key for question
names, so that key should be used when showing the title.

Test Plan:
 * Import a quiz from a QTI package
 * Take the quiz and view the statistics page
 * The title should be there.

closes #7065

Change-Id: I39a650cf0f0aa8a8534a0158d6b073dc261c87c3
Reviewed-on: https://gerrit.instructure.com/9738
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-02 09:56:33 -06:00
Cody Cutrer 03424c9626 use ids relative to the default shard for strands refs #6886
test plan:
 * run existing specs

Change-Id: I3b84b15be828975e1c60f976232e3984ccd95a61
Reviewed-on: https://gerrit.instructure.com/9670
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-02 09:47:09 -06:00
Cody Cutrer 89c1a5fa39 always search for deprecated api key usage on the default shard
also search for the default developer key on the default shard

refs #7788

test plan:
 * create an api key (on the default shard)
 * access the api on a non-default shard
 * it should still work
 * create an oauth token in the UI on a different
   shard
 * it should work, and reference a key on the default shard

Change-Id: I8c8aa36ab38f45ba9af2422a42552faeff28ac73
Reviewed-on: https://gerrit.instructure.com/9492
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-04-02 09:07:13 -06:00
Brian Palmer 9e93e80a1d update the topic materialized view after the entry save transaction commits
Fixes a race condition where the view might get generated by the job
without the new entry.

test plan: this is difficult to duplicate by hand, but you could put a
breakpoint in and verify the job doesn't get inserted before the
transaction commits.

Change-Id: I6c373553dfae409adab25dd9e3bafc7126169231
Reviewed-on: https://gerrit.instructure.com/9710
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-02 09:06:47 -06:00
Zach Wily 551b0008c3 fix showing discussion entries without users; fixes #7976
Apparently there are some cases where this can happen, so it needs to be
handled.

test plan:
 * Create a topic with some entries
 * In console, set the user_id of some of those entries to nil
 * Ensure you can still load the topic (and it says Unknown Author for the
   ones with user_id = nil)

Change-Id: Idbcd82204d8b936d5d50af5ff6e5dd338bbba87a
Reviewed-on: https://gerrit.instructure.com/9762
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-01 12:13:25 -06:00
Zach Wily 5a09641e47 fix posting to post-first discussions
We were trying to act on an element not on the page. This adds a check for
that and a spec.

test plan:
 * Create a "post first" discussion.
 * As a student, attempt to load it and post to it.
 * It should work.

Change-Id: I68459145ff740562fe07eb71080401981c2285d2
Reviewed-on: https://gerrit.instructure.com/9758
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-31 22:31:43 -06:00
Ryan Florence fb8493d305 hide "add reply to topic" for closed discussions
Change-Id: Ibef1c208d02a91750301b86cd9a1ad691948ce16
Reviewed-on: https://gerrit.instructure.com/9750
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-31 14:50:40 -06:00
Ryan Florence 864f1856ee mark as read fixes
- init after entries are created

- don't start timers on collapseView false (this
  marked everything as read when choosing "expand
  all" from the view switcher")

Change-Id: I814c1a9f50b098e022e1ae4882279e6dc951ed0b
Reviewed-on: https://gerrit.instructure.com/9745
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-30 20:18:05 -06:00
Cody Cutrer f6192f0925 plumb current host to files_host calls
test plan:
 * ensure accessing files still works

Change-Id: I17a82158a39f0db24e67e59e7877b3f0bd0447d4
Reviewed-on: https://gerrit.instructure.com/9690
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-30 18:32:14 -06:00
Ryan Florence b57732de32 add or edit new entries in discussions
Change-Id: I70dc277deb69acc49ccd342cc22b189b54365223
Reviewed-on: https://gerrit.instructure.com/9732
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-30 16:49:56 -06:00
Brian Palmer 07b9baef44 return rubric points total with rubric response, fixes #7149
unfortunately the poor decision was made to return the rubric as an
array of rows, rather than an object that can hold other attributes, so
i've added a 'rubric_settings' object to the assignment response to hold
these other attributes.

test plan: make an api call for an assignment, verify the rubric
response

Change-Id: Ia7ad4c31038454eca28150e7d55ecebaa8fd7195
Reviewed-on: https://gerrit.instructure.com/9714
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Mark Suman <marks@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-03-30 16:48:20 -06:00
Cody Cutrer d5b724e2cf fix site admins masquerading as teachers fixes #7954
test plan:
 * set "teachers can create courses" but *not* "users with no
   enrollments can create courses" on an account
 * as a site admin, ensure you can masquerade as a teacher in that
   account

Change-Id: Id63ac979aafc42b70b3303dc4cbe9c924582f448
Reviewed-on: https://gerrit.instructure.com/9731
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-30 16:36:49 -06:00
Zach Pendleton ada506783d add api to return user's pseudonyms across all accounts. fixes #7946
affects: pseudonym/login api
test plan:
  * create a user with multiple pseudonyms across accounts;
  * make request to /api/v1/users/:user_id/logins and verify that
    all of that user's pseudonyms are returned.
  * make same request as unauthorized user and verify that 401 is
    returned.

Change-Id: Ic932ce9bef6bcfbe3ecb3340f640f44fbf4115a4
Reviewed-on: https://gerrit.instructure.com/9718
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-30 16:31:09 -06:00
Ryan Florence 17589df996 right padding in side_comment discussions
when threaded discussions were converted to
side_comment discussions the right padding kept
nesting, now its flat

Change-Id: I256392518b24e05fa61dfa49670ec8d657063537
Reviewed-on: https://gerrit.instructure.com/9736
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-30 15:56:00 -06:00
Brian Palmer a2818dd9ea optionally include entries not in the view yet in /view response
consumers can use this to update the view client-side and ensure it's
always up-to-date even if the view is behind.

Change-Id: I1ff0cd80a758a113f8881ef74de78cc28e2fa16b
Reviewed-on: https://gerrit.instructure.com/9717
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-03-30 15:33:54 -06:00
Cody Cutrer 0d7aa87782 next step of scary warning for users logging in at wrong domain
test plan:
 * have a user not associated with the default account at all
 * log in on the default account's domain
 * should get a scary warning at the bottom of the screen that
   doesn't go away until you click another link

Change-Id: Icbe9953119e80ec3f2e761f35ceb042ceec6372e
Reviewed-on: https://gerrit.instructure.com/9722
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-03-30 15:06:06 -06:00
Simon Williams ceb27ff566 expire dashboard todo list after 3 minutes; refs #7753
the todo on the dashboard was being cached, keyed on the user, which didn't get
cleared when an assignment's needs_grading count changed. since computing all
the assignments needing grading a significant part of the computation we're
trying to save, we don't want to include that in the cache key, so just expire
after 3 minutes for now.

test-plan:
- as a teacher, look at your todo list on the dashboard.
- go grade something that needs grading.
- wait 3 minutes
- go back to dashboard, count should be updated

Change-Id: I5b2626656c74684dd52aeb667ffd7cefffc9f552
Reviewed-on: https://gerrit.instructure.com/9672
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-30 14:26:36 -06:00
Brian Palmer 62b9ed42a9 require a logged-in user when backing up a quiz
fixes #7494

test plan: start taking a quiz, then delete your session from the
database. the subsequent backups should result in an error. (there is a
separate ticket filed to put the user back on the initial quiz page or
something when this happens)

Change-Id: I598012af1ee8f0595e95b81dd6caeb9bcfbc5428
Reviewed-on: https://gerrit.instructure.com/9703
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-03-30 13:39:27 -06:00
Jon Jensen 7496a235ea auto-wrap long words (e.g. urls), fixes #7658
ensure that excessively long words in quiz responses get wrapped

test plan:
1. take a quiz with an essay question
2. enter a really long word (wider than the viewport)
3. in each supported browser:
 1. confirm that it wraps on the quiz result page
 2. confirm that it wraps in the speedgrader

Change-Id: Ie634dd09cd0d9360b486ede9155bfb750e592c13
Reviewed-on: https://gerrit.instructure.com/9695
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-03-30 12:38:37 -06:00
Ryan Shaw fa6f37f425 shortcut for common event.preventDefault pattern
a lot of times when you bind to an event the first
thing you do in your handler is event.preventDefault()

not a big deal unless you are trying to bind a class
method to the handler and you have to wrap in an
anonymous function just to get the event.preventDefault

Change-Id: I17a8fc3e9fdf1e75e900eb25a51aecc74daa69d6
Reviewed-on: https://gerrit.instructure.com/9264
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-03-30 11:52:28 -06:00
Cody Cutrer d7e3d5e842 refactor ReportSnapshot refs #7721
basically for detailed reports, have a row per account, instead of
stuffing everything into one massive hash with every account

test plan:
 * ensure that the account statistics page still works
 * ensure that the statistics update when the delayed job runs

Change-Id: I2d4c9ff5a86c8df6d82097aa4f0203a0f55ddb2d
Reviewed-on: https://gerrit.instructure.com/9565
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-03-30 09:17:43 -06:00
Zach Wily b7049f53de fix speedgrader buttons for discussion in a group
Change-Id: Ic49ae1e19b5f70b4897f48bc827d8e665dd1008d
Reviewed-on: https://gerrit.instructure.com/9706
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2012-03-29 16:29:15 -06:00