Commit Graph

10934 Commits

Author SHA1 Message Date
Ahmad Amireh 4b552c0022 Quiz Stats - Convert Essay to new DSL
Closes CNVS-13159

TEST PLAN
---- ----

Only code changes. Test plan would be the same as
https://gerrit.instructure.com/#/c/35096/

Change-Id: I0f26a3df1278d555237c803cebbe80cde1559065
Reviewed-on: https://gerrit.instructure.com/35097
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-21 16:36:45 +00:00
Ahmad Amireh 82b1e74f16 Quiz Stats - Maintain ERB compatibility
This patch makes it so that if you want to get the new stats from the
back-end, you'll have to explicitly pass a "legacy=false" parameter to
the report generator routine. Old code will use the old output, new code
will use the CanvasQuizStatistics gem for stats.

Closes CNVS-13198

TEST PLAN
---- ----

  - create a quiz with a bunch of questions and take it by multiple
    students
  - visit the ERB stats page at
    /courses/:course_id/quizzes/:quiz_id/statistics
    - verify that the page renders and looks just like how it was before
      the work on its ember counterpart
  - visit the ember stats page at
    /courses/:course_id/quizzes/fabulous_quizzes#:quiz_id/statistics
    - verify the ember page is still functional

Change-Id: I0a9e8d69eacc64a8727f238fc0c2e2acd44c0451
Reviewed-on: https://gerrit.instructure.com/35167
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-21 16:36:30 +00:00
Cameron Sutter ab6f85b024 srgb curve grades dialog
fixes CNVS-12784

test plan:
 * in srgb
 * on an assignment with no submissions
 - open the curve grades dialog
 - click 'Curve Grades'
 > a little error box should show up
 > the page should not blow up

 * in gb2
 * do the same thing as above
 > it should show the error box and not blow up

Change-Id: I8a60d37bcc424746497313f766a381be3a6b175a
Reviewed-on: https://gerrit.instructure.com/34803
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2014-05-21 16:24:20 +00:00
Bracken Mosbacker 12ec269bba qti 2 conformance
test plan:
* qti migration regressions

Change-Id: I53587880a591d9ea70e7039d4216770cb1772880
Reviewed-on: https://gerrit.instructure.com/34407
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-05-21 15:57:02 +00:00
Cameron Sutter 463407ee65 speedgrader icons
fixes CNVS-12087

test plan:
 - open speedgrader with some submissions
 - in the student selector dropdown box:
   > students without submissions should have no icon and be grayed out
   > students with ungraded submissions should have an orange dot
 - grade and ungrade a few submissions
   > graded students should have a green check mark
   > ungraded students should have an orange dot
 > students with resubmissions should be the same
   as students with ungraded submissions

Change-Id: Iaf60465c48e657c9154860561389d00c0f51eaa4
Reviewed-on: https://gerrit.instructure.com/34499
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-05-21 15:39:01 +00:00
Nathan Mills 5010cdef69 refactor variable substitution out of the models
also adds some new substitutions

fixes PLAT-497 PLAT-496

test-plan:
all current variable substitutions should work
new substitition: '$Canvas.account.name'  should work as well

Change-Id: I9b4e71f816d777e17d3369bb907c7b72209da770
Reviewed-on: https://gerrit.instructure.com/34546
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-05-21 14:58:01 +00:00
Jeremy Stanley ff4abff838 add missing I18n to permissions page
test plan:
 - run Canvas with LOLCALIZE=1
 - go to Account Settings | Permissions
 - ensure the following fields are localized:
   - "Course Roles" and "Account Roles" tabs
   - "Add Role" button (on both tabs)
   - Contents of the dialog that appears when you press "Add Role"
     (also on both tabs)

fixes CNVS-3118

Change-Id: Ie53ec232df0737149597ae23fe566d9efa241035
Reviewed-on: https://gerrit.instructure.com/34958
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-05-21 14:25:30 +00:00
Ahmad Amireh d7a23ea23d Quiz Stats - Normalize input
Ensure all input hashes are using symbol keys.

Closes CNVS-13158

TEST PLAN
---- ----

Code changes. Test plan is similar to
https://gerrit.instructure.com/#/c/35096/

