fixes CNVS-34832
the arguments to these methods have not changed, just their names. and the
new methods became available in Rails 4, so we can start using them now
and prevent someone from doing old-style in the future
Change-Id: I61aa5512995dc8f25f3f7bd009a6cfa0a030e274
Reviewed-on: https://gerrit.instructure.com/101401
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
refs #CNVS-32574
Change-Id: I4e255b989f8ad3fc6ec2f2699d4950dc0e5a419a
Reviewed-on: https://gerrit.instructure.com/99483
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-32574
Change-Id: Ied89f6194ea3f63c546b50d056fe7cbe3a038609
Reviewed-on: https://gerrit.instructure.com/94678
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes: OUT-465
test plan:
- login as a user who can manage rubrics
- go to the Outcomes page
- verify that the "Manage Rubrics" button has been replaced with a menu
- verify that the menu contains a "Manage Rubrics" option
- switch to a user that doesn't have permission to manage rubrics
- verify that the menu does not show up
- Note: the "Add to course" option mentioned in the ticket is currently
disabled since we don't want incomplete functionality accidentally
going to production. This button will get tested in the next card or
two for this epic.
Change-Id: Ib4a8d7a30f2bccd0dfd2442ad7ba89c2c66044e9
Reviewed-on: https://gerrit.instructure.com/93638
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Jenkins
QA-Review: Cemal Aktas <caktas@instructure.com>
Product-Review: McCall Smith <mcsmith@instructure.com>
Change-Id: Ifc1589c3457677b94917263f91b9759593939700
Reviewed-on: https://gerrit.instructure.com/89125
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test-plan:
- visit an RCE page
- ENV.JWT in the web console should be set
Change-Id: I63e5d6750732a4a9ff0fed04e915b60e85c9f58b
Reviewed-on: https://gerrit.instructure.com/74789
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
closes CNVS-27638
closes CNVS-27733
Start RCE service integration with granular
feature flags for sidebar areas
Also fix some items in the RCE abstraction
layer for graceful fallback, and refactors
abstraction layer for injecting context
both for testing and for use cases
that perform the same wrapper work
over and over.
TEST PLAN:
1) regression test creating a syllabus (should not break)
2) with RCE service in the mix and the RICH_CONTENT_SIDEBAR_ENABLED
flag on (the medium risk flag), side bar should show replaced
by dummy sidebar from RCE service
3) note that we do not expect the sidebar to be functional yet
with the service, this is just making sure we can flip the
switch, and didn't break syllabus in the process
Change-Id: I775669214b2541b037daf0c55caa00e452487927
Reviewed-on: https://gerrit.instructure.com/73426
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
- Workaround of rails bug affecting account.all_users.find
Fixes CNVS-26170
Test plan:
As account admin:
1. ensure account has student users and outcomes
2. go to the user page for a student user
3. click "See Outcome Results for ..."
4. Verify that the page shows a table of outcome results
instead of a server error
Change-Id: I71cac5d9250dc6601213f81a970a7d6d1798e1de
Reviewed-on: https://gerrit.instructure.com/70364
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Tested-by: Jenkins
Product-Review: McCall Smith <mcsmith@instructure.com>
Fixes CNVS-25911
Test plan:
Align an outcome to a question bank
Create a quiz
Import question bank into quiz
Have student take quiz
Go to outcome show page
Click on the quiz result within "Artifacts"
Should redirect to quiz submission, not show error
Change-Id: Ibb25d4fae21ccce29d49325bd593de3eafd866e3
Reviewed-on: https://gerrit.instructure.com/70093
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Tested-by: Jenkins
Product-Review: McCall Smith <mcsmith@instructure.com>
fixes CNVS-26185
test plan:
- with and without remote RCS flag
- go to outcomes indes
- you can edit the description
of outcomes groups and outcomes
like normal
Change-Id: Ifb294a2be5671938d4c42420bc7dfd6922689572
Reviewed-on: https://gerrit.instructure.com/69660
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
test plan:
* create an account admin with "Manage courses"
permission disabled, but "Create and edit assessing rubrics"
enabled
* should be able to view and manage course rubrics
closes #CNVS-22331
Change-Id: Ifb93fea5dc96c0ae07b7603805cfa84fa319e43f
Reviewed-on: https://gerrit.instructure.com/60193
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
We already have several asset accesses instrumented via
log_asset_access, so this captures those and sends them to the live
events as well. In order to better categorize the data, the synthetic
keys generated like "syllabus:course_1234" have been changed to arrays,
so that we can break that data apart in the live events without parsing
the string.
test plan:
* Ensure that asset accesses are still being logged normally
* Ensure that asset accesses also get sent as live events. (See
change Id799688c972205a1eee84a673912f84b0c7abb57 for more information
about that.)
Change-Id: I947a7f8b1d104bfafba96c30b81d0cb9bae81b9d
Reviewed-on: https://gerrit.instructure.com/50521
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Zach Wily <zach@instructure.com>
Adds a React view to handle deletion of alignments from
outcomes/show view (this js had been removed ages ago).
Cleaned up LearningOutcome#remove_alignment. Added
an AlignmentsHelper with some view helper methods
to clean up the outcome_alignment partial.
fixes CNVS-15610
test plan:
- Create alignments for an outcome via the Magic Marker app.
- View outcome and its alignments at /courses/:cource_id/outcomes/:id.
- Click the red 'x' button.
- Press yes on the js confirmation box that pops up.
- The alignment line item will be removed.
Change-Id: I8cbf88dc8e8dc074e7b603f8082192a1942c7866
Reviewed-on: https://gerrit.instructure.com/47430
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
This cleans up the code, reorganizes it a bit, updates some stale
comments, adds some new comments, and follows the 'return unless
authorized' pattern which replaces the deeply nested if blocks. So
something like this:
Instead of:
def my_method
if authorized_action(@context, @current_user, :read)
code_line 1
code_line 2
if authorized_action(@context, @current_user, :write)
code_line 3
end
end
end
We get:
def my_method
return unless authorized_action(@context, @current_user, :read)
code_line 1
code_line 2
return unless authorized_action(@context, @current_user, :write)
code_line 3
end
Fixes CNVS-16963
Test Plan:
Make sure that all of this works:
- Create an outcome group
- Create an outcome in that group
- Create more groups and outcomes and make sure they can be
connected
- An outcome can belong to more than one group
- Edit an outcome
- Delete an outcome
Make sure that the above all fail when unauthorized
Change-Id: I31c8791cb1bbbe004462b0720f221eded0e95932
Reviewed-on: https://gerrit.instructure.com/44633
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
test plan:
* with cassandra and page views enabled, should be able to
log user access to:
- course home
- course modules index
- outcomes index,
- assignments index
- pages index
- external urls
- external tools tools
(and be able to view them in the user access report)
* also confirm that visiting the discussions index
does not register multiple views when visiting once
closes #CNVS-15321
Change-Id: I43329b1764cdf0c313f548f6aefa3af26c03f300
Reviewed-on: https://gerrit.instructure.com/42075
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
This commit namespaces the rest of quiz related code into a Quizzes
namespace: controllers, views, models, and classes that previously lived
under lib/ that are Quiz-related.
Test plan:
Full regression test on all quiz related items
refs CNVS-10457
Change-Id: If54b61213945056539e03271a936d233abb66188
Reviewed-on: https://gerrit.instructure.com/29351
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
if the response is json and paginated, make sure it honors the per_page
parameter. also, make sure we don't accidentally allow arbitrarily large
per_page values.
test-plan:
[check this per endpoint]
- have more than <max> entries (e.g. apps in the app center)
- fetch <endpoint>
- should get a page with <default> results
- link with rel="next" should embed per_page=<default>
- fetch <endpoint>?per_page=<max+1>
- should get a page with <max> results
- Link header should have a link with rel="next". that link should
embed per_page=<max>
- fetch <endpoint>?per_page=1
- should get a page with 1 result
- link with rel="next" should embed per_page=1
[endpoints]
/api/v1/courses/:course_id/app_center/apps
default: 72
max: 72
/api/v1/courses/:course_id/app_center/apps/:app_id/reviews
default: 15
max: 50
/conversations/discussion_replies.json
default: 15
max: 50
/courses/:course_id/users/:user_id/usage.json
default: 50
max: 50
/courses/:course_id/group_unassigned_members.json
default: 15
max: 100
/courses/:course_id/outcomes/:outcome_id/results
default: 10
max: 50
/courses/:course_id/question_banks/:question_bank_id/questions
default: 50
max: 50
/courses/:course_id/quizzes/:quiz_id/moderate.json
default: 50
max: 50
/api/v1/courses/:course_id/activity_stream
default: 21
max: 50
Change-Id: Iacb0b413de1175fb70d9b073fccef3e70082e60e
Reviewed-on: https://gerrit.instructure.com/26095
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
fixes CNVS-8717
test plan:
- things to check for original regrade count ticket
- add a quiz with at least 3 questions and allow multiple attempts
- take the quiz as a student
- regrade the quiz once only changing one question - choose correct only option
- regrade the quiz again choosing 2 more questions - choose correct only option
- view the quiz results as a student
- it should show the correct total number of questions affected by the regrade
- make a second attempt as a student
- regrade notifications should no longer appear
- regrade the question 2 more times and make sure that the questions affected counts are correct
- other things to check that were touched by this commit
- make sure the versions table for attempts on quizzes#show works correctly
- make sure that viewing submissions for past versions works correctly
- make sure student analysis generates correctly for previous versions
Change-Id: If8bac35094cb7d73820ab826041d3089a6151b52
Reviewed-on: https://gerrit.instructure.com/25628
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
fixes CNVS-7199, CNVS-4414
abstract some ICU stuff out to Canvas::ICU, and add some missing
functionality in FFI-ICU
test plan:
* create a bunch of groups in the same category, named 1-10.
10 should sort after 9, not 1
* repeat for creating and publishing quizzes *with the same due date*.
go to the quiz index, and 10 should sort after 9, not 1
Change-Id: I323eb12dfb5bd23dbcbb3b543fa1b90a72f4341b
Reviewed-on: https://gerrit.instructure.com/24732
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
refs CNVS-7597
render :json => thing will call ActiveSupport::JSON.encode(thing) unless
thing is a String. ActiveSupport::JSON.encode(thing) just calls
thing.to_json but with some circular reference checking that we want. we
may also want enhance ActiveSupport::JSON.encode to do additional
processing, and calling to_json straight up would bypass that.
in the cases where we do need to do the structural transformation before
passing to render :json (e.g. because of need to pass arguments), use
as_json to do structural transformation only, vs. to_json that does
serialization of the as_json result.
adds a rake task to lint the controllers to enforce as_json over to_json
in render json calls.
test-plan: heavy regression testing; no end behavior should change
(except a pair of serialization bugs that got fixed)
Change-Id: I7a91a9fe0eca70456bc5bca233f0ed6b27a54aaf
Reviewed-on: https://gerrit.instructure.com/23650
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan:
* add an outcome on a course
(note the outcome id/url)
* set the large_roster flag on the course
* ensure that the outcomes are still listed
* ensure that the outcome mastery page cannot be accessed
* through a direct url
* through the course outcomes page
* through the assignments page
* through the a course rubric page
(Edit > Find Outcome Criterion)
* through the quizzes page
(Edit > * > Show Rubric)
* through the discussions page
(* > Add Rubric)
* through question banks
(Align Outcome)
! Note:
this does not change the way account outcomes are handled!
outcome mastery pages will still be shown for account outcomes.
fixes #CNVS-3094
Change-Id: Iaaaf437e3e76fb7c102641d55d5b6c8930a23d39
Reviewed-on: https://gerrit.instructure.com/18287
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
fixes#11906
test plan:
- make sure common core shows up in account outcomes for several different
shards
Change-Id: Ife61ef56be73a43e37c6518607d337236ec61e2a
Reviewed-on: https://gerrit.instructure.com/15568
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
In the context of a course, when Finding an outcome to import,
don't show the "State Standards" group. Only show Account-level
outcomes that the admin has imported or created.
Testing Notes:
===========
* In a course, visit "Outcomes" and hit "Find" on toolbar
* No "State Standards" group should appear.
* In an Account, visit "Outcomes" and hit "Find" on toolbar
* The "State Standards" should be an option for browsing.
Change-Id: I8385b45e522e99c23c8c4542011d7551848fa002
Reviewed-on: https://gerrit.instructure.com/15001
Reviewed-by: Marc LeGendre <marc@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
test plan for course, account, and sub-account
outcomes page:
- using the 'New' buttons in the toolbar
create, edit, and delete a bunch of outcomes
and groups and nested groups
- when editing an outcome, insert, edit, and delete the criterion ratings
- find dialog
- inside any top level standard group
- select an individual outcome or a group to import
- after importing, the outcome or group should show up in the
seleced group of the main window and show it's details on the right
- account standards
- the account groups (the first level under 'Account Standards') should
not be importable
- pagination
- add 20-30 outcomes and groups to a group
- groups should load first and then the outcomes
- a 'Loading more results' item should be displayed when fetching
more pages
- test out the 'Back' button
Change-Id: Iba1bb0533fb962ac6d206179c82c388f5fee1d84
Reviewed-on: https://gerrit.instructure.com/13086
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
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>
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>
this method was a thin wrapper around get_context that redirected to the root
page if a context didn't exist. Ostensibly it also showed the http error as in
flash message if a context did exist but the user didn't, or didn't belong to
the context, but this branch of code never worked due to a state vs
workflow_state bug that rendered the if statement always false.
Change-Id: I5a7353ddf3e1fc082324384a5ea3d3b6196c0dfd
Reviewed-on: https://gerrit.instructure.com/8499
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
This problem was hidden in 1.8 because Array#to_s is an alias for
Array#join , but manifests itself in 1.9 where it aliases Array#inspect
Change-Id: I118696cdc129f71f31997ad852d8d7c6d3ad0fc9
Reviewed-on: https://gerrit.instructure.com/5842
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
starting in 1.9.x, the number of args passed to a lambda is enforced --
procs still allow variable number of args
Change-Id: Id1a4338d10b87b870cd53989ea17ea422d848278
Reviewed-on: https://gerrit.instructure.com/5834
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
update_all's update hash doesn't have any magic performed on bare Time
objects; it assumes any Time object it's given is already in UTC. using
a TimeWithZone object (regardless of timezone), which Fixnum#ago and
friends happen to return, is still fine.
Change-Id: I297b2a3211b896b5225ebcfaaee3c1eb56e55fb6
Reviewed-on: https://gerrit.instructure.com/5351
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
when displaying the aligned items to an outcome at the account level,
include items defined in any courses associated with the account.
also, finish killing off vestigial alignment reordering at the account
level
fixes#5140
Change-Id: I7ce8250d707f8a1283b130801f1d7c0ca7e0fe26
Reviewed-on: https://gerrit.instructure.com/5276
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Basically, being an admin doesn't imply full access. Instead, it
only implies :read_as_admin, which only lets you see things like
course name and section names.
Add two new role overrides:
* :read_course_content implies :read on the course
* :manage_content is now a full fledge RoleOverride instead of
an internal permission implicitly given to Teachers and Admins
Actually start using :view_all_grades override so that Admins
without it won't see grades (replaces :read_as_admin that was
granted to concluded teachers; :view_all_grades is always granted to
concluded teachers, but not to Admins).
Spiffy up several helper functions to take an array of permissions,
and return if any of them are true.
Make sure not to show course tabs that the user does not have access
to.
Fix up lots of permission checks, especially around viewing users
(:read_roster, :manage_students, or :manage_admins might allow you
to see the users in a course; :read_roster only allows you to see
prior enrollments if it was granted to you as an account admin).
Change-Id: Iafcab7956649e9d28e17bd5eedcb155a9ea76af4
Reviewed-on: https://gerrit.instructure.com/5092
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Question banks can be aligned to outcomes that
are part of the same context. Whenever students
take a quiz with questions from the bank they'll
get evaluated for the linked outcomes based on
the points they got for each bank question.
Also fixed a bug which may or may not have existed
before this commit that unexpectedly deleted quiz
submissions when a user tried to re-take a quiz.
refs #3317
Change-Id: I744af3915672a5e260b078503e0bc648c238eca9
Reviewed-on: https://gerrit.instructure.com/2641
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>