|
1 | | -<% criterion = rubric_criterion || nil; assessing ||= false; rubric ||= nil; rubric_association ||= nil; edit_view ||= false; assessment_rating ||= nil %> |
2 | | -<tr id="criterion_<%= criterion ? criterion.id : "blank" %>" class="criterion <%= "blank" unless criterion %> <%= 'ignore_criterion_for_scoring' if criterion && criterion.ignore_for_scoring %> <%= 'learning_outcome_criterion' if criterion && criterion.learning_outcome_id %>" style="<%= hidden unless criterion %>"> |
| 1 | +<% |
| 2 | + criterion = rubric_criterion || nil |
| 3 | + assessing ||= false |
| 4 | + rubric ||= nil |
| 5 | + rubric_association ||= nil |
| 6 | + edit_view ||= false |
| 7 | + assessment_rating ||= nil |
| 8 | + |
| 9 | + learning_outcome_criterion = criterion.try(:learning_outcome_id) |
| 10 | + description = criterion.try(:description) || t('defaults.description', "Description of criterion") |
| 11 | +%> |
| 12 | + |
| 13 | +<tr id="criterion_<%= criterion ? criterion.id : "blank" %>" class="criterion <%= "blank" unless criterion %> <%= 'ignore_criterion_for_scoring' if criterion && criterion.ignore_for_scoring %> <%= 'learning_outcome_criterion' if learning_outcome_criterion %>" style="<%= hidden unless criterion %>"> |
3 | 14 | <td class="criterion_description hover-container"> |
4 | 15 | <div class="container"> |
5 | 16 | <div class="links editing"> |
6 | 17 | <a href="#" class="edit_criterion_link hide-till-hover"><i class="icon-edit standalone-icon"></i></a> |
7 | 18 | </div> |
8 | 19 | <%= image_tag "flagged_question.png", :class => "learning_outcome_flag", :title => t('titles.linked_to_learning_outcome', "This criterion is linked to a Learning Outcome") %> |
9 | | - <span class="description criterion_description_value"><%= criterion.description rescue t('defaults.description', "Description of criterion") %></span> |
10 | | - <span class="learning_outcome_id" style="display: none;"><%= criterion.learning_outcome_id rescue nbsp %></span> |
11 | | - <span class="criterion_id" style="display: none;"><%= criterion && criterion.id %></span> |
12 | | - <div class="long_description_holder editing <%= 'empty' if !criterion || !criterion.long_description || criterion.long_description.empty? %>"> |
| 20 | + <span class="description criterion_description_value"><%= description %></span> |
| 21 | + <span class="learning_outcome_id" style="display: none;"><%= criterion.try(:learning_outcome_id) %></span> |
| 22 | + <span class="criterion_id" style="display: none;"><%= criterion.try(:id) %></span> |
| 23 | + <div class="long_description_holder editing <%= 'empty' if !criterion || criterion.long_description.blank? %>"> |
13 | 24 | <a href="#" class="long_description_link"><%= t 'links.view_longer_description', "view longer description" %></a> |
14 | | - <textarea class="long_description" style="display: none;"><%= h((criterion.long_description rescue '')) %></textarea> |
| 25 | + <textarea class="long_description" style="display: none;"><%= h((criterion.try(:long_description) || '')) %></textarea> |
15 | 26 | </div> |
16 | 27 | <div class="threshold"> |
17 | 28 | <%= before_label :threshold, "threshold" %> |
|
0 commit comments