%
# Copyright (C) 2016 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
%>
<%
module_item_conditional_next ||= nil
module_item ||= module_item_conditional_next
item_data ||= { published_status: 'unpublished' }
completion_criteria ||= nil
editable ||= false
criterion = completion_criteria && completion_criteria.find{|c| c[:id] == module_item.id}
%>
<%
if item_data[:mastery_paths][:locked]
%>
<%= t('Locked until "%{item_name}" is graded', {item_name: module_item.content.title}) %>
<%
elsif item_data[:mastery_paths][:awaiting_choice]
%>
<%
elsif item_data[:mastery_paths][:still_processing]
%>
<%= t('Locked until mastery path is processed for "%{item_name}"', {item_name: module_item.content.title}) %>
<%
end
%>