Commit Graph

255 Commits

Author SHA1 Message Date
Landon Wilkins bbcc385704 add teacher configuration of student organized group enrollment type
fixes CNVS-9363

test plan:
* create a student organized group
* log in as a teacher
* go to the new group management page
* select the "Student Groups" group set
* click on the "+ Group" button
* verify that you can select a join level
**  (either "Members are free to join" or
**          "Invitation only")
* select "Members are free to join"
* enter a group name
* hit save
* log in as a student
* go to /courses/:course_id/groups
* verify that the group you created appears
**  in the "Available Groups" listing
*******************************************
* log in as a teacher
* verify that the "Joining" option only appears
**  when adding or editing a group in the
**  Student Groups group set

Change-Id: I42c49869d68bebd6deb0ba9beff1fd0e94871911
Reviewed-on: https://gerrit.instructure.com/26304
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2013-11-20 17:05:25 +00:00
Simon Williams 6e64b5091a validate points possible on assign/discuss edit pages
fixes CNVS-1744

test plan:
- on the assignment/discussion new/edit pages
- any number (including decimals should work)
- any non-number should be rejected

Change-Id: I8a5ea4e317a355c21e168a09c62568360d459af3
Reviewed-on: https://gerrit.instructure.com/26407
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-11-19 21:25:21 +00:00
Matthew Irish c250957a4c fix for empty create group dialog
fixes CNVS-9490

trigger render event on the collection so that we don't accidentally
re-render the entire IndexView

test plan
=========
with draft state enabled:
- navigate to the assignments index page and edit an assignment group
  from the gear menu
- click the button to add a new assignment group
- verify that the modal has a form in it and that a new assignment group
  can be added

Change-Id: I877dc6daddfcb4a2b6f67dfd862dc2cb5328bcc3
Reviewed-on: https://gerrit.instructure.com/26420
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Matthew Irish <mirish@instructure.com>
2013-11-19 19:14:15 +00:00
Matthew Irish 00f3fbd82b fix validation for assignment group edit dialog
don't include never_drop rules in dialog validation

fixes CNVS-9491

test-plan
=========
- enable draft state and navigate to the assignment index page
- add a number of assignments to an assignment group
- open the edit assignment group dialog
- add assignments as never drops
- verify that you can save the dialog

Change-Id: I355b28f1f8efe08e18cff618fb0b63f9a83b4a76
Reviewed-on: https://gerrit.instructure.com/26381
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Matthew Irish <mirish@instructure.com>
2013-11-19 19:13:43 +00:00
Cameron Sutter bba53e5a97 draft state super specs
fixes CNVS-8941

test plan
- specs should pass; a little bit faster :)

Change-Id: I6c9b4f7204f601fd3c9dc6f16f85d4b6d5c0503f
Reviewed-on: https://gerrit.instructure.com/25512
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2013-11-15 17:31:45 +00:00
Liz Abinante 9b2d4e36b3 adds validation for name to assignment quick add
fixes CNVS-9495

test plan:
- with draft state enabled
- from assignment index page as a teacher
- click quick add button for assignment
- save without title
- verify that the error message renders
- also verify that you can save assignment with a title from quick add window

Change-Id: If7359af56656b9e3dd6a33b9db9d6638c8b3f175
Reviewed-on: https://gerrit.instructure.com/26281
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-11-14 21:36:12 +00:00
Mark Severson 12077de92d fancy page revisions
test plan:
 - with draft state disabled
   * ensure the page revisions still behaves as would be expected
 - with draft state enabled
   * navigate to a page
   * using the gear menu, select 'View Page History'
   - the revisions list should open with the latest revision selected
   * the 'Next' and 'Previous' page buttons should work
   * restoring a revision should work
     - should restore title, url, and page content
     - restoring a revision that is 'Same as latest' is not allowed
   * clicking the 'X' next to Revision History or the page breadcrumb
     should navigate back to the page view

 - any browser windows opened to the revisions page should show the
   alternate page, if refreshed (when transitioning to/from draft state
   being enabled)

closes CNVS-8486

