Commit Graph

3705 Commits

Author SHA1 Message Date
Ryan Florence 614b696a63 collapse / expand discussion entries
also:

- counts in side-comment "show all [n] replies"
  are now accurate
- moved lock/unlock into the cog menu
- moved the cog menu into the toolbar

test plan:
1. go to a discussion
2. click "collapse" in the toolbar
   - the root entries should collapse
   - the page should scroll to the entries
3. expand a single reply
   - the reply's replies should NOT be collapsed
4. click a page number
   - the newly rendered entries should be
     collapsed
5. click expand
   - all the root entries should expand
6. click a page link
   - all the entries should be expanded
7. lock and unlock should still work
8. Go to a side comment discussion
   - "show all [n] replies" should have an
     accurate count

Change-Id: Ia06fad173344c549d31b7cd51d4ecc57d2e40d5f
Reviewed-on: https://gerrit.instructure.com/15834
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2012-12-27 14:36:21 -07:00
James Williams 878c73b43a use due dates from assignment overrides on student grades page
test plan:

* override the due_at column using assignment overrides
 either for sections, groups, or a specific student
* view the student's grade page and confirm that
 the new due date is used

closes #CNVS-444

Change-Id: Id4f4c1a05ab7129a29909b4142ffc25b056a2be4
Reviewed-on: https://gerrit.instructure.com/16167
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2012-12-27 11:39:09 -07:00
Stanley Stuart 7b963aff37 remove openobject from UsersController
Removes OpenObject in favor of a struct to gain performance.

test plan:
  - specs should pass.

Change-Id: I0be2319533e2c2cd6ce1fa5dbf044ccb5368c299
Reviewed-on: https://gerrit.instructure.com/16049
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2012-12-26 16:18:34 -07:00
Bracken Mosbacker 5585c3a203 add custom role support to course users tab
You can add enrollments with the custom roles and see who
has the roles.

Test Plan:
 * Create custom roles for each enrollment type
 * Test all the settings page's functionality like adding/deleting users with custom roles
 * Make custom observers observe students in various combinations of custom roliness
   - verify that the new observer role has the custom role
 * Make sure the section limited check box shows up for custom tas/teachers by selecting those options in the new user select box

closes #cnvs-1166

Change-Id: I5f133bf1b5b1438d7f8e34297b450ff561d401d0
Reviewed-on: https://gerrit.instructure.com/16272
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2012-12-26 15:46:12 -07:00
Cameron Matheson f842c4ba4c cache submission lateness
fixes #CNVS-1295

* Adds a new 'late' field to submissions
* Adds compute_lateness method to submissions which
  is called on every save when the 'late' field is nil
  or when the submission time changes
* Adds after_save callbacks to Assignment and
  AssignmentOverride to recompute lateness on submissions
  in a background process
* Includes data migration for initializing the value of the
  new cache field

Change-Id: I68d47fdbcbb167bef8428b6ecd48bf6f66ef8cb7
Reviewed-on: https://gerrit.instructure.com/16086
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-12-26 15:37:18 -07:00
Cameron Matheson 105a4ae0a9 don't ignore muted assignments in gradebook csv
closes #CNVS-2397

Test plan:
  - set up a course with assignments
  - mute some assignments
  - set grades for students
  - make sure the gradebook csv totals and the gradebooks match
  - the student's grade page (when masquerading) should *not* match
    (it should ignore muted assignments)

Change-Id: Iebe15c5d108dcfa899bd501cc6dd45ceb688fa25
Reviewed-on: https://gerrit.instructure.com/16197
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Simon Williams <simon@instructure.com>
2012-12-26 10:11:50 -07:00
Nathan Mills cbe2494c24 set cache headers for files
fixes #PS-73

test plan:

1. create a page that embeds a text file and a images

2. make sure that the page displays correctly

3. make sure you can  download the image from files

