update moodle2cc gem version

Change-Id: I6104e55085bc27fb7151fc33c317f4134ae60947
Reviewed-on: https://gerrit.instructure.com/12730
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
learning outcomes refactor

This list is *NOT* complete, some items may have snuck in that I forgot
to note, and/or some of the noted items may not be completely functional
yet.

Specs need to be written around a lot of this, other specs will no doubt
need to be fixed.

Some things, particularly around LearningOutcomeGroups will need data
migrations that aren't there yet.

 * remove LearningOutcome.non_rubric_outcomes? and replace with false
   where invoked
 * remove LearningOutcome.enabled? and replace with true where invoked
 * remove never-taken branches
 * remove the shared/aligned_outcomes partial and it's supporting
   javascript, since it's now empty
 * remove js handler for add_outcome_alignment_link and supporting
   method since it only occurred in never-taken branches
 * mix LearningOutcomeContext into Course and Account
 * replace LearningOutcomeGroup.default_for(context) with
   LearningOutcomeContext#root_outcome_group
 * rename LearningOutcome#content_tags to LearningOutcome#alignments
 * rename LearningOutcomeGroup#content_tags to
   LearningOutcomeGroup#child_links, and properly restrict
 * remove ContentTag[Alignment]#rubric_association_id, add
   ContentTag[Alignment]#has_rubric_association? that looks at the
   presence of the content's rubric_association_id
 * condition off the assignment having a rubric_association rather than
   filtering tags by has_rubric_association (which just looks back at
   the assignment). all or none of the assignment's alignments are
   forced to have the association (via the assignment). this was true in
   practice before, is now codified (and more efficient)
 * rename AssessmentQuestionBank#learning_outcome_tags to
   AssessmentQuestionBank#learning_outcome_alignments
 * rename Assignment#learning_outcome_tags to
   Assignment#learning_outcome_alignments
 * rename Rubric#learning_outcome_tags to
   Rubric#learning_outcome_alignments
 * move/rename (Course|Account)#learning_outcome_tags to
   LearningOutcomeContext#learning_outcome_links
 * move/rename Account#learning_outcomes (corrected) and
   Course#learning_outcomes to
   LearningOutcomeContext#linked_learning_outcomes
 * move/rename Account#created_learning_outcomes and
   Course#created_learning_outcomes to
   LearningOutcomeContext#created_learning_outcomes
 * clarify and correct usage of linked_learning_outcomes vs.
   created_learning_outcomes
 * move/rename (Account|Account)#learning_outcome_groups to
   LearningOutcomeContext#learning_outcome_groups
 * remove unused Account#associated_learning_outcomes
 * just remove one link to a learning outcome when deleting
 * merge Account#has_outcomes?, Course#has_outcomes? and
   Course#has_outcomes into LearningOutcomeContext#has_outcomes?, add a
   use in Context#active_record_types
 * kill LearningOutcomeGroup#root_learning_outcome_group (unused)
 * rename LearningOutcomeResult#content_tag to
   LearningOutcomeResult#alignment
 * kill unused (and broken) OutcomesController#add_outcome_group
 * kill unused OutcomesController#update_outcomes_for_asset
 * kill unused OutcomesController#outcomes_for_asset
 * remove unused (outside specs, correct specs)
   AssessmentQuestionBank#outcomes=
 * remove unused ContentTag#learning_outcome_content
 * replace ContentTag.learning_outcome_tags_for(asset) (only ever called
   with asset=an assignment) with call to
   Assignment#learning_outcome_alignments
 * remove unused ContentTag.not_rubric
 * remove (now) unused ContentTag.include_outcome
 * remove unused LearningOutcome#learning_outcome_group_associations
 * avoid explicit use of ContentTag in outcome-related specs
 * replace LearningOutcomeGroup#learning_outcome_tags with
   LearningOutcomeGroup#child_outcome_links (and only use for outcome
   links; not tags for child groups)
 * split ContentTag#create_outcome_result into
   Submission#create_outcome_result,
   QuizSubmission#create_outcome_result, and
   RubricAssessment#create_outcome_result. fix some bugs along the way
 * refactor ContentTag.outcome_tags_for_banks and some code from
   QuizSubmission#(track_outcomes|update_outcomes_for_assessment_questions)
   into QuizSubmission#questions_and_alignments
 * refactor RubricAssociation#update_outcome_relations and
   Rubric#update_alignments into LearningOutcome.update_alignments
 * don't use ContentTag#rubric_association with outcome alignments; use
   the tag's content's rubric_association in its place (they should have
   been equal anyways)
 * refactor LearningOutcome.available_in_context and
   @context.root_outcome_group.sorted_all_outcomes (only time
   sorted_all_outcomes is used) into
   LearningOutcomeContext#available_outcomes and
   LearningOutcomeContext#available_outcome
 * overhaul LearningOutcomeGroup#sorted_content and rename to
   LearningOutcomeGroup#sorted_children. it not returns ContentTags
   (outcome links) and LearningOutcomeGroups, vs. LearningOutcomes and
   LearningOutcomeGroups; fix usages appropriately
 * fix UI for arranging/deleting outcome links and groups within a group
   to refer to the outcome link rather than the outcome