Change-Id: Ie22bf82ead396cbfa5a206c3a1234859cb2df7ff
Reviewed-on: https://gerrit.instructure.com/25922
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-11-14 21:21:30 +00:00
Matthew Irish 93f1024855 add id to allow focus of assigment menu
data-focus-returns-to was not working for move and edit actions since
the id it was looking for didn't exist

changed DialogFormView to ensure that close is called in the jquery ui
dialog close callback-this means that focusReturnsTo will be called when
using the ui close button or @el.dialog('close')

made screenreader-only for the assignment menu come before the icons for
consistency

fixes CNVS-9235

test plan
=========
- enable draft state
- open the "Move To" or "Edit" dialog for an individual assignment
- close the dialog either by saving or canceling
- verify the focus returns to the cog menu for that assignment
- verify the above works as expected with screenreaders

Change-Id: I41e1ea07bfed6a1eb32b23a420949465bb023f8c
Reviewed-on: https://gerrit.instructure.com/26002
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Matthew Irish <mirish@instructure.com>
2013-11-13 22:09:01 +00:00
Liz Abinante 85114b790e fixes reading of publish/unpublish button with screenreader
fixes CNVS-9253

test plan
- using screenreader on assignment show page
- publish and unpublish an assignment
- verify that title/description of button are read correctly and not mashed together
- verify that the correct status titles are displaying on the index page

Change-Id: Ib332a286ee4b89a6b008df5e572e233b0d0a4f6b
Reviewed-on: https://gerrit.instructure.com/26189
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
2013-11-13 22:08:08 +00:00
Cameron Sutter 1fbb37c391 only query grades for students (not observers)
fixes CNVS-9064

test plan:
 - with draft state on
 - view the assignment index page as an observer
 - the page should look like the student page, but
   the grades should like like it does on the teacher page
   ('35 pts' and not '-/35 pts')

Change-Id: I02bd086c3fdb82d49300a986eba5a7694337b6d7
Reviewed-on: https://gerrit.instructure.com/26137
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-11-13 21:06:06 +00:00
Cameron Matheson 381b36b586 GradeCalculator: work with string ids
fixes CNVS-9486

Test plan:
  * set up an assignment group with never drop rules
  * make grades for the assignment such that the assignment that
    shouldn't be dropped would be dropped if it weren't never_drop
  * make sure that the assignment is not dropped

Change-Id: Ia7c772f23c6f01c7fd060bbdcb4efe3eaea386ee
Reviewed-on: https://gerrit.instructure.com/26266
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2013-11-13 17:50:51 +00:00
Braden Anderson 0fed8a1949 calendar2: display details popup when clicking agenda items
fixes CNVS-8659

test plan:
  * open calendar2 with agenda view enabled
  * select agenda view
  * verify that the styling matches David's new spec
  * click an agenda item
  * verify that a details popup is displayed
  * verify that the item can be edited and deleted from the popup
  * click on the far left or far right of an event
  * verify that the triangle on the popup is bounded
    by the popup's width
  * verify that keyboard focus is managed when traversing the
      event editing dialogs
  * open agenda view with VoiceOver and JAWS
  * verify that event browsing and editing works and that tab
      navigation moves through elements in intuitive order

Change-Id: Id3b3749e91ea66cc348d82062fc6b87f9ca24815
Reviewed-on: https://gerrit.instructure.com/25810
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2013-11-11 18:55:22 +00:00
Jon Jensen 1cc0846b04 support for student organized groups in new ui, fixes CNVS-8210
test plan:
1. under course settings, let students organize their own groups
2. as a student, create a group
3. as a teacher, go to the groups UI
4. the Student Groups category
   1. it should be present (first tab) w/ a big notice about how it's
      special
   2. you should see the student's group in it
   3. the student should be a member
   4. you should *not* be able to edit or delete the category
   5. you should be able to add/edit/delete groups in the category
5. instead of "Unassigned Users", you should see "Everyone"
   1. assigning a user to a group should not remove it from "Everyone"
   2. removing a user from a group should not double-add it to "Everyone"
6. in large_roster view, you should be able add anyone to a group (even if
   already in another group)