Change-Id: I2c4d7515d91b7c3aec1b01a41ceb6072bed33d6c
Reviewed-on: https://gerrit.instructure.com/16179
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2012-12-26 09:39:25 -07:00
Jeremy Stanley 7a6f15e975 fix API workflow wrt inactive/deleted roles
add index and show endpoints for Roles API; fixes #CNVS-2357
these endpoints add the ability to view inactive roles

remove the ability to delete and make the DELETE method
deactivate (at least until we figure out how to delete properly
with regard to account users, enrollments, and sub-accounts);
fixes #CNVS-2378

test plan:
 * render the docs and examine the new actions
 * test the index action (GET /api/v1/accounts/X/roles)
   - make sure it lists all roles
   - make sure built-in roles are 'active'
   - make sure you can list inactive roles
     with state[]=inactive
 * test the show action (GET /api/v1/accounts/X/roles/RoleName)
   - make sure it works for a built-in role
   - make sure it works for a custom role
   - make sure it 404s if an invalid name is given
 * test the deactivate action (DELETE /api/v1/accounts/X/roles/RoleName)
   - make sure it deactivates the role

Change-Id: Ic0b1e1709d2f52b17d26bc15ab7ecd60dd7ed743
Reviewed-on: https://gerrit.instructure.com/16291
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
2012-12-26 07:30:13 -07:00
Jon Jensen 03502069b7 only count self enrollments toward limit, refs #CNVS-1120
don't count manually created student enrollments toward the cap

