dev_forum
SylorHuang 6 years ago
parent 1c5b0155c3
commit c3087d7b4e

@ -350,6 +350,7 @@ module ApplicationHelper
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,options)
m_t = markdown.render(text)
m_t&.include?("src=\"") ? m_t&.gsub("src=\"","src=\"#{request_url}") : m_t
Rails.logger.info("###########__________request_url_________###################{request_url}")
end
end

@ -79,16 +79,16 @@
<div class="pbt5">
<% if q.question_type == 0 %>
<% q.exercise_choices.each do |s| %>
<div class="pbt5 clearfix">
<span class="choose-radio pull-left line-24 mt5"></span>
<span class="inline-block pull-left line-24 ml10"><%= to_markdown(s.choice_text) %></span>
<div class="pbt5 clearfix main-choice">
<span class="choose-radio pull-left mt8"></span>
<span class="inline-block pull-left choice-text ml10"><%= to_markdown(s.choice_text) %></span>
</div>
<% end %>
<% elsif q.question_type == 1 %>
<% q.exercise_choices.each do |s| %>
<div class="pbt5 clearfix">
<span class="choose-checkbox pull-left line-24 mt5"></span>
<span class="inline-block pull-left line-24 ml10"><%= to_markdown(s.choice_text) %></span>
<div class="pbt5 clearfix main-choice">
<span class="choose-checkbox pull-left mt8"></span>
<span class="inline-block pull-left choice-text ml10"><%= to_markdown(s.choice_text) %></span>
</div>
<% end %>
<% elsif q.question_type == 2 %>

@ -257,7 +257,7 @@ table{
text-align:center;
}
table, tr, td, th, tbody, thead, tfoot,textarea{
table, tr, td, th, tbody, thead, tfoot,textarea,.main-choice{
page-break-inside: avoid;
}
table th{
@ -318,10 +318,8 @@ textarea{
clear:both;
zoom:1;
}
.line-24{
line-height: 24px;
}
.line-24 p{
.choice-text p{
margin-bottom:0;
}

@ -181,21 +181,21 @@
<% if q_type == 0 %>
<% q.exercise_choices.each do |s| %>
<% check_answer = (user_answer.present? && (s.id == user_answer.first.exercise_choice_id)) ? "choose-answer" : '' %>
<div class="pbt5 clearfix">
<span class="choose-radio <%= check_answer %> pull-left line-24 mt5"></span>
<span class="inline-block pull-left line-24 ml10"><%= to_markdown(s.choice_text) %></span>
<div class="pbt5 clearfix main-choice">
<span class="choose-radio <%= check_answer %> pull-left mt8"></span>
<span class="inline-block pull-left ml10 choice-text"><%= to_markdown(s.choice_text) %></span>
</div>
<% end %>
<% elsif q_type == 1 %>
<% q.exercise_choices.each do |s| %>
<% check_answer = (user_answer.present? && (user_answer.pluck(:exercise_choice_id).include?(s.id))) ? true : false %>
<div class="pbt5 clearfix">
<div class="pbt5 clearfix main-choice">
<% if check_answer %>
<span class="choose-checkbox choose-answer-multi pull-left line-24 mt5" ></span>
<span class="choose-checkbox choose-answer-multi mt8" ></span>
<% else %>
<span class="choose-checkbox pull-left line-24 mt5"></span>
<span class="choose-checkbox pull-left mt8"></span>
<% end %>
<span class="inline-block pull-left line-24 ml10"><%= to_markdown(s.choice_text) %></span>
<span class="inline-block pull-left choice-text ml10"><%= to_markdown(s.choice_text) %></span>
</div>
<% end %>
<% elsif q_type == 2 %>

Loading…
Cancel
Save