Change-Id: I85d99f2634f7206332cb1f5d5ea575b428988d4b
Reviewed-on: https://gerrit.instructure.com/12590
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
export/import and copy new outcome functionality

Change-Id: Id3b056dc527af48b08a514e309b7654da95b3829
Reviewed-on: https://gerrit.instructure.com/12705
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
fix broken sass

older versions of sass would silently ignore the invalid & here. this is
actually how we want it to behave, since the li is inside the
.view_switcher

for the rubrics one, there is no hover element, so the generated sass is
equivalent

test plan:
1. run bundle update
2. it should work
3. go to a discussion topic
4. the icons in the view switcher ("Expand Unread", etc.) should be
   correctly aligned

Change-Id: I418d902f124f754f000f4dd19df8875ea60b3d77
Reviewed-on: https://gerrit.instructure.com/12877
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-on: https://gerrit.instructure.com/13088
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
refactor jobs admin functionality to not use AR queries

A set of class functions were added to Delayed::Backend::ActiveRecord
for all the querying a updating functionality that the jobs admin needs,
so that no direct ActiveRecord queries are needed. The /jobs UI is
refactored to use these new functions.

There are a few differences in behavior: The search isn't a combined
wildcard search anymore. Instead, new "flavors" were added to the
drop-down for strand, tag, and ID. The search box searches only the
selected attribute, and it's exact match now.

Specs are being updated to use these new functions as well. Eventually,
no direct AR queries will be done against Jobs anywhere, so that non-AR
jobs backends are possible.

Also as part of this, all jobs require a queue now. Passing nil for the
queue will use the default of Delayed::Worker.queue.