test plan:
1. set an enrollment limit on a new course (e.g. max 1)
2. as a teacher, add several students
3. confirm that additional students can still self enroll up to the limit
   (the students added in step 2 don't count)

Change-Id: I93309181f3a5021d6cf51b8c02ba899f017cd32e
Reviewed-on: https://gerrit.instructure.com/16308
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2012-12-23 15:59:31 -07:00
Jon Jensen c51c4fbe0c skip the message if we can't find the participant record
Change-Id: Ie771b72283de9831de182d72e2f6c26a7754e67a
Reviewed-on: https://gerrit.instructure.com/16338
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
QA-Review: Zach Wily <zach@instructure.com>
2012-12-22 08:48:24 -07:00
Cody Cutrer c78f334c4f get the last author from the last message, not the stream item
Change-Id: I3092383b8898f17f7bf1f4c97fb113f322f3797d
Reviewed-on: https://gerrit.instructure.com/16337
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-12-22 08:19:38 -07:00
Cody Cutrer ead78975b0 change cached enrollments cache key
Change-Id: I52f95e7cbca04e26853e57461969892838d2250c
Reviewed-on: https://gerrit.instructure.com/16336
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-12-22 08:11:52 -07:00
Cody Cutrer 8adadea4ee avoid calling author on nil object
Change-Id: I6b6a5fb537a3e6fbd8321d124f3e4e3b905995e7
Reviewed-on: https://gerrit.instructure.com/16335
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2012-12-22 08:10:15 -07:00
Simon Williams dc8d35802b set graded_at when grading from csv upload
fixes #CNVS-2003

test plan:
- upload a csv to the gradebook that changes some grades
- go to the grading history
- the grading changes should show up correctly

Change-Id: I28ededf74b57286c5a85786e041781d714c665fe
Reviewed-on: https://gerrit.instructure.com/16315
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2012-12-21 17:18:29 -07:00
Jon Jensen bc15ef9b99 let plugins require (and customize) terms checkbox on cc confirm page
refs #CNVS-2297, #CNVS-1318, #CNVS-1301

test plan:
1. sign up via open registration (/register)
2. go to the link in your email to set a password
3. you should not have to agree to the terms again (since you did on the
   /register page)
4. refer to plugin test plan for other scenarios

Change-Id: Ie31a3424c9a8126e4c28e794b1a96da6faa7382c
Reviewed-on: https://gerrit.instructure.com/16294
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2012-12-21 16:48:16 -07:00
Cameron Matheson 2829923411 make grade_summary page use GradeCalculator
fixes #CNVS-1769

Test plan:
  * Go to the gradebook
    - compare grades and dropped assignments to those listed on the
      grade_summary page (you can get to the grade_summary page by
      clicking on a student's name in the gradebook).  Be sure to
      compare the grades with and without including ungraded assignments
  * as a student, go to the grades page
    - try changing some scores and make sure the final grade, assignment
      group totals, and dropped assignments change accordingly.

Change-Id: I219db0d4a8665edd4a6f8291708f25124ee35a8f
Reviewed-on: https://gerrit.instructure.com/16142
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2012-12-21 16:47:43 -07:00
Cameron Matheson f8835c1a11 fix grade-dropping in gradebooks
The main feature of this commit is that it introduces a grade-dropping
scheme that maximizes the students grade (rather than the simple yet
somewhat arbitrary and inconsistent scheme we had before)

Also fixes the following bugs:

fixes #CNVS-1475
fixes #CNVS-1463
refs #CNVS-1769

Test plan:

  Create a few assignments in an assignment group with drop rules
  (you'll need at least 'drop lowest' and 'never drop') and make sure
  those rules are respected in the gradebooks (old and new).

  Don't forget to test with the 'treat ungraded as 0s' option

Change-Id: I67a4bcc0fc2edd259e78ed3e4b65355c8091d284
Reviewed-on: https://gerrit.instructure.com/16140
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2012-12-21 16:44:56 -07:00
Stanley Stuart 50243db1e7 improve outcome groups api with more helpful error message
Before, the API for groups returned the string 'error' when an API
consumer tried to delete a link to an outcome that that was the last
link to an outcome.

The API still needs better error messages for when RecordNotSaved
occurs.

test plan:
  * as a teacher, create an outcome
  * attach it to a rubric.
  * edit some things in the rubric and save the rubric.
  * now remove the outcome from the rubric
  * try to unlink the outcome from the api from its group
    * if you didn't create an outcome group, all outcomes by default
    * belong to the default "root outcome group" for the course
  * the api should give you a message indicating that you can't delete
    the last link to an outcome instead of message of 'error'

Change-Id: I136dd4e4f61581668b2eb7d9b65245664ef2f678
Reviewed-on: https://gerrit.instructure.com/15940
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2012-12-21 16:09:44 -07:00
Zach Pendleton 48b0a2386c crop calendar event details in IE8/9. fixes #CNVS-1168
event descriptions with words > 58 characters no longer
overflow the event pop-up.

test plan:
  * create an event whose description has a word > 58 characters;
  * in IE 8 or 9, click the event in calendar 2 and verify that
    the event description renders properly.

Change-Id: I9a58781fee25116e4592ffc8e6b9dd6f55b7a8ad
Reviewed-on: https://gerrit.instructure.com/15594
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Marc LeGendre <marc@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Zach Pendleton <zachp@instructure.com>
2012-12-21 16:08:10 -07:00
Zach Pendleton 414684704d display error message on conversation attachment errors.
fixes #CNVS-1219

when a conversation creation errors while creating an
attachment, display an error message that reads,
"Attachment failed to upload, please try again."

test plan:
  * set up S3 uploads locally;
  * paste line 525 of files_controller.rb just above line
    516 and prepend it with the word "return";
  * restart your canvas server;
  * attempt to send a conversation message with an attachment;
  * verify that a helpful error message is displayed.

Change-Id: I706c47d97a58db60e2e2bb777f4123e0f6ce7903
Reviewed-on: https://gerrit.instructure.com/15911
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2012-12-21 15:21:25 -07:00
Ryan Shaw 834f4392ea transfer focus to opened region in .element_toggler
this makes it so if you have an .element_toggler
it will try to focus on the first child tubbable
element within the region in addition to the region
itself.  For example: the first <input> inside
a hidden <form>

Change-Id: I3e85f1f549504cbb528f1653736457d04b4cc7bf
Reviewed-on: https://gerrit.instructure.com/16107
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2012-12-21 13:51:27 -07:00
Ryan Shaw 63112ca16e better styles on Roster user page, fixes: #CNVS-1970
before: https://www.dropbox.com/s/ir1duda31kqv4kh/Screen%20Shot%202012-12-05%20at%204.15.45%20PM.png
after:https://www.dropbox.com/s/j9a0f6tfb517a8p/Screen%20Shot%202012-12-05%20at%204.15.49%20PM.png

THIS MUST GO OUT AT THE SAME TIME AS THE CORRESPONDING
ANALYTICS COMMIT!

Change-Id: I647b911f1a92f33d0e5cfe4b6fb4d31c95fda48f
Reviewed-on: https://gerrit.instructure.com/15866
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-12-21 13:49:03 -07:00
Simon Williams 5ef87548a8 validate authenticity token on quiz backup and submit
fixes #CNVS-2176

test plan:
- as student A, log in, start taking a quiz, and log off in a separate tab
- as student B, log in, and start answering questions in student A's quiz tab
- these should not be backed up to either student A or stuent B's submissions
- try submitting, it should fail

Change-Id: Ia497663c0ab82465641c836c00cbf1e3a112f59a
Reviewed-on: https://gerrit.instructure.com/16061
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
2012-12-21 13:24:09 -07:00
Simon Williams 34bf7cb4af add course setting to disable student distribution graphs entirely
there are various concerns about the distribution graphs available on the
student grades page revealing too much about other students scores.  give
teachers the option to remove these for all students in their course.

fixes #CNVS-1063

test plan:
- as a teacher, grade > 5 students for an assignment
- as a student, verify that you can see the box and whisker plot of the grade
  distribution on your grades page.
- as a teacher, go to course settings > more options > and check "hide
  distribution graphs"
- as a student, verify that you cannot see the graph anymore.

Change-Id: Ieab4137e52b616a394a3de0ee313cfd0a0abcc0d
Reviewed-on: https://gerrit.instructure.com/16191
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-12-21 12:45:15 -07:00
Ethan Vizitei ed2602a1cc allow site admins to circumvent CAS in OAuth workflow
refs #CNVS-523

This will now pass the canvas_login parameter
on through the oauth workflow.

there are also several small refactors to pull
the oauth workflow out of the pseudonyms
controller and into a couple lib objects

TEST PLAN:
1) As a site admin, attempt to use the OAuth
through a domain that uses delegated authentication

2) add the "canvas_login=1" url parameter to your
oauth url

3) you should be taken to the regular canvas login
screen instead of the CAS url.