7. you should be able to move students from group to another

Change-Id: I7d4255610f353a8911c0c4f591780ff009a12998
Reviewed-on: https://gerrit.instructure.com/25911
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-11-08 23:32:47 +00:00
Jason Madsen c4630a5bff quiz submissions files api
fixes CNVS-8977

test plan:
  - create a quiz with a file upload question
  - take quiz as a student
  - verify that file submissions works
  - verify that any other upload (non quiz submission) works

Change-Id: If043de538a52586c5a9ee8efa16f490163a177fe
Reviewed-on: https://gerrit.instructure.com/25909
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
2013-11-08 20:57:02 +00:00
Simon Williams 7dfaa1989d fix not yet graded on new assignment index page
if an assignment has a submission object, but the student hasn't submitted
yet, it should not say "not yet graded" on the index page.

fixes CNVS-9294

test plan:
- as a teacher, create an assignment that expects a submission, go to
  speedgrader, and comment on it for a student
- as that student, go to the new assignment index page
- it should not say "not yet graded" on that assignment
- submit the assignment
- now it should say "not yet graded"

Change-Id: Ie791da5caed911ae28f1eb60d48c650c9baa5aca
Reviewed-on: https://gerrit.instructure.com/26009
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-11-08 17:05:16 +00:00
Landon Wilkins 93dbb2517b fix random assign functionality for group sets with group limits
fixes CNVS-9232

test plan:
1) create a group set with a group limit of 2
2) create a couple groups
3) ensure you have more than 4 students
4) perform a random assignment
5) verify that all the available group slots are filled
6) verify that any remaining unassigned students
     are displayed in the unassigned student area
7) verify that the # of unassigned students is correct

Change-Id: I290586ae99f9bd77a400cfb1f25d9725a6e19c0e
Reviewed-on: https://gerrit.instructure.com/25966
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeff Belser <jbelser@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-11-07 22:07:01 +00:00
Cameron Sutter 07f2868daa invalid drop rules input
fixes CNVS-9210

test plan:
 - with draft state on, in the assignments index page
 - attempt to input 'tree' or 'plant' or anything really, into
   both the drop lowest scores and drop highest scores input boxes
   in the edit assignment group dialog
 - click save
 - it should ask you to use a number and it should not close the
   dialog or save the rules

Change-Id: I72ecfb3181e685d6c619af4ba0741838018a87ed
Reviewed-on: https://gerrit.instructure.com/25975
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: David Scoville <davids@instructure.com>
2013-11-07 16:45:48 +00:00
Matthew Irish 4113cd97bd change the grade display depending on type
if the assignment is using something other than points for the grading
scheme, we'll show a slightly different format on the assignment index
page

the general format is:

    score / points possibe    grade or "Not Yet Graded"

fixes CNVS-9063

test plan:
- as a teacher create a variety of assignments that aren't point-graded
- as a student submit assignments if necessary
- as a teacher grade these assignments
- verify that the grades show in the proper format as a student viewing the
  assigment index page (see above for the proper format)
- verify that an ungraded assignment shows neither points nor a grade
- verify that the above are accessible

Change-Id: I0ed7a9b181aeb20e291d0317a7e19a6f7b571dc2
Reviewed-on: https://gerrit.instructure.com/25739
Product-Review: David Scoville <davids@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2013-11-07 15:11:21 +00:00
Cameron Sutter b0df973fc3 clear search on toggle ShowBy
fixes CNVS-9197

test plan
 - as a student with draft state enabled on the assignments index page
 - type a search term and watch it filter
 - toggle the 'Show by:' method
 - the search term should disappear
   and all the assignments should be visible again
 - toggle back and forth with or without a search term
   and all the assignments should be visible every toggle

Change-Id: Iba964c4dd4cd9ba81c0c912fa190cd80c52030db
Reviewed-on: https://gerrit.instructure.com/25977
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2013-11-07 03:34:37 +00:00
Braden Anderson c2db22ef04 calendar2: agenda view date range
fixes CNVS-8952, CNVS-8662, CNVS-9061, CNVS-8811, CNVS-9200

