<commit_before><% if rscore and rscore[:assessments].length > 0 %>
    <BR/>
    <%flag_varying_rubrics=false%>

    <%if @questions.has_key?("review1".to_sym)%>
        <b> Round 1:</b>
        <%flag_varying_rubrics=true%>
        <%= render :partial => 'grades/review_table', :locals => { :ctrl => 'review', :caction => 'view_review', :symbol => "review1".to_sym, :prefix => prefix, :assignment => participant.assignment, :reviews => rscore[:assessments], :collabel => "Review", :rowlabel => "Reviewer", :round=>1 }%>
    <%end%>

    <%if @questions.has_key?("review2".to_sym)%>
        <b> Round 2:</b>
        <%flag_varying_rubrics=true%>
        <%= render :partial => 'grades/review_table', :locals => { :ctrl => 'review', :caction => 'view_review', :symbol => "review2".to_sym, :prefix => prefix, :assignment => participant.assignment, :reviews => rscore[:assessments], :collabel => "Review", :rowlabel => "Reviewer" , :round=>2 }%>
    <%end%>

    <%if @questions.has_key?("review3".to_sym)%>
        <b> Round 3:</b>
        <%flag_varying_rubrics=true%>
        <%= render :partial => 'grades/review_table', :locals => { :ctrl => 'review', :caction => 'view_review', :symbol => "review3".to_sym, :prefix => prefix, :assignment => participant.assignment, :reviews => rscore[:assessments], :collabel => "Review", :rowlabel => "Reviewer" , :round=>3 }%>
    <%end%>
    
    <%if flag_varying_rubrics==false%>
        <%= render :partial => 'grades/review_table', :locals => { :ctrl => 'review', :caction => 'view_review', :symbol => "review".to_sym, :prefix => prefix, :assignment => participant.assignment, :reviews => rscore[:assessments], :collabel => "Review", :rowlabel => "Reviewer" }%>
    <%end%>
    <BR/>
    <HR/>
    <% count = 0 %>
    <!--Zhewei: If this assignment supports varying rubrics by round, Expertiza will display all-round reviews. -->
    <!--And if one reviewer did not do first-round review and did second round directly, Expertiza will display only second round.-->
    <!--If another reviewer only finished first-round review and did not do second round, Expertiza will display only first round.-->
    <!--If this assignment does not support varying rubrics by round, Expertiza will display last round review.--> 
    <% rounds = Array.new %>
    <% rscore[:assessments].uniq{|response| response.round }.each do |response| %>
        <% rounds << response.round %>
    <% end %>

    <% rounds.each do |round| %>
        <h3>Round <%= round %></h3>
        <% if controller.action_name != "view_my_scores"%> %>
            <a href="#" name= <%= participant.id.to_s + '_' + round.to_s + "Link" %> onClick="toggleElement('<%= participant.id.to_s + '_' + round.to_s %>','round <%= round.to_s%> reviews');return false;">show round <%= round.to_s%> reviews</a>
        <% end %>
        <table class="table table-striped" id=<%= participant.id.to_s + '_' + round.to_s %> <%= style="display: none;" if controller.action_name != "view_my_scores"%>>
            <% rscore[:assessments].select{|response| response.round == round}.reverse.uniq{|response| response.map_id}.sort_by{|response| response.map_id}.each_with_index do |review, index| %>
                <tr><td>
                <% review_feedback = nil %>
                <% count = count + 1 %>
                <% prefix = nil if controller.action_name == "view_my_scores" %>

                <!--<%= review.display_as_html(nil, count) %><BR/>-->
                <!--change code in order to compat to multi-round review-->
                <% if @assignment.varying_rubrics_by_round? and !review.round.nil? %>
                    <% review_symbol = 'review' + review.round.to_s %>
                <% else %><commit_msg>Updated review header Moved feedback section inside the review details section (expanded) view<commit_after><% if rscore and rscore[:assessments].length > 0 %>
    <BR/>
    <%flag_varying_rubrics=false%>

    <%if @questions.has_key?("review1".to_sym)%>
        <b> Round 1:</b>
        <%flag_varying_rubrics=true%>
        <%= render :partial => 'grades/review_table', :locals => { :ctrl => 'review', :caction => 'view_review', :symbol => "review1".to_sym, :prefix => prefix, :assignment => participant.assignment, :reviews => rscore[:assessments], :collabel => "Review", :rowlabel => "Reviewer", :round=>1 }%>
    <%end%>

    <%if @questions.has_key?("review2".to_sym)%>
        <b> Round 2:</b>
        <%flag_varying_rubrics=true%>
        <%= render :partial => 'grades/review_table', :locals => { :ctrl => 'review', :caction => 'view_review', :symbol => "review2".to_sym, :prefix => prefix, :assignment => participant.assignment, :reviews => rscore[:assessments], :collabel => "Review", :rowlabel => "Reviewer" , :round=>2 }%>
    <%end%>

    <%if @questions.has_key?("review3".to_sym)%>
        <b> Round 3:</b>
        <%flag_varying_rubrics=true%>
        <%= render :partial => 'grades/review_table', :locals => { :ctrl => 'review', :caction => 'view_review', :symbol => "review3".to_sym, :prefix => prefix, :assignment => participant.assignment, :reviews => rscore[:assessments], :collabel => "Review", :rowlabel => "Reviewer" , :round=>3 }%>
    <%end%>
    
    <%if flag_varying_rubrics==false%>
        <%= render :partial => 'grades/review_table', :locals => { :ctrl => 'review', :caction => 'view_review', :symbol => "review".to_sym, :prefix => prefix, :assignment => participant.assignment, :reviews => rscore[:assessments], :collabel => "Review", :rowlabel => "Reviewer" }%>
    <%end%>
    <BR/>
    <HR/>
    <% count = 0 %>
    <!--Zhewei: If this assignment supports varying rubrics by round, Expertiza will display all-round reviews. -->
    <!--And if one reviewer did not do first-round review and did second round directly, Expertiza will display only second round.-->
    <!--If another reviewer only finished first-round review and did not do second round, Expertiza will display only first round.-->
    <!--If this assignment does not support varying rubrics by round, Expertiza will display last round review.--> 
    <% rounds = Array.new %>
    <% rscore[:assessments].uniq{|response| response.round }.each do |response| %>
        <% rounds << response.round %>
    <% end %>

    <% rounds.each do |round| %>
        <h3>Round <%= round %></h3>
        <a href="#" name= <%= participant.id.to_s + '_' + round.to_s + "Link" %> onClick="toggleElement('<%= participant.id.to_s + '_' + round.to_s %>','round <%= round.to_s%> reviews');return false;">show round <%= round.to_s%> reviews</a>
        <table class="table table-striped" style="display: none;" id=<%= participant.id.to_s + '_' + round.to_s %>>
            <% rscore[:assessments].select{|response| response.round == round}.reverse.uniq{|response| response.map_id}.sort_by{|response| response.map_id}.each_with_index do |review, index| %>
                <tr><td>
                <% review_feedback = nil %>
                <% count = count + 1 %>
                <% prefix = nil if controller.action_name == "view_my_scores" %>

                <!--<%= review.display_as_html(nil, count) %><BR/>-->
                <!--change code in order to compat to multi-round review-->
                <% if @assignment.varying_rubrics_by_round? and !review.round.nil? %>
                    <% review_symbol = 'review' + review.round.to_s %>
                <% else %>
{'fraction_non_alphanumeric': 0.18555721460567395, 'fraction_numerical': 0.004615175783901181, 'mean_word_length': 3.276262333139872, 'pattern_counts': {'":': 0, '<': 130, '<?xml version=': 0, '>': 215, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6868009', 'n_tokens_mistral': 2464, 'n_tokens_neox': 2251, 'n_words': 553}