Change-Id: I8b68e5b1c6914b6109af6aabcbba03ed15c4f9cf
Reviewed-on: https://gerrit.instructure.com/16240
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Ethan Vizitei <ethan@12spokes.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-12-21 10:57:17 -07:00
Joel Hough a9626310f8 make [quiz|assignment].locked_for? vdd aware
fixes #CNVS-517
fixes #CNVS-761

test plan
- start with a course with students in different sections
- create a quiz with a lock date that locks the quiz currently
- create a lock date override that unlocks the quiz for one section
- ensure that a student from a section that the override does not apply to
  does see a lock icon on the course's quizzes list for the quiz
- ensure that a student from the section that the override does apply to
  does not see a lock icon on the course's quizzes list for the quiz

Change-Id: Ic1f553818ff106e1d29a8f1b66d8445b99aecffc
Reviewed-on: https://gerrit.instructure.com/16228
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-12-21 10:38:06 -07:00
Ryan Shaw 15b465dd18 a minimal style for jqueryui tabs
add the class .ui-tabs-minimal to a .ui-tabs element
to not have left, bottom, right borders

http://cl.ly/image/0p2W3332072N
instead of:
http://cl.ly/image/1G062A0F282a

http://cl.ly/image/0R2U2j1e0E0y
instead of
http://cl.ly/image/1G062A0F282a