Change-Id: Ie1db45e2a5875e410a758c0b2f14594345212b5d
Reviewed-on: https://gerrit.instructure.com/35098
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-21 13:03:55 +00:00
Ahmad Amireh 457e55d6a2 Quiz Stats - Refactor/get rid of QuestionAnalyzer
- removed the question analyzer
  - each answer analyzer is now expected to calculate its own
    "responses" field as opposed to doing it in a generic manner
  - made the Essay analyzer generate its "responses" field
  - a self-documenting DSL for defining analyzer output metrics

Closes CNVS-13157

TEST PLAN
---- ----

It's all code movement/refactor so nothing new to test. The plan is to
verify the Essay question stats are unaffected (which is basically all
the gem supports at this point:)

  - create a quiz with an essay question
  - take the quiz by a few students
  - grade a submission
  - retrieve the stats via the API:
    GET /api/v1/courses/:course_id/quizzes/:quiz_id/statistics
    - verify the essay stats in the API are still functional, the
      "responses" field in particular

Change-Id: I42b9552c60ccb56f7c6912fed7cc1173da71852d
Reviewed-on: https://gerrit.instructure.com/35096
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-21 13:03:40 +00:00
James Williams dea0db86d4 add option to open external url module items in new tab
test plan:
* should be able to create and edit external url module items
 with an option to require the urls to be opened in a new tab

* on the modules index page, clicking on these items should
 directly link to the url in a new window, but also redirect
 the open canvas page to the module item page (so to register
 progression, and show the sequence footer)

* navigation through the sequence footer should be unaffected

* should work with draft state enabled and disabled

fixes #CNVS-12579

Change-Id: Ic0b33014acd43f72b05258705a87221c4b8d61c3
Reviewed-on: https://gerrit.instructure.com/35123
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-05-21 11:55:54 +00:00
Stanley Stuart e115ae8ad8 ember quizzes: take quiz button
Adds the "Take Quiz" button from the old quiz show page to ember
quizzes.

Test Plan:
  - As a teacher
    - You should pretty much always be able to take the quiz if it is
      published.
    - You should not see the Take Quiz button if the quiz is not
      published.
  - As a student:
    - You should be able to see the Take Quiz button only if the quiz
      is published.
    - You should be able to see the Take Quiz button if you have not
      taken the quiz.
    - You should be able to see the Take Quiz button if you have
      completed the quiz and you have enough remaining attempts left.
      If you have 0 attempts left on a quiz, you should not see the button.
    - If the quiz has unlimited attempts, you should always be able to
      see the Take Quiz button. It should say "Resume the Quiz/Survey"
      if you are in the process of taking the quiz.

fixes CNVS-12436

Change-Id: Ib6c3d2aa2637563a84bc6be4ae12561205c7ed2b
Reviewed-on: https://gerrit.instructure.com/34944
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2014-05-20 23:56:09 +00:00
Mark Severson 0573698baa only add one tooltip to publish buttons
test plan (with draft state enabled):
 * navigate to a course's modules page
 * hover over publish icons multiple times
 * inspect one of the publish icons
   - only a single tooltip should be present in the elements view

fixes CNVS-13073

Change-Id: Ie451c13ccb9fa4a4e5ee36b002e410754c660344
Reviewed-on: https://gerrit.instructure.com/35124
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2014-05-20 23:23:47 +00:00
Cameron Matheson ac4b8facae allow people to opt out of coffee source maps
CANVAS_SOURCE_MAPS=0 in your environment lets you opt out.

Test plan:
* rm **/*.map
* export CANVAS_SOURCE_MAPS=0
* bundle exec rake js:generate
* ls **/*.map   #<-- should not list anything

Change-Id: I547c7f73c690e05987ff4e78a6f05ffa16e84ca7
Reviewed-on: https://gerrit.instructure.com/35213
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2014-05-20 22:55:05 +00:00
Joel Hough 0d186e3c1a group leaders
fixes CNVS-11833

test plan
- regression test teacher view of groups page

a group can only have one group leader, and that user must be in
the group. anything that can be done to remove a user from a
group should revoke their leadership if they have it. a user's
leadership should not be revoked unless the teacher revokes it,
a different leader is chosen, or that user leaves the group. a
leader's user should have a user icon on it and their name should
appear next to the group's name