Test plan:
  * load calendar2 with agenda view enabled
  * open agenda view
  * advance to an earlier day in today's month and verify
      that no network activity is used
  * verify that the header shows the date range extending to
      the last event displayed
  * select a date with more than 100 subsequent events
  * verify that a "Load more" button is present at the bottom
  * click "Load more"
  * verify that a spinner is displayed while loading
  * add an assignment with section due date overrides to your
      agenda range, including a section with no due date
  * verify that the overrides are handled correctly
  * switch quickly between agenda and month views
  * verify that only the appropriate view is displayed

Change-Id: Ib4f87dd8ebccb92ba1157d1901e91a053fb5a75d
Reviewed-on: https://gerrit.instructure.com/25576
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2013-11-05 16:29:12 +00:00
Landon Wilkins d5b9a68391 add drag and drop functionality to new groups ui
fixes CNVS-6221

test plan:
* navigate to new group management ui
* verify that the following drag and drop
    operations work as expected:
**       from | to
**     group1 | group2
**     group1 | unassigned
**     group1 | group1
** unassigned | group1
** unassigned | unassigned
* verify that the cursor changes to a hand upon hover
* verify that the cursor changes to "move" while dragging
* verify that the cursor returns to default upon drop
* verify that dragging to an invalid location results
** in an animation back to the group the user started in
* verify that newly created groups (before refresh)
** are drag n drop enabled
* verify that you can drop into groups that aren't expanded
* verify that you can drop into groups that are expanded
* verify that the opacity effects indicate what group the
** user will join upon drop

Change-Id: I99802f9165a823de878f6855daad3478711f7153
Reviewed-on: https://gerrit.instructure.com/24481
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-11-04 22:10:52 +00:00
Stanley Stuart 3e7d92e769 move compiled coffeescript specs to specs/javascipts/compiled
test plan:
  - run "rm -rf spec/javascripts; git checkout HEAD --
    specs/javascripts" to reset your compiled javascript tests.
  - run rake js:generate_runner
  - JS tests should pass
  - # of JS tests should be the same as they are on master before this
    commit

Change-Id: I936aec8a8a5e2cc739e09757c622f300e99c72ef
Reviewed-on: https://gerrit.instructure.com/25615
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-11-01 21:45:20 +00:00
Simon Williams c3901aa3c3 spec: clean up javascript specs
* vddDueColumnView was never used
* window's beforeunload wouldn't trigger the second time for me
  (both chrome and phantomjs)
* be nicer about retrying specs when run with a custom matcher
* some specs need ENV.PERMISSIONS to exist
* no more vddDueTooltipView
* don't completely overwrite ENV in your spec ಠ_ಠ
* don't start tests before specs are loaded, but don't use
  QUnit.stop() before QUnit has loaded.  instead, don't let it autostart,
  and wait to call QUnit.start() until both are loaded.

Change-Id: Ib89cc9f2bd2c27a04f72e8dc1261953a7a640a46
Reviewed-on: https://gerrit.instructure.com/24795
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2013-10-29 14:55:11 +00:00
Jon Willesen 22fcb45b3d fix sorting on agenda view
the results of the events and assignments api request were not
being properly merged into a sorted list.

fixes CNVS-9037

test plan:
 - create a bunch of days that contain only events.
 - interleave a bunch of days that contain only assignments.
 - verify that the agenda view is sorted correctly.
 - verify that "load more" works properly.

Change-Id: I7f5c203149bb854496e64af053170b50361b7a96
Reviewed-on: https://gerrit.instructure.com/25641
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-10-28 21:10:44 +00:00
Cameron Sutter 11981501c2 overdue assignments in student date view
fixes CNVS-8261

test plan
 - as a teacher create assignments due in the past
 - as a student go to the assignments index page
 - make sure there is a section for overdue assignments

Change-Id: Id839a8b8c5e6fc070a2c94283d919ee33454a39b
Reviewed-on: https://gerrit.instructure.com/25141
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2013-10-25 21:07:21 +00:00
Jon Jensen a9d44ffd50 restyle new group management ui, fixes CNVS-8123
refer to mockups