http://cl.ly/image/1h1f3m3q171N
instead of
http://cl.ly/image/1h1f3m3q171N

Change-Id: I4488ed396c656e49adbf9a0663ad95cd328afa5f
Reviewed-on: https://gerrit.instructure.com/15840
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2012-12-21 10:28:58 -07:00
Zach Pendleton 0db0bac4c4 respect overrides when deciding lateness in speed grader.
fixes #CNVS-474

when displaying submission lateness in the speed grader,
respect any assignment overrides.

test plan:
  * create an assignment due in the past with an override
    due_at in the future;
  * as a student to whom the override applies, submit the
    assignment;
  * as a teacher, view the submission in the speed grader
    and verify that no late message is displayed.
  * make a late submission and verify that the late message
    is still displayed as expected.

Change-Id: Id9c0a55569b39f2e7d316ee0ced9189795ccfbf9
Reviewed-on: https://gerrit.instructure.com/15961
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
2012-12-21 09:40:07 -07:00
Jon Jensen d22c1903aa make own profile available at /about (and /about/self)
refs #CNVS-1360

test plan:
1. go to /about and /about/self
2. you should see your profile (if profiles are enabled)

Change-Id: I7f03cd8806247f0ed5a627ee56a98062e0a1f085
Reviewed-on: https://gerrit.instructure.com/16277
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2012-12-20 23:28:11 -07:00
Jeremy Stanley 3fccb0c28e don't set permissions for nonexistent roles; fixes #CNVS-2310
test plan:
 - Using the "update an admin role" API, attempt to set permissions
   for a role that doesn't exist
   (e.g., PUT /api/v1/accounts/1/roles/NonExistentRole?permissions...)
 - You should get a 404 error, not a 200 response showing the
   permissions you just set...

Change-Id: Ic78b79a1d7e2a20868c969f3be3fdc27b602099d
Reviewed-on: https://gerrit.instructure.com/16208
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2012-12-20 20:58:00 -07:00
Stanley Stuart 718fb611fa remove stray debugger statements
Removes some stray debugger statements, and some commented-out
debuggers.

test plan:
  - spec/selenium/teacher_wiki_and_tiny_wysiwyg_spec.rb should not hang

Change-Id: I10736d4346c77522497d946f90b74f5f49fe0e9b
Reviewed-on: https://gerrit.instructure.com/16210
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-12-20 18:37:10 -07:00
Jeremy Stanley c1896fbeb8 make delete-role endpoint fail (bad request) if role is in use
instead of deleting it if it can, and deactivating it otherwise,
but returning the same response code either way.

add a separate endpoint for deactivating a role.

also document all three endpoints (delete, deactivate, activate)

test plan:
 - create a role
 - delete the role, and verify it gets deleted
 - delete the role again, and verify you get a 404
 - create a role and assign it to someone
 - try to delete the role, and verify this fails with
   "Role is in use" error message
 - deactivate the role; this should succeed
 - reactivate the role; this should work too

fixes #CNVS-2223
fixes #CNVS-2260

Change-Id: I04a567de104d5d39ef2cda6bb10c915a85d18ec5
Reviewed-on: https://gerrit.instructure.com/16122
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-12-20 17:25:39 -07:00
Jeremy Stanley ce6b44d5d5 fix logic for checking presence of parameters; fixes #CNVS-2136
note: a prior commit handles "false" as a string (among other
things); this commit fixes a bug handling false as the native
JSON data type.

test plan:
 - disable a permission for a role where it is enabled by default,
   using a raw JSON request body using native boolean true and
   false values, not the strings "true" and "false".
     for example, use the request line

       PUT /api/v1/accounts/1/roles/TaEnrollment

     pass the header (in addition to Authorization)

       Content-Type: application/json

     and the raw request body

       { "permissions": { "read_forum":
         { "enabled": false, "explicit": true } } }

