Commit Graph

7 Commits

Author SHA1 Message Date
Nick Houle b664a85bbc Add front end max_name_length validations for Discussions
Fixes: SIS-2743

Test plan:
- Navigate to the account settings page
- Navigate to the `Feature Options` tab
- Turn the `Enable new SIS integration settings` feature flag on
- Navigate back to the `Settings` tab
- Check "Limit assignment names lengths (max 255)" option
- Enter a max assignment name length value
- Save the settings
- Navigate to a course
- Create a Discussion
- Enter a name that is longer than the value you entered
- Check the 'Graded' option
- Check the `Post to SIS` optiona
- Click Save/Save & Publish
- Confirm the save fails and you are presented with a UI error
  "Name is too long, must be under #{the_value_you_entered} characters"
- Confirm upon changing the name you are able to save the discussion

Change-Id: Iafd578a5923fce35761065d3088ae1b2e8c4bbcd
Reviewed-on: https://gerrit.instructure.com/101040
Tested-by: Jenkins
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-02-14 22:11:50 +00:00
Stewie (Nicholas Stewart) fe79fce0e6 Merge commit for due date validation
Merge remote-tracking branch
'origin/dev/stewie/2017-02-10-differentiated-assignment-override-due-dates'

Due date validation works for differentiated assignments.

Quiz and Discussion Topic due date validation will come later.

Mastery path assignment due date validation will also come later.

Refs: SIS-2636

Test Plan:
Due dates for new differentiated assignments should be required when:
  assignment.post_to_sis = true
  account's sis_require_assignment_due_date is true
  the new_sis_integrations feature flag is on

Change-Id: I874c37a2acbea6297a80ba2efb953d0ec3e54490
2017-02-13 11:56:54 -07:00
Stewie (Nicholas Stewart) 067e4204ae Add sis_syncing to the list of checks
due_date_required_for_account now uses the sis_syncing value in
determining its own return value.

Refs: SIS-2636

Test Plan: QA will review the functionality in the merge commit to
master.

Change-Id: Ia5c021cfd2039abb80b8a876d916a87e89b3a207
Reviewed-on: https://gerrit.instructure.com/101897
Reviewed-by: Nick Houle <nhoule@instructure.com>
Tested-by: Jenkins
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
2017-02-13 17:30:06 +00:00
Nick Houle 7f1d7a0471 Add front end max_name_length validations for Assignments
Refs: SIS-2692

Test plan:
- Navigate to the account settings page
- Navigate to the `Feature Options` tab
- Turn the `Enable new SIS integration settings` feature flag on
- Navigate back to the `Settings` tab
- Check "Limit assignment names lengths (max 255)" option
- Enter a max assignment name length value
- Save the settings
- Navigate to a course
- Create an assignment
- Enter a name that is longer than the value you entered
- Check the `Post to SIS` option
- Click Save/Save & Publish
- Confirm the save fails and you are presented with a UI error
  "Name is too long, must be under #{the_value_you_entered} characters"
- Confirm upon changing the name you are able to save the assignment

Change-Id: Ie446b1878a882274c7617789db62b3d271f864f4
Reviewed-on: https://gerrit.instructure.com/100530
Product-Review: Brad Humphrey <brad@instructure.com>
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Tested-by: Jenkins
2017-02-11 00:43:47 +00:00
Stewie (Nicholas Stewart) e894f4e0dc Add DUE_DATE_REQUIRED_FOR_ACCOUNT to the js_env
Added DUE_DATE_REQUIRED_FOR_ACCOUNT to the js_env in the assignments
controller.  This will be used in to verify if a date is required for
the assignment, and this functionality will appear in the next commit.

Refs: SIS-2636

Test Plan: QA will review the functionality in the final commit.

Change-Id: I320337aa6fc8779adb5e022b6d846736e603da69
Reviewed-on: https://gerrit.instructure.com/101392
Tested-by: Jenkins
Reviewed-by: Ken Romney <kromney@instructure.com>
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
2017-02-08 23:11:13 +00:00
Nick Houle abd2c336d6 Add max_name_length to Assignment
Refs: SIS-2692

Test plan:
- Verify that an assignment requires name to be shorter or equal
  to the name length setting on the account with post to sis
  checked, the sis sync settings is checked, the assignment name
  length setting is checked on the account, there's a value for
  the name length setting and the new_sis_integrations feature
  flag is on

Change-Id: I8eea8c1087d9798f3893776e358e5cfb966717f5
Reviewed-on: https://gerrit.instructure.com/100056
Tested-by: Jenkins
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2017-02-03 23:42:36 +00:00
Stewie (Nicholas Stewart) 89bc88ad6a Add due_date_required? to Assignment
This commit is largely a refactor of my previous commit and lays
the groundwork for future which will include adding
due_date_required? to the assignment api

Refs: SIS-2636

Test Plan:
  Verify that an assignment requires a due date under certain
  conditions:
  assignment.post_to_sis = true
  account's sis_require_assignment_due_date is true
  the new_sis_integrations feature flag is on

Change-Id: I4366db1d67c76cf433120cf767225ff80c955c21
Reviewed-on: https://gerrit.instructure.com/99593
Tested-by: Jenkins
QA-Review: <mmcdermott@instructure.com>
Reviewed-by: Nick Houle <nhoule@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-01-18 23:44:07 +00:00