test plan: Load /jobs, and verify that it works as before except where
there are differences as described above.
  * Selecting flavors of jobs lists only those jobs.
  * Searching by ID, strand or tag works.
  * The hold/unhold/delete actions work in the various combinations of
    filtering/searching.
  * Linking to an individual job still works (though the query string
    has changed so old links don't work)
  * Running jobs and list of popular tags still works as expected.

Change-Id: Iffd5b8c7b3d6e4b128792a9dee7b97c6dfb251dc
Reviewed-on: https://gerrit.instructure.com/12632
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-on: https://gerrit.instructure.com/13089
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
fixup failing specs and add temporary plugin shims

the shims will be removed in a later commit. that commit will need to
wait for the plugins to be fixed before it can be submitted.

test-plan:
 - specs pass

Change-Id: Ifd6e2a254f0272a58d507c845cdae58b7392801c
Reviewed-on: https://gerrit.instructure.com/12798
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Merge branch 'master' into dev/learning_outcome_refactor

Conflicts:
	public/javascripts/aligned_outcomes.js
	spec/apis/v1/collections_spec.rb
	vendor/plugins/moodle2cc/Gemfile

Change-Id: I2ea31263e4367dd456d12d2d53a297f3c25c9a5b
Outcome API

Change-Id: I6c33d2ab364522930b908d8edd162b20634e54b5
Reviewed-on: https://gerrit.instructure.com/12762
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Merge branch 'master' into dev/learning_outcome_refactor

Change-Id: I48090d9965442b56eb4d73cbca91dfbf7c18517a
create framework for importing standards from a vendor

This adds a migration tool that can import standards from
academic benchmarks, either by giving it a file, or by
using their API.

Test Plan:
 * Run a migration for a specific authority
 * It should import into the global group happily

refs #9866

Change-Id: If654681d60848e1233475f737dc2fadecacdbd98
Reviewed-on: https://gerrit.instructure.com/13421
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
renamed View::filter to View::afterRender

Change-Id: If7a19ad055966f2147c173b02ea9011fc4741ee9
Reviewed-on: https://gerrit.instructure.com/13730
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
revert several grade calculation changes

Revert "make grade_summary page use GradeCalculator"

This reverts commit 4776cb28806098895c74c12eca09b778956cfaaa.

Revert "fix gradebook bug in ie8"

This reverts commit c9272374581c4eb21676b7db1d3035868d45f7d0.

Revert "gb2: don't lie about which assignments are dropped"

This reverts commit da379330794322efd5e956c301e2dbbef7f0c656.

Revert "fix ruby calculation of grades (grade-dropping)"

This reverts commit 63f75597a2983379c5c36afe3efcf26f36cdef56.

Revert "fix grade-dropping in gradebooks"

This reverts commit 4a4a2f53c1d86fb87c9525204bab35127e2b1a03.

Conflicts:

	spec/selenium/grading_standards_spec.rb

Change-Id: I597d777fee23c4dc57bb915c6cbe5185dc18d0af
Reviewed-on: https://gerrit.instructure.com/13716
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
validate ldap filter in search test

test plan:
 * enter valid ldap settings, except for filter
 * test them, but don't put in a username and password
 * you should get an error about invalid filter syntax

Change-Id: I61339085cbd902ba6e1234a098181db32cd42385
Reviewed-on: https://gerrit.instructure.com/13754
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
eportfolio direct-to-s3 upload, fixes #10572

don't proxy uploads through canvas

also fix ui so that file picker goes away after saving

test plan:
1. w/ s3 file store, edit an eportfolio
2. add a file/image
3. it should work
4. repeat steps 1-3 for local file store
5. edit an eportfolio
6. add a file from your existing user files
7. it should work

Change-Id: I1518e06dec495180371eef75af2e6659d49d36b1
Reviewed-on: https://gerrit.instructure.com/13692
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
add account setting to only allow calendar2

closes #10292

Test plan:
  1) enable calendar2 on an account
  2) set up a user to prefer the old calendar
  3) set the 'calendar2_only' setting to true on the account
  4) go to the calendar as the user from step 2, you should be
     redirected to calendar2
     * there should be no way to get to the old calendar

Change-Id: I6280caf2878d04ef3f73efdbc61187906aeb5113
Reviewed-on: https://gerrit.instructure.com/13756
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
clear associated_enrollment between rows; fixes #10652

test plan:
 * create a SIS import that enrolls a student after an observer
 * the student's enrollment should not have an associated user ID

Change-Id: I6b05e1c7cc4a634a77795b5d8ddc7ba269810479
Reviewed-on: https://gerrit.instructure.com/13776
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
filter discussion search results after every key press in IE

fixes: #10342

also fixed css so it looks good in firefox and IE

the ticket also mentioned that "the x button to
clear search also does not display" but not going
to fix that, it is because IE does not have any native
special styling for input type=search.

test plan:
 * make sure that the box looks good in IE, firefox,
   and chrome.  (like this: http://cl.ly/image/1p2g0Q2L2a2w )
 * make sure results are filtered after you press a
   a key in in IE

Change-Id: I690fa5a06b1cbd0e7195070e7ef0109094742ac2
Reviewed-on: https://gerrit.instructure.com/13635
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
fix discussion reordering and allow dragging to top and bottom

fixes: #10327

test plan:
* Create at least 5 discussion topics in a course
* Go to the discussion topics page
* Drag an item in the middle of the list to the bottom
* make sure it stays where you put it
* reload page make sure the order stays
* repeat but put it on top of list
* repeat putting it in middle of list

Change-Id: Ib838a3fba7812d999c1bb8ac8f3f772933bdb92f
Reviewed-on: https://gerrit.instructure.com/13636
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
fix server error when non-enrolled admin comments on submission

refs #10595

test plan: try to comment on a submission to an assignment
as a site admin user who is not enrolled in the course

Change-Id: I60a5bdad6e0771fe19e74bf75cd42d86f3ffebe1
Reviewed-on: https://gerrit.instructure.com/13755
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
make it so if you hit enter in jqUI dialog it submits form

fixes: #10247

test plan:
hit Start A New Course on dashboard
Name the course and hit enter
should do the same as hitting the submit button

Change-Id: I76a45edb723ddc33d1bd0708551e35744b1db0b7
Reviewed-on: https://gerrit.instructure.com/13650
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>