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

    <%if @questions.has_key?("review1".to_sym)%>
        <b> Round1:</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> Round2:</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> Round3:</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 %>
    <% for review in rscore[:assessments] %>
      <% review_feedback = nil %>

      <% count = count + 1 %>

        <% if controller.action_name != "view_my_scores" %>
            <a name="<%=prefix+"_"+review.map.reviewer.name%>"></a><%= review.display_as_html(prefix) %>
        <% else %>

            <h2>Review <%= count %></h2>
            <!-- Display the latest review first -->
            <!--%= review.display_as_html(nil,review.version_num, file_url) %--><BR/><BR/>
            <%= review.display_as_html(nil,0, nil) %><BR/><BR/>
            <!--Display FileUpload question type-->
            <% current_folder = DisplayOption.new %>
            <% current_folder.name = "" %>
            <% files = @participant.files(@participant.review_file_path(review.response_map.id).to_s + current_folder.name) %>
            <% @questions[:review].each do |question| %>
                <% if question.instance_of? UploadFile %>
                    <%= display_directory_tree(@participant, files, true).html_safe %>
                <% end %>
            <% end %>
            <!-- get all previous versions -->
            <% @sorted_array=Array.new %>
            <% @prev=Response.all %>
            <%for element in @prev     %>
                <%if(element.map_id==review.map.id)%>
                    <%array_not_empty=1 %>
                    <% @sorted_array << element %>
                <% end %>
            <% end %>
            <!--% @sorted=@sorted_array.sort { |m1,m2|(m1.version_num and m2.version_num) ? m2.version_num <=> m1.version_num : (m1.version_num ? -1 : 1)} %-->
            <% @sorted=@sorted_array.sort %>
            <% if(@sorted.size>1) %>
                <% for i in 1..@sorted.size-1 %>
                    <% @str = @sorted[i].id.to_s %>
                    <!-- display previous versions in descending order -->
                    <!--%= @sorted[i].display_as_html(nil,@sorted[i].version_num, file_url) %-->
                    <%= @sorted[i].display_as_html(nil,i, nil) %>
                    <br/>
                    <script>
                        toggleElement('reviews_<%=@str%>','review');
                    </script>
                <% end %>
                <!-- keep only latest version open -->
                <% for i in 1..@sorted.size-1 %>
                    <% @str = @sorted[i].id.to_s %>
                    <script>
                        toggleElement('review_<%=@str%>','review')
                    </script>
                <% end %>
            <% end %>
            <% map = FeedbackResponseMap.find_by_reviewed_object_id(review.id)
                review_feedbacks = map.try :response %>
            <% if review_feedbacks && !review_feedbacks.empty? %>
                <%= link_to "View", :controller => 'response', :action => 'view', :id => review_feedbacks.first.id %> or
                <%= link_to "Edit", :controller => 'response', :action => 'edit', :id => review_feedbacks.first.id, :return => "feedback" %> feedback for Review <%= count %>
            <% else %>
                <%= link_to "Give feedback", :controller => 'response', :action => 'new_feedback', :id => review.id %> for Review <%= count %>
            <% end %>
            <BR/><HR/><BR/>

        <% end %>
    <% end %>
<% else %>
    <i>No reviews have been completed for this user's submissions.</i>