a few test cases:
- set group leader using gear menu on user in group
- revoke the leadership of the user using the gear menu
- ensure that the group is now leaderless

- set a group leader
- set a different user as leader
- ensure that a screenreader identifies the group leader link as "Group
  Leader"
- ensure that the first user is no longer the leader

- set a group leader
- remove that user from the group by dragging and dropping
- ensure that the user is no longer the group leader

- set a group leader
- move the user to another group using the option on the gear
 menu
- ensure that the user is not the leader of their original or new
 group

- in a large-roster course, add users to a group user the plus
 button next to the gear menu
- set a group leader using the gear menu next to a user
- fill a group up to it's maximum limit of students
- ensure that the "full" label shows up for that group
- ensure that when you narrow the browser size, you can
still tell that the group is full

Change-Id: I8bb1b62e0f36a37a24e050878c945f822fe9f66c
Reviewed-on: https://gerrit.instructure.com/34360
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-05-20 22:22:12 +00:00
Cody Cutrer a99e904d11 fix cassandra page view sharding issue
fixes CNVS-13024

test plan:
 * configure cassandra page views
 * as a user from shard 1, visit a course on shard 2
 * go to /users/self on shard 2, and watch the network requests for
   page views. in the response, the context should be a local id, and
   the user should be a global id

Change-Id: I6bbc54d9b055aff74b81441b2449c4548fd96816
Reviewed-on: https://gerrit.instructure.com/35056
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-05-20 21:55:09 +00:00
Tyler Pickett 8eb1df7040 update student grade listing icons for submissions
fixes CNVS-12336

Test Plan:

- As a teacher create a course with an assignment of each online
  submission type
- Log in as a student and submit each assignment
- Select the student grade book
  - The icons should be updated to match the style guide
- As a teacher grade some of the assignments
- As the student refresh the grades page (this requires a server
  restart if done locally because of CNVS-12995)
  - The grades should still be displayed correctly (we're checking
    this because there were significant refactors of this display)

Change-Id: I7aa61643eae86a98b735a18414d9f3a58eddde62
Reviewed-on: https://gerrit.instructure.com/34817
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-05-20 21:26:02 +00:00
Brian Palmer 773165a156 give all site admins app_profiling permission
refs CNVS-12563

test plan: check site admin permissions, all roles should have app
profiling granted. admins on other accounts shouldn't.

Change-Id: I211551cf4945980c587d6c6e489e2344b312621d
Reviewed-on: https://gerrit.instructure.com/35117
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-05-20 20:44:43 +00:00
Cody Cutrer 6329af6525 fix deadlock between stream items and conversations touching users
fixes CNVS-12621

test plan:
 * start a conversation between two users
 * reply to the conversation as one user
 * as the other user, refresh the dashboard; confirm the unread messages
   count went up

Change-Id: Ia9c58b9ce03b3a1befd5cfdb64774c4a73bedce9
Reviewed-on: https://gerrit.instructure.com/34734
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-05-20 20:10:56 +00:00
Jake Sorce ae6a020fbe add location name and address to calendar event
closes PS-1484

test plan:
  1. go to calendar2
  2. create a new calendar event
  3. you should now be able to add location name
  4. if you click more options you should be able to
     edit locaiton name and location address
  5. should save successfully
  6. should be able to view and edit the event with
     the new location stuff
  7. this change does not touch the show page
     of the calendar event. If you create an
     event and click it from the calendar
     and click the title no location data
     has been displayed there.
  8. the location data should also show
     up in the calendar feed as well

Change-Id: I28452f18345d2bc9cdc56188f409e13c0a85892a
Reviewed-on: https://gerrit.instructure.com/34411
Reviewed-by: Dave Jungst <dave@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2014-05-20 20:09:09 +00:00
Jeremy Stanley 103650005e fix draft state module sequence footer for locked assignments
test plan:
 - have a module that does not require sequential progress
 - have an assignment in the module whose "available from" date
   is in the future
 - have other items before and after it in the sequence
 - as a student, try to navigate the module sequence from
   the item before, to the locked assignment, to the item
   afterward
 - the module sequence footer (next and prev buttons) should
   still appear and function on the locked assignment page

fixes CNVS-12898