test plan:
1. the UI should work
2. user/group counts and info should update correctly as you do stuff
3. the UI should look like the mockups

Change-Id: Ifbf90abadf00885790328b4338eb51a4ca4b8b6c
Reviewed-on: https://gerrit.instructure.com/24556
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-10-25 19:28:07 +00:00
Jon Jensen 6351ea4b76 more sensible error when placeholder values are missing in i18n.js
always return "[missing %{placeholder} value]" in place of the missing
placeholder, rather than returning "[missing \"en.key\" translation]"
for the entire translation.

previously you would only got the former if the placeholder was completely
omitted. now you also get it if it is set but the value is null or
undefined.

also move several i18n.js specs from selenium -> qunit \o/

test plan:
see specs

Change-Id: I75ece587d84aa287b9d80d6f086fd2e058b9fc8a
Reviewed-on: https://gerrit.instructure.com/25516
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-10-25 15:09:50 +00:00
Stanley Stuart 6a501e4734 spec fixes for AssignmentListItemView
Test should have been setting a submission model for the test
assignment, but wasn't.

test plan:
  - specs pass

Change-Id: Iac221fb15762b55ad3c0391c0e14c97616e57e84
Reviewed-on: https://gerrit.instructure.com/25614
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2013-10-24 21:33:30 +00:00
Zach Pendleton ccaf2286ec spec: fix broken qunit specs
fixes CNVS-9034

fixed specs are:
  * CustomListSpec
  * MoveDialogSelectSpec
  * DueDateViewSpec
  * AgendaViewSpec
  * ProgressStatusViewSpec
  * AssignmentIndexSpec
  * AssignmentListItemViewSpec
  * AssignmentGroupListItemViewSpec
  * AddAppViewSpec
  * UnassignedUsersViewSpec
  * WikiPageEditViewSpec

Change-Id: Iaae7e0c9c20cba5e22020552f15a66adb8352129
Reviewed-on: https://gerrit.instructure.com/25561
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2013-10-24 21:33:16 +00:00
Matthew Irish a7f6a485f1 ensure neverdrop ids are strings
need to make sure that neverdrop rule ids are strings when the accepts
header is set properly

`assignment_group_json` now takes an option `stringify_json_ids` that
should match `stringify_json_ids?` method from the application
controller

fixes CNVS-8926

the neverdrop collection <select>'s in the assignment group edit dialog
now respond properly when changing their value as the id isn't converted to
a number any longer

fixes CNVS-9035

test plan:

  - with draft state enabled go to the assignment index page
  - edit an assignment group
  - add a few never drop rules, changing values and removing a rule or
    two to make sure the <select>s update properly
  - add a number to drop either highest or lowest scores (or both)
  - save the assignment group settings
  - refresh the page
  - verify that the pill stating the number of rules saved is present
    next to the add button
  - verify that the tooltip list all of the rules added

Change-Id: I3fb08d29a580cf97d4e80eff0c796d00dd0f1801
Reviewed-on: https://gerrit.instructure.com/25491
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-10-24 19:01:56 +00:00
Stanley Stuart e663f8846e draft state: add assignment scores to the assignments index page
Test Plan:
  - Enable draft state on your account.
  - As a teacher, create a few assignments in the course. At least one
    should have points possible, and one should have no points possible.
  - As a student, submit / complete a few of the assignments in the
    course.
  - As a teacher, grade the assignments. Make sure one assignment is
    left ungraded.
  - As a student, loading the assignments index page
    (/courses/:course_id/assignments) should show you your scores.
  - Make sure the content is accessible with a screenreader!

also does some miscellaneous qunit spec fixes

fixes CNVS-7203

Change-Id: I69e8896fc96bed5ec2978370b4115f491ac66071
Reviewed-on: https://gerrit.instructure.com/23570
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-10-23 23:08:18 +00:00
Braden Anderson 1f321d62cb calendar2: month view styling
fixes CNVS-8657

test plan:
  * open calendar2
  * open month view
  * verify that content (not including header or sidebar)
      matches mockup styling
  * verify that the context colors look so beautiful you weep