<% end %>
<commit_msg>'grades#view' page show reviewers' upload files.<commit_after><% if rscore and rscore[:assessments].length > 0 %>
    <BR/>
    <%flag_varying_rubrics=false%>

    <%if @questions.has_key?("review1".to_sym)%>
        <b> Round1:</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> Round2:</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> Round3:</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 %>
    <% for review in rscore[:assessments] %>
      <% review_feedback = nil %>

      <% count = count + 1 %>

        <% if controller.action_name != "view_my_scores" %>
            <a name="<%=prefix+"_"+review.map.reviewer.name%>"></a><%= review.display_as_html(prefix) %>
            <!-- Display the latest review first -->
            <!--%= review.display_as_html(nil,review.version_num, file_url) %--><BR/><BR/>
            <%= review.display_as_html(nil,0, nil) %><BR/><BR/>
            <!--Display FileUpload question type-->
            <% current_folder = DisplayOption.new %>
            <% current_folder.name = "" %>
            <% files = @participant.files(@participant.review_file_path(review.response_map.id).to_s + current_folder.name) %>
            <% @questions[:review].each do |question| %>
                <% if question.instance_of? UploadFile %>
                    <%= display_directory_tree(@participant, files, true).html_safe %>
                <% end %>
            <% end %>
        <% else %>

            <h2>Review <%= count %></h2>
            <!-- Display the latest review first -->
            <!--%= review.display_as_html(nil,review.version_num, file_url) %--><BR/><BR/>
            <%= review.display_as_html(nil,0, nil) %><BR/><BR/>
            <!--Display FileUpload question type-->
            <% current_folder = DisplayOption.new %>
            <% current_folder.name = "" %>
            <% files = @participant.files(@participant.review_file_path(review.response_map.id).to_s + current_folder.name) %>
            <% @questions[:review].each do |question| %>
                <% if question.instance_of? UploadFile %>
                    <%= display_directory_tree(@participant, files, true).html_safe %>
                <% end %>
            <% end %>
            <!-- get all previous versions -->
            <% @sorted_array=Array.new %>
            <% @prev=Response.all %>
            <%for element in @prev     %>
                <%if(element.map_id==review.map.id)%>
                    <%array_not_empty=1 %>
                    <% @sorted_array << element %>
                <% end %>
            <% end %>
            <!--% @sorted=@sorted_array.sort { |m1,m2|(m1.version_num and m2.version_num) ? m2.version_num <=> m1.version_num : (m1.version_num ? -1 : 1)} %-->
            <% @sorted=@sorted_array.sort %>
            <% if(@sorted.size>1) %>
                <% for i in 1..@sorted.size-1 %>
                    <% @str = @sorted[i].id.to_s %>
                    <!-- display previous versions in descending order -->
                    <!--%= @sorted[i].display_as_html(nil,@sorted[i].version_num, file_url) %-->
                    <%= @sorted[i].display_as_html(nil,i, nil) %>
                    <br/>
                    <script>
                        toggleElement('reviews_<%=@str%>','review');
                    </script>
                <% end %>
                <!-- keep only latest version open -->
                <% for i in 1..@sorted.size-1 %>
                    <% @str = @sorted[i].id.to_s %>
                    <script>
                        toggleElement('review_<%=@str%>','review')
                    </script>
                <% end %>
            <% end %>
            <% map = FeedbackResponseMap.find_by_reviewed_object_id(review.id)
                review_feedbacks = map.try :response %>
            <% if review_feedbacks && !review_feedbacks.empty? %>
                <%= link_to "View", :controller => 'response', :action => 'view', :id => review_feedbacks.first.id %> or
                <%= link_to "Edit", :controller => 'response', :action => 'edit', :id => review_feedbacks.first.id, :return => "feedback" %> feedback for Review <%= count %>
            <% else %>
                <%= link_to "Give feedback", :controller => 'response', :action => 'new_feedback', :id => review.id %> for Review <%= count %>
            <% end %>
            <BR/><HR/><BR/>

        <% end %>
    <% end %>
<% else %>
    <i>No reviews have been completed for this user's submissions.</i>
<% end %>

{'fraction_non_alphanumeric': 0.18840711175616837, 'fraction_numerical': 0.006077648766328011, 'mean_word_length': 2.1554092730394965, 'pattern_counts': {'":': 0, '<': 231, '<?xml version=': 0, '>': 337, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '2995235', 'n_tokens_mistral': 3684, 'n_tokens_neox': 3289, 'n_words': 617}