Change-Id: Ifbd7dee36b00bab801f9284d23c94cb731efe615
Reviewed-on: https://gerrit.instructure.com/16235
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
2012-12-20 16:48:42 -07:00
Jon Jensen a67d1a0007 make terms text overridable by plugins, refs #CNVS-2297
test plan:
1. self enroll in a course
2. you should see the regular "terms" checkbox and text

Change-Id: I8c3e677d8e30343626d198258e604c65755dddf3
Reviewed-on: https://gerrit.instructure.com/16225
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2012-12-20 16:16:00 -07:00
rob orton d0c8001a66 fix due date change messages to have correct date
broadcast policy  was being kicked off too early 
which caused the previous due date to be sent on a
due date change notification

test plan
 * create an assignment 
 * change the due date
 * the assignment due date change notification 
   should have the correct due date

Change-Id: Icaa26143e36113e8ad001e7ce950e463d7526787
Reviewed-on: https://gerrit.instructure.com/16170
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2012-12-20 16:00:21 -07:00
James Williams 065e9d7929 update course people page for course role engine
include separate sections in each column for
custom student, teacher, and ta roles

test plan:
 * create custom roles
 * enroll users in a course using the new roles
 (note: this will be difficult until the ui for
 enrolling custom roles is ready)
 * confirm that the "People" page shows correctly
 (including sections)

closes #CNVS-1167 ( also #CNVS-2244 )

Change-Id: I73fcf82e407c6af00f6f8f7a8c30141adb704227
Reviewed-on: https://gerrit.instructure.com/16058
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2012-12-20 14:05:12 -07:00
Mark Severson 6fab11cc82 changed Student View to create a default section (if necessary)
fixes #CNVS-2300

test plan:
 * using a course that has no sections
 * click 'Student View'
   - the Student View should show correctly (not error)

Change-Id: I2dbfab8775d51a4a0cf4aae22de9f7207da848c3
Reviewed-on: https://gerrit.instructure.com/16223
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2012-12-20 13:46:17 -07:00
Ryan Shaw e886bf2d05 add $.fn.indicateLoading for when you don't need to disable
we have $.fn.disableWhileLoading  that is great for
when you want to disable an element while a deferred
(ajax request) is working.  this is for when you just
want to show a little loading icon, and is a lot lighter
weight.

Change-Id: I0271c9be9a5bb84e1faae5d94f09bac8a718c70e
Reviewed-on: https://gerrit.instructure.com/16035
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
2012-12-20 10:01:00 -07:00
Jon Willesen bb22a92259 creating submission comments no longer goes to author's inbox
To support instructors of MOOCs, making a submission comment
via gradebook or speedgrader should no longer create a
conversation message in the instructor's inbox. The
conversation will only exist in the sent folder.

If a private conversation between the teacher and student
already exists, the message will be added to the private
conversation and its state will not be modified for the teacher.

In general, the behavior of submission comments was changed so
that creating a submission comment does not create a message in
the author's inbox. Instead the message should appear in the
author's sent folder. This applies to all users (teachers and
students).

fixes #CNVS-1162

test plan:
 - As a teacher, create a submission comment from gradebook.
 Make sure the comment doesn't show up in the teacher's inbox.
 - As a teacher, create a submission comment from speedgrader.
 Make sure the comment doesn't show up in the teacher's inbox.

 - In general, create submission comments as a teacher and a
 student and run through the following combinations of states:

 - Existing Private Conversations:
   - If a private conversation between the student and the
   teacher already exists, the state of the message should not
   be updated for the submission comment author.
   - If a private conversation between the student and the
   teacher does not already exist, the message should only show
   up in the sent folder for the submission comment author.

 - Notification Preference: Mark new submission comments as read
   - Setting this should still prevent incoming submission
   comment messages from showing up in the instructor's inbox
   or changing the state of an existing private conversation.

 - Muted Assignments:
   - When an assignment is unmuted and only one user has made
   submission comments, that user should be treated as the
   message author.
   - When an assignment is unmuted and more than one user has
   commented on the submission, the message is treated as a new
   message for everyone.