Change-Id: I9bdd5ecac19852086009294d73b1d2302039f68e
Reviewed-on: https://gerrit.instructure.com/35143
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-05-20 19:28:11 +00:00
Liz Abinante 85e1a19b9e gb2 - grade in comments box
fixes CNVS-4734

test plan:
* in gradebook 2
* change a grade in the gradebook cell
* click the submission comments dialog box for a submission
* for a graded submission: verify that it is displayed in the grading box
* for an ungraded submission: verify that the grading box is empty
* change the grade (for all grading types) and hit 'Update Grade'
* verify that the grade is updated in the cell
* verify that the assignment group grades are recalculated
* verify that all members of a group have their grades updated for group assignments
* verify that the set default grades dialog works correctly for all grading types

Change-Id: Id6d117c9f126136a358f975604e973fe1ad36bb1
Reviewed-on: https://gerrit.instructure.com/32960
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
2014-05-20 19:21:05 +00:00
Ryan Shaw b944e41cc3 fix 'require' so you can run outside of canvas dir
test plan:
run "<complete/path/to/your/canvas-lms>/script/console"
it should work

Change-Id: I67d22365a11a763f9e8d5578a6ca1c7b9b02bcbe
Reviewed-on: https://gerrit.instructure.com/34340
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-05-20 18:58:31 +00:00
Ryan Shaw 5e629d7a89 speed canvas:compile_assets up a little more
3 things:
* make the default for `rake css:generate` use sass-cache
  so it is faster both for local development and jenkins
* added 2 new optional params you can pass to 
  `canvas:compile_assets` to tell it to use the 
  sass_cache and to have it run canvas:check_syntax. 
  e.g. if you do:
  `canvas:compile_assets[false, true, true]` it will 
  not generate docs and use the sass cache, but
  will also run canvas:check_syntax. We should
  do that on our jenkins build process. shawn and I
  talked and he is going to do some stuff to ensure
  tmp/sassc_* is there and recent.

if you run rake `canvas:compile_assets` (with no args)
it will still force regenerating all sass files,
which I think is what we want since that's the task
we run when deploying.

Change-Id: Ief6f1a0f02a05de0a9e4a6895f6b2a8e3b0c0b0b
Reviewed-on: https://gerrit.instructure.com/34567
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
2014-05-20 16:48:06 +00:00
Ryan Shaw 474c27e039 remove css that autoprefixer takes care of for us
all of these are things that you either don't
need prefixes for at all, or things that
autoprefixer will add for us.

test plan:
canvas should look exactly the same as it did before

Change-Id: I24f89a37f4075486406634d38ffcef9f430e9961
Reviewed-on: https://gerrit.instructure.com/34950
Reviewed-by: Colleen Palmer <cpalmer@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2014-05-20 16:36:14 +00:00
Ryan Shaw f901f2754a use autoprefixer to +,- css rules to match the browsers we support
AKA: run all of our compiled sass through autoprefixer
so we don't serve css designed for browsers we
don't support and so that we do output css for the
browsers we do support.

This will result in us sending the browser A LOT less
css. see this patch for how much it will remove from
our current css:
https://gist.github.com/ryankshaw/fd0ea0a8af4596569dcb

The idea going forward would be to write your css
prefix-free and just let autoprefixer handle the
rest for you.

Also, now that this exists, we could (and should)
retroactively go through the code base and remove
some of these places where we have these prefixes
to keep our css more maintainable.

test plan:
open /styleguide (or any canvas page) in ie10 (or any browser)
it should look exactly the same as it did before

Change-Id: I7e55518d69580af692a8f04ac6fe2b491f7678af
Reviewed-on: https://gerrit.instructure.com/34940
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Colleen Palmer <cpalmer@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-05-20 16:35:45 +00:00
Braden Anderson bca75d629e fix mysql migration
fixes CNVS-13046

test plan:
  * bundle exec rake db:migrate:redo VERSION=20140410164418

Change-Id: Ibc826b7a3aeebd5345390d9389d88b5f7c84cade
Reviewed-on: https://gerrit.instructure.com/35080
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-05-20 16:33:48 +00:00
Blake Simkins 15115659e4 adding the icons for quiz stats
Change-Id: I2ae5ea7d4e59cbcf9d82a446351a4add739833fa
Reviewed-on: https://gerrit.instructure.com/35139
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Blake Simkins <bsimkins@instructure.com>
2014-05-20 15:44:27 +00:00
Jeremy Stanley 257330c4c2 always send content-type to uploadify.swf
because otherwise it will remember the previous file's content_type
and break the upload signature, resulting in a 403 from S3