Change-Id: I1dba6392f76d34a412656573bfe095e999ea4bb4
Reviewed-on: https://gerrit.instructure.com/25228
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2013-10-21 16:44:17 +00:00
Stanley Stuart c4a80d6dcb prevent teachers from unpublishing assignments with submissions
test plan:
  - As a teacher, make a quiz and an assignment.
  - You should be able to unpublish and publish the quiz and assignment
    and will.
  - Publish the quiz and assignment
  - As the student, turn in a submission for the assignment and quiz.
  - As the teacher, you should not be able to unpublish the quiz and
    assignment.

fixes CNVS-7193

Change-Id: Id56ba2ec87275fcfd6d76397f2e41b32abc88833
Reviewed-on: https://gerrit.instructure.com/24103
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-10-16 19:33:47 +00:00
Matthew Irish fba01e0999 fix dragging an assignment after using move dialog
no longer coerces the value of the moveDialogSelect to an int

fixes CNVS-8734

test plan:
- enable draft state
- on the assignments index page, use the "Move To" dialog to move an
  assignment
- drag that same assignment after the save completes to a different
  assignment group
- verify there are no JS errors in the console

Change-Id: I29fe23b52ac4e74ca981dacca223001bf400d76e
Reviewed-on: https://gerrit.instructure.com/25276
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-10-15 22:03:35 +00:00
Zach Pendleton 99dbc71ece add calendar2 agenda view
fixes CNVS-8665

test plan:
  * from a console, run the following:

      account = Account.default
      account.settings[:agenda_view] = true
      account.save!

  * as any user, navigate to calendar2 and verify
    that an "agenda" button is visible in the header
    navigation;
  * verify that clicking the "agenda" button loads an
    agenda view and defaults to the current day;
  * verify that the calendar title is the current date;
  * verify that you can click back to month and week
    views and that they load as expected;
  * verify that if you click into agenda view while you
    are looking at a month or week that is not the current
    month/week, the agenda view date header reads as the
    first day of the month/week;
  * verify that if you have more than 50 events, the agenda
    view displays a "Load More" button at the bottom that
    will, when clicked, load additional events.

Change-Id: Ie365474ad166d247152ce9448b2b5a15ffc79425
Reviewed-on: https://gerrit.instructure.com/25102
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2013-10-15 19:29:11 +00:00
Cameron Matheson 005133e639 assignment index page: load module names from api
closes CNVS-8284

Test plan:
  * Use a course that has:
    * assignments in more than one module
    * quizzes in more than one module
    * graded discussion topics in more than one module
  * Make sure the new assignments index page properly renders the
    module names

Change-Id: Iecd3c74066d220b36338ad35c1d688ba2e0d1c9f
Reviewed-on: https://gerrit.instructure.com/25041
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-10-09 21:53:43 +00:00
Jacob Fugal e0dfca59a1 spec: add missing requires for standalone runs
Change-Id: I9308764e283d59eca91d74e5658695668c3932ec
Reviewed-on: https://gerrit.instructure.com/24669
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Irish <mirish@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
QA-Review: Stanley Stuart <stanley@instructure.com>
2013-10-03 15:37:34 +00:00
Matthew Irish 232479602a disable search on assignments index while loading
fixes CNVS-8285

added "disabled" to the input in the index template

added a handler that enables the input and removes itself when the
assignmentGroup collection is reset

test plan:
- enable draft state
- go to the assignments index page
- verify that the search input is disabled while items are loading
  (depending on how snappy things are being you might have to use
   network link conditioner or similar to slow things down)
- verify that you can type in the input after assignment groups finish
  loading

Change-Id: Id217a9372a8601bd1928ea958cb06a94e4531f4a
Reviewed-on: https://gerrit.instructure.com/24811
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-10-01 19:48:48 +00:00
Matthew Irish dfd7b896c3 accessible drag and drop
fixes CNVS-7043

Added a `MoveToDialogView` that presents the user
with one or two (if there are nested collections)
<select>s. Each select (and corresponding label)
is its own view called `MoveDialogSelect`.

Using this new view, Assignments and Assignment Groups
are now re-orderable from these dialogs (as well as drag
and drop).

