create draft state flag
most course objects will be getting draft state implementations soon, but we don't want to show publishing stuff until it's implemented everywhere. Test Plan: * N/A closes #CNVS-5280 Change-Id: Ie5500b35f9e912d8ae6b5845ce0a238fb9a72927 Reviewed-on: https://gerrit.instructure.com/19589 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Zach Pendleton <zachp@instructure.com> Product-Review: Bracken Mosbacker <bracken@instructure.com> QA-Review: Bracken Mosbacker <bracken@instructure.com>
This commit is contained in:
parent
cea4ebac7f
commit
7798719bac
|
@ -85,7 +85,11 @@ class ContextModulesController < ApplicationController
|
|||
def create
|
||||
if authorized_action(@context.context_modules.new, @current_user, :create)
|
||||
@module = @context.context_modules.build
|
||||
@module.workflow_state = 'active'
|
||||
if @domain_root_account.enable_draft?
|
||||
@module.workflow_state = 'unpublished'
|
||||
else
|
||||
@module.workflow_state = 'active'
|
||||
end
|
||||
@module.attributes = params[:context_module]
|
||||
respond_to do |format|
|
||||
if @module.save
|
||||
|
|
|
@ -150,6 +150,7 @@ class Account < ActiveRecord::Base
|
|||
add_setting :users_can_edit_name, :boolean => true, :root_only => true
|
||||
add_setting :open_registration, :boolean => true, :root_only => true
|
||||
add_setting :enable_scheduler, :boolean => true, :root_only => true, :default => false
|
||||
add_setting :enable_draft, :boolean => true, :root_only => true, :default => false
|
||||
add_setting :calendar2_only, :boolean => true, :root_only => true, :default => false
|
||||
add_setting :show_scheduler, :boolean => true, :root_only => true, :default => false
|
||||
add_setting :enable_profiles, :boolean => true, :root_only => true, :default => false
|
||||
|
|
Loading…
Reference in New Issue