test plan:
 - upload a .txt file via the files page
 - without reloading the page, upload a file with an unknown type
   (such as .blargh)
 - the second upload should succeed

fixes CNVS-13058

Change-Id: I6909b61c89d78e1d0fb8fa75e126e94ea088ba4d
Reviewed-on: https://gerrit.instructure.com/35011
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-05-20 14:58:20 +00:00
Cody Cutrer 09076c680b use a cookie to remember site admin delegated logins
fixes CNVS-10415

test plan:
 * configure site admin with its own domain, and to use CAS auth
 * log in at site admin
 * go to another account with the same base domain (i.e.
   siteadmin.canvas.dev and accounta.canvas.dev)
 * it should redirect you to site admin's CAS server; and likely
   directly log you in to canvas, cause you're still logged in
   there
 * go directly to a course on a different account without being
   logged in; it should send you to site admin cas
 * log out on the site admin domain and the other domain
 * go to the other domain to log in; it should no longer redirect
   you to site admin cas

Change-Id: I72d5327193832264228305f73e849282c48780d3
Reviewed-on: https://gerrit.instructure.com/34425
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-05-20 13:44:16 +00:00
James Williams 1d7f77d4fc export canvas meta data in qti exports
test plan:
* create a quiz with a description
* export the quiz in a qti export
* import into another course
* should retain the description

fixes #CNVS-8852

Change-Id: I454db916692b6bc58b908322301d5956c99d9901
Reviewed-on: https://gerrit.instructure.com/34886
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-05-20 12:35:36 +00:00
Transifreq 07670a8901 Updated fr translation 2014-05-20 05:07:36 -06:00
Jeremy Stanley 72ca7fa124 fix renaming quiz module items
the 'Quizzes::' prefix broke the CSS selectors. this commit
removes namespaces from the item class

test plan:
 - have a quiz in multiple modules
 - edit the module item to rename the quiz
 - the name should update in both modules without reloading the page
 - also do a sanity check on adding and renaming other item types

fixes CNVS-13083

Change-Id: I7e32c3b90c6e516770a7307090448d621823af17
Reviewed-on: https://gerrit.instructure.com/35022
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-05-19 23:54:22 +00:00
Jon Jensen e7582b1a40 spec: slight global speedup
change how we default to UTC for tests. this way we:
1. don't create Account.default if a given spec doesn't need it
   (explicitly or otherwise)
2. don't do an unnecessary Account#update_attributes before every spec

test plan:
specs, duh

Change-Id: Icd425b0e2b27bbfa6c95b713ae69c5fa36e14c14
Reviewed-on: https://gerrit.instructure.com/35069
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>
2014-05-19 22:12:09 +00:00
Anthus Williams 62ec134c92 active_polymorph
fixes CNVS-12143

allow polymorphic names in ActiveRecord has_many
associations; when retrieving association, use these
names to retrieve records with different (but synonymous)
foreign_types

currently this gem only addresses has_many relationships
to achieve feature-parity with the existing Quizzes
monkeypatching. A future commit will address adding
similar functionality to other types of associations

test plan:
1) Create a quiz with id Q
2) Attempt the quiz twice, so you can see
both attempts on submission_history/ gradebook
3) In the rails console, get the set of attempts:

versions = Quizzes::QuizSubmission.where(quiz_id: Q).first.versions

4) Change the versionable_type of one of the attempts, but not the other:  

versions.where(id: versions.first.id).update_all(versionable_type: 
"Quiz")

5) Check the submission_history/gradebook to verify
that you still see both attempts

Change-Id: Ia9611a35705ba2929a92757f586a916dce90a4ee
Reviewed-on: https://gerrit.instructure.com/33505
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
2014-05-19 22:05:09 +00:00
James Williams 9c5852bf5d exclude future enrollment scope to students of unpublished courses
test plan:
* create an unpublished course
* add a student
* as that student, visit the "/courses" index
* should not see the unpublished course listed in
 "Future Enrollments"

fixes #CNVS-5198