Change-Id: Ic55cc64f181e8a0c560fe325bd31ea65082568d2
Reviewed-on: https://gerrit.instructure.com/16007
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2012-12-19 16:32:33 -07:00
Simon Williams 953a593f79 add missing quiz warning dialog
warn users when beginning or resuming a one question at a time, can't go back
quiz from the right sidebar (we are already warning for the main page links).

fixes #CNVS-1952

test plan:
- take a one question at a time, can't go back quiz (with multiple attempts)
- leave it, go back to the quiz page
- click resume from the right sidebar
- it should warn you about can't go back
- finish the quiz
- take it again from the right sidebar
- it should warn you about can't go back

Change-Id: Iff5f2b9bd10a926c86c8b0a7ca6586854f62260b
Reviewed-on: https://gerrit.instructure.com/15948
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2012-12-19 13:47:36 -07:00
Jon Jensen 92c4bfdd37 self enrollment caps, refs #CNVS-1120
add support for self enrollment caps to limit the size of a particular
course. there is no UI for setting caps (yet)

test plan:
1. run specs
2. follow test plan for https://gerrit.instructure.com/15819

Change-Id: Ibf0a8f04f0c2efa820d0850cef26dfae20849246
Reviewed-on: https://gerrit.instructure.com/16021
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2012-12-19 12:29:58 -07:00
Jon Jensen f74ebd096b self enrollment refactor to facilitate CN integration
fixes #CNVS-1119, potentially supersedes
https://gerrit.instructure.com/14501 with a little work.

simpler flow that is more consistent with FFT signup. whether you click
the "join course" button (popup) or go to the join url, the workflow is
the same:

1. if you are authenticated, you just click the enroll button.
2. if you are not authenticated, you can either:
   1. enter your (canvas/ldap) credentials and submit to join the course.
   2. register and join the course (single form). you will then be
      dropped on the course dashboard in the pre_registered state just
      like a /register signup (you have to follow the link in your email
      to set a password).

note that if open registration is turned off, option 2.2 is not available.

other items of interest:

* fix CSRF vulnerabilities where you can enroll authenticated users in
  open courses, or un-enroll them if you know their enrollment's UUID
* move to shorter course-id-less route (w/ join code)
* reuse UserController#create
* handy openAsDialog behavior and embedded view mode
* better json support in PseudonymSessionsController#create
* extract markdown helper from mt
* show "you need to confirm your email" popup when you land on the course
  page the first time (already showed on dashboard)

test plan:
1. test the authenticated/unauthenticated scenarios above, for both the
   popup and join pages
2. regression test of /registration forms

Change-Id: I0d8351695356d437bdbba72cb66c23ed268b0d1a
Reviewed-on: https://gerrit.instructure.com/15902
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2012-12-19 12:29:47 -07:00
Bracken Mosbacker 2ea0eeaf04 add roles with counts helper for courses
Adds a convenience method to get all the roles available
to a course and the count of those enrollments in the
course

Test Plan:
 * Run specs

refs #cnvs-1166

Change-Id: Ia884591e135b9f84c2472d4ef2f2df3fa528a6f3
Reviewed-on: https://gerrit.instructure.com/16098
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
2012-12-19 08:25:11 -07:00
Mark Ericksen 0bfe81e35a Apply lock-date override dates for students. Fixes #CNVS-507
Fixes #CNVS-508.

Added Observer tests.

Testing Notes:
=========
* As a teacher, setup an assignment that has different
   lock dates for the base versus a section.
* As a student, in a section, verify that the alternate
   lock dates are used for display and submission.
   * Can also test that a default lock date that would be locked
      is NOT locked when a section has different dates. It
      should still allow the student to submit an assignment.