Updated SortableCollectionView and DraggableCollectionView to sort the
collection after updating positions and to also enforce uniqueness of
the "position" attribute on DraggableCollectionView.

Changed the `reorder_assignments` method on the
AssignmentGroupsController to only return ids of active assignments.

Test plan:
- turn on draft state
- with only one Assignment Group, there should be no "Move To ..." item
  in the cog menu
- with more than one Assignment Group, there should be a "Move To ..."
  item
  - when clicked the "Move To" should open a dialog asking you where you
    want to move the Assignment group verify that:
        - the title of the Assignment Group is in dialog "Where would you
          like to move {AG Name here}?"
        - There is 1 select that does not include the Assignment Group
          as a value
        - the label for the select reads "Place Before:"
        - the select has an option to move to the bottom of the list

- with multiple assignments, it is similar to the above with the
  exceptions:
        - the "Move To" menu item should disappear when there's
          only one assignment and one assignment group
        - there should be two selects in the dialog. One with the label
          "Place Before:", and one listing the assignment groups with
          the label "Assignment Group:"
        - the select for "Assignment Group" should have the current
          Assignment Group selected when the dialog is opened
        - when the Assignment Group select is changed, it should update
          the value of the "Place Before:" select with the names of the
          assignments in that Assignment Group

- after saving, the items should update their order on the page

- after moving an assignment once, bring up the move dialog again
  and verify that the Assignment Group select has the updated assignment
  group as the selected value

Change-Id: Ifb6c1df155d3011949e25afeac111c230f5ff56a
Reviewed-on: https://gerrit.instructure.com/24362
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-09-25 19:23:51 +00:00
Jon Jensen 5a805e8065 make Filterable search case-insensitively
Change-Id: I2bcf2f54ff6d0413e2f7987fc29ed25ec118e7b9
Reviewed-on: https://gerrit.instructure.com/24629
Reviewed-by: Mark Ericksen <marke@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-09-24 15:22:52 +00:00
Mark Severson 888744cf37 fix editing a wiki page to only prompt to save true changes
test plan:
 - with draft state enabled
 * edit a wiki page already containing elements such as:
   - <br>
   - <hr>
   - consecutive  spaces
 * if no changes have been made, you should not be prompted
   to save changes
 * once changes have been made (to the body or title), you
   should be prompted when attempting to navigate away from
   the page in any way

fixes CNVS-8146

Change-Id: Iab650bfe7caab757b6f7d9111061973aed4c18a3
Reviewed-on: https://gerrit.instructure.com/24549
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-09-23 22:53:01 +00:00
Mark Severson f3de574f9d add locked page indicator
test plan:
 - with draft state enabled
 * navigate to a locked page (e.g. locked by module)
   - locked by module progression
   - locked by date
 * the page should show an informative locked page message

fixes CNVS-7514

Change-Id: I5c5095ad548ed313cef7ff3655388efda963a095
Reviewed-on: https://gerrit.instructure.com/24510
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Mark Severson <markse@instructure.com>
2013-09-20 22:24:56 +00:00
Mark Severson 409c8bbddd fix module sequence footer tooltips to not have html
test plan:
 - using a screen reader (e.g. VoiceOver)
 - with draft state enabled
 - navigate to a wiki page in a module
 * confirm that the help text of Next and Previous buttons
   is plain text only (no html)

fixes CNVS-8155

Change-Id: Ia874af1350aea1a5a70b24aba2c38bdaeb4c9941
Reviewed-on: https://gerrit.instructure.com/24387
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-09-20 22:19:56 +00:00
Cameron Sutter 0186ae5847 search box on assignments index page
fixes CNVS-7191

test plan:
 - type a search term into the search box
 - assignment groups without a matching assignment should disappear
 - assignments that do not match should disappear
 - assignment groups that were collapsed should
     expand if there are matching assignments and then
     collapse when the search box is empty

Change-Id: Ibecfd35bc74403dd97bee928eb3be427f6cc554a
Reviewed-on: https://gerrit.instructure.com/24120
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2013-09-20 19:14:17 +00:00
Derek DeVries 7bffcba259 add available column to the assignment index page
fixes CNVS-7671