Change-Id: I93a69205f7bde958519c9567a1f4a547112cd9a7
Reviewed-on: https://gerrit.instructure.com/35041
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-05-19 19:51:39 +00:00
Stanley Stuart 52217621a7 move quiz_submissions to student_quiz_submissions
test plan:
  - Query the quizzes api using JSONAPI header.
  - You should not see "student_quiz_submissions" if you are a student,
    but should if you are a teacher.
  - You should see "quiz_submission" with the id of your quiz submission
    if you have one, otherwise it should be null.
  - Ember quizzes show should still work

closes CNVS-13031

Change-Id: I5935af55ad09cf04d2bd76ee5b40b2d252b1675d
Reviewed-on: https://gerrit.instructure.com/34722
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2014-05-19 19:40:18 +00:00
Michael Ziwisky 5200342a94 tiny api documentation fix
Change-Id: I7c225747a0821aa28188d96b20f60344eec68de2
Reviewed-on: https://gerrit.instructure.com/35131
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Tested-by: Michael Ziwisky <mziwisky@instructure.com>
2014-05-19 18:33:41 +00:00
James Williams 09b92dd86a fix tinymce link update dialog
test plan:
* in the rce, use the "Link to URL" button to insert a link
* click on the link in the editor to select it
* click on the "Link to URL" button to pull up a dialog
 to update the link
* switch to html editor
* confirm that the href actually updated

fixes #CNVS-1882

Change-Id: I01a85f599be017edcfe64daa13462de579f163aa
Reviewed-on: https://gerrit.instructure.com/35035
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-05-19 17:45:08 +00:00
James Williams 8ca1b231d6 restrict enrollments on users show page based on permissions
test plan:
* create two separate sub-accounts, each with a course
* add a user to both courses
* as an subaccount admin, visit the user's account details page
* confirm that you are not able to see the enrollment listed
 for the course in the other subaccount

refs #CNVS-13034

Change-Id: I8d5ac25474e5417814660e9292fe792368118d7a
Reviewed-on: https://gerrit.instructure.com/34895
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-05-19 17:07:43 +00:00
James Williams 7f6fbcbf62 don't escape message subjects
test plan:
* create an asset (such as an assignment) that includes
characters such as quotes, ampersands and brackets.
(e.g. "<stuff> &that's html escaped")
* create a notification for the asset (such as an
"Assignment Created" message)
* confirm that the message subject is not escaped
(e.g. "&lt;stuff&gt; &amp;that&#x27;s html escaped")

fixes #CNVS-11652

Change-Id: I23a4529b7e582a8a5f725f965d96c79748e762b7
Reviewed-on: https://gerrit.instructure.com/34796
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-05-19 16:51:49 +00:00
Ethan Vizitei c404a73236 Add time_zone to courses
closes CNVS-10395

This provides the ability to set the timezone
at the course level in the Course Details
area of the Settings tab.  If there
is no time_zone set, it defaults to the
default_time_zone of the root account. For
this ticket, this value is used nowhere, it just
allows it to happen (and tests are added to
verify that it does happen).  Permissions
are currently granted in tandem with
the ability to rename a course.  If you can rename
it, you can set the timezone. Making
use of this new value throughout the rest of
the application is taken care of in: CNVS-9814

TEST PLAN

1) Log into a course as an instructor.
2) Click on the settings tab.  You should see
the timezone for the associated root account
(if the course timezone won't be set yet).
3) Edit the course to change the timezone and save.
4) the timezone should now be the one selected.

Change-Id: I50e1ed1da283689511795bf018adaa021f42d6f5
Reviewed-on: https://gerrit.instructure.com/34779
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Drew Bowman <dbowman@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-05-19 16:49:38 +00:00
Ahmad Amireh bd996f4366 Ember Quiz Stats - Fix summary chart boundaries
This patch makes it so the 100th percentile data is shown, and the trend
line goes all the way to 100%, and any scores past 100 are considered
100% too.

Closes CNVS-12966

TEST PLAN
---- ----

  - create a quiz with any kind of questions
  - take it by a number of students with varying grades
    - have a student score something over maximum points possible (fudge
      maybe?)
  - visit the ember quiz stats, verify that:
    - outliers are not shown (past 100%) and are counted as 100%
    - trend line goes all the way to 100%

