Commit Graph

625 Commits

Author SHA1 Message Date
Jeremy Stanley 9f9840e786 fix enrollment API param parsing issues
test plan:
 1. enroll a teacher or TA in a course using the "Enroll a user"
    API and enrollment[limit_privileges_to_course_section]=false.
    ensure the attribute is false in the returned enrollment.
 2. repeat step 1, but specify "true", and ensure the value
    is updated properly in the returned enrollment.

fixes CNVS-24623

Change-Id: Ia22c5d88c84db7b0ff4993134c8e1d90833513c9
Reviewed-on: https://gerrit.instructure.com/66116
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-11-09 22:54:51 +00:00
James Williams 67b81ccda5 remove enrollments_visible_to
refs #CNVS-23729

Change-Id: I0b8b6fb61533d0a61d9a302a5beaa3918b317d63
Reviewed-on: https://gerrit.instructure.com/66362
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-11-03 18:46:22 +00:00
James Williams 5ea6881b47 performance improvements for dashboard sidebar
and some other things too

test plan:
* regression test around the dashboard sidebar

closes #CNVS-22776

Change-Id: I46f1bd4476ca9aba27d41a4ce725c7dc2ee00dc5
Reviewed-on: https://gerrit.instructure.com/66056
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-30 13:08:21 +00:00
James Williams 6062491d31 return deleted enrollments if requested in enrollments index
also refactor enrollments_visible_to away because it is bad

test plan:
* add people to a course
* remove them
* calls to /api/v1/courses/X/enrollments?state[]=deleted
 and /api/v1/sections/Y/enrollments?state[]=deleted
 should include the deleted enrollments

closes #CNVS-23729

Change-Id: I29d6995064dc6cf79af44b940f55dc0269c2a891
Reviewed-on: https://gerrit.instructure.com/65756
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-29 18:41:27 +00:00
James Williams 12a7c4220e accepting future enrollments should retain readonly access
test plan:
* create a course set to begin in the future with dates
 restricted to those dates, but making sure students
 are not restricted from viewing future courses
* invite a student into the course
* they should be able to view the course as before
* accept the enrollment
* they should now still be able to view the course
 as though they were invited

closes #CNVS-23683

Change-Id: Ib7a58d0c587b10b7aaa8c8b7c10a56e547029533
Reviewed-on: https://gerrit.instructure.com/65553
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-29 16:29:02 +00:00
Jeremy Stanley 9aff943389 use course nicknames in notifications
test plan:
 - set up multiple users in a course
 - give some of these users different nicknames for the course
 - set up and confirm communication channels for these users
 - do things that cause notification messages to be dispatched
   to the users
 - ensure each user sees the correct course name in his/her
   notification messages

closes CNVS-24168

Change-Id: Ic49c888ae86b40ba42004e3c2dbc205e49480b79
Reviewed-on: https://gerrit.instructure.com/65544
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-27 20:04:25 +00:00
Cody Cutrer fda055b06d fix several unqualified names found by course_spec
refs CNVS-21900

Change-Id: Iaf7dad14c875d5719dfe238fef0970ed3e9bd4bd
Reviewed-on: https://gerrit.instructure.com/65840
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-10-27 15:20:23 +00:00
Cody Cutrer dc86c80c8e fix non qualified table name in Course#update_enrolled_users
refs CNVS-21900

Change-Id: Id01b29e93545f52b50b6ec38a889a3a620b4e68d
Reviewed-on: https://gerrit.instructure.com/65667
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-10-26 20:20:06 +00:00
Spencer Olson 835b6dd58c refresh badge counts on assignment deletion
when an assignment is deleted, refresh badge
counts for all students in the course.

closes CNVS-23914

test plan:

1. create a published course with a student
   and a quiz with an auto-graded question
   (e.g. multiple choice)