test plan:
  - The availability date should display in six different formats
    - Blank (when there is no availability dates)
    - "Available" (when the assignment is unlocked, and there is no lock date)
    - "Not available until <date>" (when the assignment is not unlocked yet)
    - "Available until <date>" (when the assignment is unlocked and has a lock date)
    - "Closed" (when the locked date has passed)
    - "Multiple Availability" (when there are multiple availability dates)
  - Add different variations on availability dates for assignments
  - Check that the format appears correct

Change-Id: I9bbd416b50656dd67dc4ae2d391ec5b6a6283d5c
Reviewed-on: https://gerrit.instructure.com/24455
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2013-09-19 21:32:52 +00:00
Mark Severson 7f1e12d0df ensure the module sequence footer is shown after publishing a page
test plan:
 * navigate to a page that is part of a module
   - the module sequence footer should slide in from the bottom
 * publish/unpublish the page
   - the module sequence footer should remain in-place (no animation)

fixes CNVS-8147

Change-Id: I140ea6086c4e67f10cd2ad221f5fd4beed656115
Reviewed-on: https://gerrit.instructure.com/24351
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2013-09-19 16:37:28 +00:00
Jeremy Stanley c1b9934c6c use new wiki ui for course front page
fixes CNVS-8105

test plan:
 - enable draft state for a course
 - set a wiki page to be the course front page
 - confirm you get the new page UI,
   with the toolbar up top with "View All Pages" and the
   gear menu at right
 - confirm the course name is shown in place of the wiki page title
 - confirm the "Published" and "Front Page" markers are not shown
   (they're redundant on the course home page)
 - confirm the module sequence footer is not shown on the course
   home page
 - confirm the gear menu doens't have a "delete" option
   on the front page
 - set a Creative Commons license and ensure it shows up correctly
   on the bottom of the home page
 - view the front page in Pages and confirm that the page shows
   normally there (Published, Front Page, sequence footer present,
   delete is in the gear menu)
 - also make sure the course home page still works properly
   (with the old ui) when draft state is disabled

Change-Id: I28c2ee6a373d1b9b83c42775665ceca058ede2de
Reviewed-on: https://gerrit.instructure.com/24269
QA-Review: Hannah Bottalla <hannah@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-09-18 21:18:32 +00:00
Liz Abinante 5aa7691a34 prevent deleting frozen assignments and their groups on index page
fixes CNVS-7669

test plan:
- enable draft mode
- create a course with frozen assignments
- from the assignments index page only
- verify that "delete" option does not appear under gear wheel for:
 * frozen assignments
 * groups with frozen assignments

Change-Id: I55c7a429efc58d014b3e28d7681bc6a245578d81
Reviewed-on: https://gerrit.instructure.com/24203
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2013-09-18 15:55:48 +00:00
James Williams da3f69957a fix "jump to today" link for syllabus
test plan:
* create a course with an assignment due today
* set the syllabus as the course home page
* clicking on 'Jump to Today' should scroll down
to the bottom (just as on the main syllabus page)

* clicking on 'Jump to Today' or on a date on the
calendar sidebar will highlight the relevant date (and
moving the mouse will not disrupt the highlighting)

* clicking on 'Jump to Today' before the page has fully
loaded will not break the link from that point on

fixes #CNVS-3808 #CNVS-7665 #CNVS-7839

Change-Id: I0aa61c7f2640356314cff882f063421f9a967f2c
Reviewed-on: https://gerrit.instructure.com/24376
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2013-09-17 15:39:58 +00:00
Simon Williams 76616ab373 add a tooltip explaining assignment group drop rules
fixes CNVS-7672

test plan:
- create an assignment group with drop rules on the new assignment index page
- when you hover over the "2 Rules" text you should see a tooltip explaining
  the rules
- this should be visible to teachers and students

Change-Id: Ib787600e10f7cb82b818f15353fbe0512a850889
Reviewed-on: https://gerrit.instructure.com/23603
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2013-09-13 15:11:20 +00:00