Change-Id: I87d59c27f6fdead29d1cea14f0e608756ae72aa6
Reviewed-on: https://gerrit.instructure.com/35095
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-05-19 16:24:45 +00:00
Derek DeVries ac7bec834f fix capitalization on kept score value
fixes CNVS-13076

test plan:
- as a teacher
  - create a quiz with multiple attempts
  - choose keep highest
  - view the quiz
  - the "score to keep" should be "Highest" capitalized
  - edit the quiz
  - choose to keep latest
  - view the quiz
  - the "score to keep" should be "Latest" capitalized

Change-Id: Ia954507cf2ef3fd6effda95f6f3f6fcf72d026fa
Reviewed-on: https://gerrit.instructure.com/35094
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-05-19 16:18:21 +00:00
Derek DeVries f3112f58f2 add individual quiz breadcrumb for fabulous quizzes
fixes CNVS-12748

test plan
  - enable fabulous quizzes
  - visit the quizzes index page
  - navigate to an individual quiz
  - a link to the individual quiz should be added to the breadcrumb navigation
  - hit the back button to go back to quizzes#index
  - the link to the individual quiz should be removed from the breadcrumbs

Change-Id: I9b972c6d3a4ab1441e85eb6e20a35de45e099867
Reviewed-on: https://gerrit.instructure.com/35081
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-05-19 16:18:04 +00:00
Derek DeVries 535566580c clean out a couple ember files not being used anymore
fixes CNVS-13164

test plan
  - nothing to manually qa

Change-Id: I44c2a959a147cf80e2be343eb5386dbf65859065
Reviewed-on: https://gerrit.instructure.com/35110
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
QA-Review: Derek DeVries <ddevries@instructure.com>
2014-05-19 05:59:14 +00:00
Transifreq ad80c6611d Updated pt translation 2014-05-17 05:07:24 -06:00
Stanley Stuart c076ae5746 "message students who" dialog for ember quizzes show
Test plan:
  - Create a quiz (or use one w/ no submissions)
  - As a teacher, go to the show page and open the
    admin menu. Open "Message Students Who"
  - You should see that the first list is
    "Students Who Have Taken the Quiz".
  - Submit button should be disabled.
  - You should be able to message students who
    have not taken the quiz by changing the
    "recipients" dropdown menu.
  - Have a student submit the quiz.
  - You should be able to go back to the page and
    message that student using the
    "Message Students Who Have Taken the Quiz"
    dropdown option.

closes CNVS-12438

Change-Id: I73900d39222b862a54395b16fd44baecf7e8a141
Reviewed-on: https://gerrit.instructure.com/31580
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2014-05-16 22:31:05 +00:00
Liz Abinante e04a49235e AssignmentOverrides refactor
fixes CNVS-10793
fixes CNVS-12360

test plan
=========
- assignment overrides should still work
- general regression of assignment#new, #edit, quizzes#new, #edit, discussions#new, #edit
- check API end points for above overrides

Change-Id: I211ad888ac14d7e863ab67bfcb27d56a85e62aac
Reviewed-on: https://gerrit.instructure.com/29980
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
2014-05-16 21:12:45 +00:00
Mark Severson cd0ef4f936 change wording of the edit homepage button
test plan (with draft state enabled):
 * navigate to the course home page
   - the button should now read 'Choose Home Page'
 * click the 'Choose Home Page' button
   - the dialog title should read 'Choose Home Page'
 * confirming the dialog should correctly change the home page

fixes CNVS-12128

Change-Id: Ic1088ad1335c1288f4a5a9721bdb62c6c95f5ad6
Reviewed-on: https://gerrit.instructure.com/34738
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Mark Severson <markse@instructure.com>
2014-05-16 17:21:47 +00:00
Kyle Follett e1cd2b5b3f Added new font icon styles
Refs: CNVS-12128
Test plan: Go to /styleguide/ page check the icons
at the bottom for 4 new ones: icon-hamburger,
icon-expand-items, icon-forward,
icon-target

Change-Id: I1f69e011b3f7b608c21811ba256ce8b1a3860a5b
Reviewed-on: https://gerrit.instructure.com/34826
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Mark Severson <markse@instructure.com>
2014-05-16 17:21:42 +00:00