2. masquerade as the student and take the quiz.
   note after taking the quiz there is a '1'
   next to "Grades" in the course navigation
   menu (don't click the counter).
3. stop masquerading and delete the quiz
4. masquerade as the student and notice that
   the counter next to "Grades" in the
   course navigation menu no longer remains

Change-Id: I360df761bcd67f643c77818417cf55839c7c61a7
Reviewed-on: https://gerrit.instructure.com/65458
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2015-10-26 20:09:29 +00:00
Jeremy Stanley 7d1a548bff course nicknames
test plan:
 0. enable New Styles
 1. go to the dashboard with the rectangle card things
 2. click the gear icon on a course card
 3. edit the course name in the box above the colors and
    click Apply
 4. notice the course name in the dashboard card has changed
    and the original name is visible if you hover over
    the nickname
 5. click the card to go to the course and notice your
    course nickname is used:
    - on the course home page (with 'recent activity'
      or 'syllabus' selected)
    - in the Courses menu
    - in "All Courses" under the Courses menu
    - in the UI navigation (breadcrumbs)
    - on the calendar (right side list)
    - in the Inbox (course dropdown)
 6. go back to the dashboard, click the gear menu on
    a course card, clear out the nickname, and click Apply.
    - the original course name should be restored
      and shown in the locations listed in step 5
 7. repeat steps 2-6 with a different student in the same
    course; ensure the first student's course nickname
    doesn't leak through to a second student
 8. regression test course color choosing functionality
    on both the dashboard and the calendar

closes CNVS-23201

Change-Id: I8dd714cad83dca5e17e65c6c463cdadc655db83c
Reviewed-on: https://gerrit.instructure.com/65052
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-10-21 23:03:51 +00:00
James Williams 6139e19318 update user account associations after course deletion
test plan:
* enroll a user in a course in a subaccount
* delete the course
* the user should not appear in the list of users for the
 subaccount (once jobs run)

closes #CNVS-24002

Change-Id: I4f761b19750e564b779b9a6e3657f0124c9a7741
Reviewed-on: https://gerrit.instructure.com/65173
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-20 13:24:05 +00:00
John Corrigan adad2fc64f exportable considers sort setting; EpubExport hooked up to Exportable
refs CNVS-21794
closes CNVS-21802

- Adds CC::Exporter::Epub::Exportable#sort_by_content_type?, which can
  be overridden by classes that `include` the module to point to where
  the setting can be found.
- Update CC::Exporter::Epub::Exportable#convert_to_epub to pass
  `sort_by_content_type?` to CC::Exporter::Epub::Exporter.new.
- Update EpubExport to include CC::Exporter::Epub::Exportable, and
  override / add to instance methods.

test plan:
- Navigate to `/epub_exports`.
- Observe a list of courses that are active & user is enrolled in.
- Click on the Generate button.
- Observe that info about the state of the export and the timestamp are
  added to the middle of the row.
- Observe that a progress bar is displayed while the export is in
  progress.
- Observe that upon completion, the progress bar is replaced by two
  button / links: Download & Regenerate.
- Click on the download link.
- Observe that an epub file is downloaded and can be opened in an
  eReader.
- Observe that the Regenerate button triggers the process all over
  again.

Change-Id: Ib42c2d2623c3ccd394105cdf0e3809b96c8a2e60
Reviewed-on: https://gerrit.instructure.com/63469
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-13 16:52:38 +00:00
James Williams 6cf008fd48 moderated grading todo items for moderators
test plan:
* create a moderated assignment
* make a provisional grade
* the assignment should show up in the
todo list for the moderator
 to "Moderate X" and take them to the
 assignment moderation page
* the todo item should be ignoreable
 (either permanently or until a mark is created/changes)

closes #CNVS-23307

Change-Id: I7007ba948e688ca5864a0d851c153a288bef4233
Reviewed-on: https://gerrit.instructure.com/64734
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-08 16:26:27 +00:00
Jeremy Stanley 2e84b4dec2 respect section limitations when resending invitations
test plan:
 - set up a course with two sections
 - create a TA in one section, with privileges limited to
   that section
 - enroll students in both sections, but do not
   accept the invitations
 - as a TA, look at the course people page. you should
   see only students in your section
 - click the "resend invitations" link. only students in your
   section should receive invitations

fixes CNVS-23593

Change-Id: Id3d1aef61c8ded1c81effa97e18687b4df5ac906
Reviewed-on: https://gerrit.instructure.com/64616
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-08 14:29:46 +00:00
Cameron Matheson 189ce7e3f2 make Turnitin::Client#id shard aware
refs CNVS-17473
fixes CNVS-21075

Test plan:
  turnitin still works

Change-Id: I36c34b2a4be67e4d0348dba2de43880ce4a8520a
Reviewed-on: https://gerrit.instructure.com/56782
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-10-07 20:57:02 +00:00
James Williams 2ba3c0b17b fix permissions for admin users without :manage_courses
also add a read-only view for course settings

test plan:
* create an account role with permissions to do everything
 except "Manage Courses" and
 log in as an account admin with that role:

* they should be able to view unpublished items
 (modules, assignments, etc)

* they should be able to get to the course settings page
but they should not be able to edit the settings
 (or try to, unsuccessfully)

* they should not be shown options on the course home
 they don't have the rights to edit, such as
 "Choose Home Page"

* also to be safe, make sure all the course settings are
editable for a full admin

closes #CNVS-22594

Change-Id: I57a7fe9dd04b6ec35fd6e2b311e02b9e43d82929
Reviewed-on: https://gerrit.instructure.com/63064
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-06 17:15:38 +00:00
James Williams d957b30a81 use role overrides for :view_all_grades for concluded enrollments
test plan:
* create a account with the "View all grades" permission
 disabled for a TA role
* as a TA in a course in that account, should not be able
 to view the gradebook when the course is concluded

closes #CNVS-23677

Change-Id: Ie0ba4d7fa4a45446e10d8caab584168088ed7547
Reviewed-on: https://gerrit.instructure.com/64211
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-30 19:18:05 +00:00
Abhishek Singh 4ba84e29a4 adds UI & backend for offline content
fixes CNVS-21793, CNVS-21794, CNVS-21795

- Adds EpubExport model to manage state of generated epubs.
- Adds controller to list, create & show epub exports.
- Adds a mini react app to manage UI for creating epub exports.
- Adds shared ApiProgressBar react comoponent to diplay a progress bar
  that polls the progress API.
- Updates ContentExport to have a relationship with EpubExport.

test plan:
- Navigate to `/epub_exports`.
- Observe a list of courses that are active & user is enrolled in.
- Click on the Generate button.
- Observe that info about the state of the export and the timestamp are
  added to the middle of the row.
- Observe that a progress bar is displayed while the export is in
  progress.
- Observe that upon completion, the progress bar is replaced by two
  button / links: Download & Regenerate.
- Observe that Download at the moment does nothing... this is because
  the backend is not yet hooked up to generate the epub.
- Observe that the Regenerate button triggers the process all over
  again.

Change-Id: I6cd844baa06db0c6648ad19389d235b89659919c
Reviewed-on: https://gerrit.instructure.com/62135
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-09-30 16:22:18 +00:00
James Williams c5837b8528 allow users to view question banks without edit rights
also solidify question bank rights around :read_question_banks

test plan:
* create a teacher who is restricted from editing a course
 through term enrollment dates
* they should see a link to view question banks through
 the quizzes page
* they should be able to view question banks

* this should also apply to account admin roles with
 "View course content" and "View and link to
 question banks" enabled but not "Manage assignments"

closes #CNVS-22457

Change-Id: Iea5fe2e7a4dfcee5f7a68e307bf3d9e33ee14c9a
Reviewed-on: https://gerrit.instructure.com/62894
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-09-21 18:36:21 +00:00
James Williams 2dad511048 preload attachments in calendar events public feed
test plan:
* basic regression test the calendar events public feed api

closes #CNVS-22774

Change-Id: I0a21788d25c63b404a4c6410f5d01e785bed1ed8
Reviewed-on: https://gerrit.instructure.com/62941
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-21 14:22:26 +00:00
Cody Cutrer fb08dd4499 convert Canvas login to a real authentication provider
test plan:
 * before applying this change
   * configure one account with canvas auth, one without (on account settings)
   * configure another account with canvas auth and 3rd party auth
 * check that /login still works on the above accounts, as well as
   /login?authentication_provider=canvas
 * run migration
 * Canvas auth should properly show up or not in authentication providers,
   and below any pre-existing providers
 * delete all auth providers; Canvas should automatically show up after you
   delete the last one
 * Canvas auth should be respected for logging in when it is enabled/not
   enabled (i.e. not enabled you can't login with a canvas password)

Change-Id: I873a4fe3e217f84384da6e5afbf5c280ae368c0b
Reviewed-on: https://gerrit.instructure.com/61814
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-09-14 21:13:38 +00:00
Cameron Matheson d89c74a584 require user to generate gradebook csv
this will avoid future problems with section-limited users

Change-Id: I05568c8ed91b78986ded23aa4904cfa783eecc45
Reviewed-on: https://gerrit.instructure.com/61900
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-09-10 06:07:19 +00:00
Cody Cutrer 9bf7304917 use preload instead of include on associations
refs CNVS-21901

also got rid of some useless associations

Change-Id: I13e012e0ec755443fbed12ca0629c53a9c693f43
Reviewed-on: https://gerrit.instructure.com/62217
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-09-08 20:32:41 +00:00
Cody Cutrer 56ccea56d4 use preload/eager_load instead of includes
refs CNVS-21901

Change-Id: Ie9e1b2778b72f649392d8a1c47c0c86dae0ef19c
Reviewed-on: https://gerrit.instructure.com/58660
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-09-08 20:32:05 +00:00
James Williams d0e41711cb give full course visibility to users with :read_as_admin rights
closes #CNVS-22492

Change-Id: Ib4e1e1848fead8bcc2debf81756263ba9586b64d
Reviewed-on: https://gerrit.instructure.com/62601
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-08 17:19:42 +00:00
Cody Cutrer c443ef4b65 fix cross-shard UserObservers
fixes CNVS-22966

test plan:
 * in shard 1, create a user and a parent that perma-observes them
 * in shard 2, create a course, and enroll the student from shard 1
 * it should work

Change-Id: I95f8480c6b7d168cdd6fe8589f444bc2fb18a54e
Reviewed-on: https://gerrit.instructure.com/62579
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-09-04 17:18:18 +00:00
Michael Nomitch d0a42b3b1a deterministic ordering for quiz and enrollments scopes
fixes CNVS-19038

test plan:
  - make 10 quizzes in the same course with the same name
  - hit the quiz index api for this course with per_page=1
    ten times with the page number of 1 thru 10
  - there are no duplicate responses

  - make 10 users with the same name and enroll them
    all as students in the same section of a course
  - hit the enrollments index api for this course with
    per_page=1 ten times with the page number of 1 thru 10
  - there are no duplicate responses

Change-Id: I65adb60f8586d517bc5a3fd4c9138067f563a46f
Reviewed-on: https://gerrit.instructure.com/61847
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-02 19:24:09 +00:00
Cameron Matheson a3c1b75b7d pass user to gradebook.csv background job
fixes CNVS-22607

Test plan:
  * set up a section limited TA
  * download gradebook csv
  * ensure you can only see students in your section

Change-Id: I20c67d832f7cb234f7527d53747770c0092e9a0d
Reviewed-on: https://gerrit.instructure.com/61886
Reviewed-by: Dylan Ross <dross@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-08-29 03:33:45 +00:00
James Williams 3e9b184dd3 improve section_context_codes performance
don't initialize AR records just to get asset_strings

refs #CNVS-21317

Change-Id: If6afb664807926936d6957cac6aed24cfadc74b4
Reviewed-on: https://gerrit.instructure.com/61251
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-08-20 20:39:07 +00:00
James Williams 430d144b2a fix resetting courses with integration ids
test plan:
* create a course
* give it an integration id through the api
* reset the course content from the settings page
* should work

closes #CNVS-17370

Change-Id: I66d935e4688e9854a6f47604e33e358d7a0308fa
Reviewed-on: https://gerrit.instructure.com/61003
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-08-20 17:43:56 +00:00
Cody Cutrer 219fe524bf avoid unnecessary permission check
Change-Id: Iccb0fd40a648a502613dfac89b331155afa103fb
Reviewed-on: https://gerrit.instructure.com/61099
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-08-19 17:22:30 +00:00
Cody Cutrer 0c4ad2eadd preload enrollment dates when selecting participating users in a course
refs CNVS-22546

Change-Id: Ia3fc3ecd7e4d8fe77c1203388554a25eed759fea
Reviewed-on: https://gerrit.instructure.com/61070
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-08-18 14:56:53 +00:00
James Williams 6278d9e17a consolidate usages of TempCache into RequestCache
refs #CNVS-21317

Change-Id: I60016fd04109605d4324d5b184d5c0f7afa2515e
Reviewed-on: https://gerrit.instructure.com/60583
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-08-13 19:33:15 +00:00
James Williams 5df55f1344 preserve file student date restrictions on import/export
(also shift/remove file dates)

test plan:
* add date based restrictions for students to a file
* export the course
* import the file into a new course
* should retain the restrictions

* importing/copying with the shift dates/remove dates option
 should work as well

closes #CNVS-22352

Change-Id: Ie7510fc9b45664ce2dab49850dd09fce7023c306
Reviewed-on: https://gerrit.instructure.com/60040
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-08-10 15:46:22 +00:00
Strand McCutchen 69ef11e91e Gradebook Exporter Extraction
refs CNVS-22054

Course had a large method `gradebook_to_csv` which was not a
clear responsibility of Course objects. This extraction creates
a GradebookExporter PORO which is responsible for exporting
gradebooks to CSV files.

Change-Id: I0a5c3099d21358ef0ee4c5cd03586760b971a9f5
Reviewed-on: https://gerrit.instructure.com/59708
Tested-by: Jenkins
Reviewed-by: Derek Bender <dbender@instructure.com>
QA-Review: Adrian Foong <afoong@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-08-04 20:12:13 +00:00
Dan Minkevitch 726f8f10be Fixes issue with updating tab via api
fixes CNVS-22124

Test Plan:
* Add multiple tools to a course with "course_navigation[default]"
  set to "disabled" (using create external_tool api)
* Update one of the tools with "hidden=false" with tabs
* Go to the course's settings page -> navigation tab
* Only the tab you marked as "hidden=false" should be unhidden
  for the external tools you created

Change-Id: I106996778284a3b69d5f82f4c772497524681285
Reviewed-on: https://gerrit.instructure.com/59496
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-07-31 01:30:46 +00:00
Jennifer Stern fb371b6be7 Revert "Make it so students see "My Grades" and teachers see "Gradebook" in course menu"
fixes CNVS-22235

This reverts commit e413f8292d.

Change-Id: I49ada900ceef526f82ef37b6ff5febfe7298eda5
Reviewed-on: https://gerrit.instructure.com/59572
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Erin Hallmark <erin@instructure.com>
2015-07-30 22:34:04 +00:00
James Williams 10578f903f don't remove course dates with remove dates option
test plan:
* create a course with start and end dates
* import content into the course with the "remove dates" option
* should not remove the dates

closes #CNVS-22088

Change-Id: Ib2a680a85347d775aab95adab27faaa5ab3e75ce
Reviewed-on: https://gerrit.instructure.com/59206
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-07-28 02:17:53 +00:00
James Williams 600165e7b2 rails4: deprecate Relation#all in favor of Relation#to_a
refs #CNVS-21596

Change-Id: I5dedaab90a2abe6bf288ff30401c9b31629b45b2
Reviewed-on: https://gerrit.instructure.com/59220
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-24 21:28:14 +00:00
Jennifer Stern e413f8292d Make it so students see "My Grades" and teachers see "Gradebook" in course menu
refs CNVS-21636

Note: this change applies to both old and new ui

To test:

As a teacher:
1. Navigate to a course
2. Notice the 'Gradebook' link in the course nav
3. It should take you to the gradebook
4. You should NOT see a 'Grades' or 'My Grades' link in the course nav
5. On the gradebook page, the 'Gradebook' link in the course nav should be highlighted and the breadcrumb should say 'Gradebook'

As a student:
1. Navigate to a course
2. Notice the 'My Grades' link in the course nav
3. It should take you to your grades for the course
4. You should NOT see a 'Grades' or 'Gradebook' link in the course nav
5. On the grades page, the 'My Grades' link in the course nav should be highlighted and the breadcrumb should say 'My Grades'

Change-Id: I60574cd4408c2445c79f412873bd8d25d1cf7bbe
Reviewed-on: https://gerrit.instructure.com/57575
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
2015-07-20 16:12:55 +00:00
Jeremy Stanley bcd03e2445 add `allow_student_discussion_editing` to `clonable_attributes`
test plan: the setting in course settings / more options /
"Let students edit or delete their own discussion posts"
should be preserved across course copy / export+import

fixes CNVS-21789

Change-Id: Iab276a7cfebe47b47803205d4254e840e8882b56
Reviewed-on: https://gerrit.instructure.com/58342
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-07-17 15:31:04 +00:00
Cody Cutrer e34d7984a1 more use_qualified_names fixes
refs CNVS-21900, CNVS-21901

test plan:
 * got to an account, and click around

Change-Id: Ic9b7c03649009107c1e75fdb3e57a01a2a8028d9
Reviewed-on: https://gerrit.instructure.com/58531
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-07-16 16:37:35 +00:00
Cody Cutrer 9e353116ce quote table names in joins
refs CNVS-21900

Change-Id: I260c8dbae3c4abd7fe436f2051e1cc852ef1675f
Reviewed-on: https://gerrit.instructure.com/58554
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-07-16 16:35:31 +00:00
Jeremy Stanley a614b4f600 fix permissions around unpublished module items
use :view_unpublished_items rather than :manage_content or
:update, so teachers can still view unpublished content
(in a read-only state) after a course is concluded

test plan:
 - ensure unpublished modules and module items in
   a concluded course are visible to a teacher in that course
 - ensure the module items can be clicked on, and lead to
   the appropriate content (page, assignment, discussion)
   instead of an error message

fixes CNVS-21529

Change-Id: I01999a13d9d450b08ed8238608238de25a641d25
Reviewed-on: https://gerrit.instructure.com/57803
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-07-15 21:25:51 +00:00
Cameron Matheson d5284d03b1 gradebook csv: support excused assignments
closes CNVS-21267

Test plan:
  * excuse some assignments in a course
  * download the gradebook
  * excuse/unexcuse students in the gradebook
  * upload the gradebook

Change-Id: I624f48415f0be524da70d0ea41ccd6216e06ed68
Reviewed-on: https://gerrit.instructure.com/57158
QA-Review: Adam Stone <astone@instructure.com>
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2015-07-15 03:41:23 +00:00
James Williams 62851d8fe5 rails4: more misc model spec fixes
refs #CNVS-21596

Change-Id: I28cfeb917e29562734542d201148ad636d23cba1
Reviewed-on: https://gerrit.instructure.com/58170
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-13 15:24:49 +00:00
James Williams 417329b3b4 s/visibile/visible
lul

Change-Id: I303e168053ec058cdbf40acc6337b3d3404034ad
Reviewed-on: https://gerrit.instructure.com/58065
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-13 15:24:07 +00:00
James Williams 429108fb38 performance improvements for enrollments and state_based_on_date
test plan:
* regression test enrollment dates and
 the course/account settings to restrict students
 to from viewing past and future courses

closes #CNVS-21602

Change-Id: Ifc2fd8f6fd279839bd8ba520442e2c0b9cc91da6
Reviewed-on: https://gerrit.instructure.com/57535
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-07-02 15:51:16 +00:00
James Williams eab9eea95f misc improvements for assignments, calendar events and modules
test plan:
* syllabus should work as before
* modules loading of assignment due dates should work
 as before
* assignments api should work as before

refs #CNVS-21476 #CNVS-21317

Change-Id: Iba183d6fda604acb29e9685f0f32be74ad27b898
Reviewed-on: https://gerrit.instructure.com/57215
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-06-29 15:45:27 +00:00
Simon Williams 54f284bfb6 stop catching errors in broadcast policy state methods
we are swallowing a bunch of errors in broadcast policy methods that
check differences in workflow state between the old and new objects.
instead, let's let these fail and fix bugs that may come from using
these methods incorrectly.

fixes CNVS-21212

test plan:
- this would manifest itself as a error when trying to check the
  conditions for whether or not to send a notification on the following
  models:
  * announcement
  * assignment
  * calendar
  * content_export
  * course
  * discussion
  * enrollment
  * group_membership
  * quiz_submission
  * submission
  * wiki
- so the best way to test is to get notifications to send for these
  models under different conditions and make sure they work correctly

Change-Id: Ia9d6d0c37101b2d0859d5753835227d314955c3d
Reviewed-on: https://gerrit.instructure.com/54541
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-06-29 15:06:58 +00:00