Change-Id: Iccb6d7407d10575edafc2e0b888760d78cd5abd1
Reviewed-on: https://gerrit.instructure.com/15883
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2012-12-18 17:30:15 -07:00
Simon Williams 622833300c avoid interacting with deleted grading standards
- make course/account/user associations not load deleted grading standards
- make course copy not copy deleted grading standards
- never show more than 100 grading standards on a course/account page

fixes #CNVS-2230

test plan:
- in a course, create a grading standard
- delete it
- copy the course
- the destination course should not have that grading standard

Change-Id: I0063b5ca704667b2863f1d571c86df82c2a5cb97
Reviewed-on: https://gerrit.instructure.com/16108
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2012-12-18 17:03:20 -07:00
Jon Willesen a5e84c650a make links in discussion gear menus accessible. fixes #CNVS-1297
gear menus in discussions could previously be selected and navigated,
but links could not be selected with the enter key.

test plan:
  * create at least one discussion in a class;
  * using voiceover or another screen reader, navigate to the course
    discussions page and tab to the gear menu;
  * press "enter" to click on the gear menu, and then use the arrow
    keys to navigate to a menu option;
  * click the menu option with the enter key and validate that the
    link works as expected;

Change-Id: I4f6bc65d2156169bb86784d566441f964f224c1a
Reviewed-on: https://gerrit.instructure.com/13463
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
2012-12-18 16:28:10 -07:00
Chris Hart ddce97bf56 Print style sheet for grade summary page, fixes: #CNVS-465
test plan:
as a teacher go to courses/x/users/y/grades or as a
student go to courses/x/grades and press command+p
or press the print button on that page,
make sure the print-preview looks nice

Change-Id: I5feab9c231d857a29c79a3fbad7e4b77eb95b7f1
Reviewed-on: https://gerrit.instructure.com/15725
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2012-12-18 15:03:50 -07:00
Dave Donahue 3b3b746cca vdd backend for quizzes
[Fixes #CNVS-1145]

* Adds support for attaching AssignmentOverrides to quizzes
* Links common overrides for Assignments that belong to Quizzes
  so quiz.due_dates_for(user) == quiz.assignment.due_dates_for(user)
* Moves common functionality for VDD out of the Assignment model
  and into the DatesOverridable module, which is now included on
  Quiz for a consistent interface

Test plan:
* Run through a few of the old VDD scenarios and verify things
  still work as expected since a lot of code has shifted around
* No interface changes have been made to quizzes yet, so nothing
  to check there

  https://gist.github.com/f12b3694016f3dcc979e

Change-Id: I32b4a54273f90fac689e05174039b8efc952dd39
Reviewed-on: https://gerrit.instructure.com/16028
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2012-12-18 14:28:34 -07:00
Ryan Shaw 61259ca30d dont force valid email address on mobile login, fixes: #CNVS-2306
test plan:
on an android in the mobile chrome browser go to log into canvas
try to log in with a non-email username (for example, mine is 'ryan')
make sure it lets you log in.

right now it errors because we add "type=email" to
the input to get the nice email-hinted keyboard entry.
but by doing so, it will also use native validatation
to make sure it is a valid email, adding "novalidate"
to the <form> fixes it

Change-Id: Ie3215100d07a932508c366dac147d59502696c8e
Reviewed-on: https://gerrit.instructure.com/16175
QA-Review: Mark Suman <marks@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-12-18 14:12:41 -07:00
Ryan Shaw 16bc449325 fix icons on assignment right side
this: http://cl.ly/image/0S2f0s1g2p2E
instead of: http://cl.ly/image/0a3g402b2g1A

Change-Id: I7d85f916fd2d5dac481e4dbb3c6ee996f5310c75
Reviewed-on: https://gerrit.instructure.com/16087
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Reviewed-by: Chris Hart <chris@12spokes.com>
2012-12-18 13:48:18 -07:00