<commit_before>%div
  %script{:src=>"/assets/team_users_popup.js"}

  %h3
    Members of #{@team.name}
  %table{:width => "100%"}
    - if @team_users.empty?
      %tr No team members
    - else
      - @team_users.each do |t|
        %tr
          %td
            \- #{User.find(t.user_id).fullname}
  - (1..@assignment.num_review_rounds).each do |round|
    - next if instance_variable_get('@response_round_' + round.to_s).nil?
    - if instance_variable_get('@scores_round_' + round.to_s).nil?
      %tr
        %td{:align => "center"} No review done yet.
      %br/
      %tr
        %th{:align => "left"} Reviewer score
      %tr
        %td{:align => "center"} --
      %br/
    - else
      %h3{:style=>"display:inline-block"}= "Reviewed by #{User.find(@reviewer_id).fullname} (Round #{round})"
      - response_id = instance_variable_get('@response_id_round_' + round.to_s).to_s
      - response = Response.find(response_id)
      - if response.visibility=='public'
        %button{ :id=>"btn"+round.to_s, :onclick=>"publish_example_review(this)", :data => { :response_id => response_id }, :style=>"float:right" } Mark as Example
      - elsif response.visibility=='published'
        %button{ :id=>"btnun"+round.to_s, :onclick=>"suppress_example_review(this)", :data => { :response_id => response_id }, :style=>"float:right" } Unmark as Example

      %table{:class => "general", :border => "1px solid #ccc"}
        %tr
          %th{:align => "left", :width => "50%"} Question
          %th{:width => "5%"} Score
          %th{:width => "45%"} Comments
        - instance_variable_get('@scores_round_' + round.to_s).each do |answer|
          %tr
            %td{:align => "left"}
              = answer.question.txt
            - if answer.question.is_a?(ScoredQuestion)
              %td{:align => "center"}
                = answer.answer
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}
            - elsif answer.question.is_a?(Checkbox)
              %td{:align => "center"}
                =answer.answer==0 ? image_tag("delete_icon.png"): image_tag("Check-icon.png")
            -else
              %td{:align => "center"}
                =answer.answer
            %td{:align => "left"}
              = answer.comments
        %tr
          %th Reviewer Score (Σ weighted score/Σ weighted available score)
          %td{:align => "center"}
            = instance_variable_get('@sum_round_' + round.to_s)
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}
          %td{:align => "left"}
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}
      %br/
      %table{:class => "general",:width => "100%"}
        %tr
          %th Additional Comment
        %tr
          - additional_comment = Response.find(instance_variable_get('@response_id_round_' + round.to_s)).additional_comment
          %td= additional_comment.nil? ? 'No Comments' : additional_comment.html_safe
      %hr/
  %br/

  %div{:id=>"dialogConfirmMark",:class=>"col-md-12"}
    %div{:class=>"col-md-12",:id=>"similar_assignments_popup",:data=>{"assignment-id":@assignment.id}}
      %h5{:class=>"col-md-11"}
        %strong Select the assignments for which you want to mark these reviews as samples:
      %div{:class=>"col-md-12 popup-list-container"}
        - @similar_assignments.each do |assignment|
          %p
            = check_box_tag "published_assignments", assignment.id
            = label_tag "#{assignment.name}"
          %br/

  %div{:id=>"dialogConfirmUnmark",:class=>"col-md-12"}
    %div{:class=>"col-md-12",:id=>"similar_assignments_popup"}
      %p
        This will remove this review as example for all assignments. Continue?

<commit_msg>Add course name to Assignment Popup<commit_after>%div
  %script{:src=>"/assets/team_users_popup.js"}

  %h3
    Members of #{@team.name}
  %table{:width => "100%"}
    - if @team_users.empty?
      %tr No team members
    - else
      - @team_users.each do |t|
        %tr
          %td
            \- #{User.find(t.user_id).fullname}
  - (1..@assignment.num_review_rounds).each do |round|
    - next if instance_variable_get('@response_round_' + round.to_s).nil?
    - if instance_variable_get('@scores_round_' + round.to_s).nil?
      %tr
        %td{:align => "center"} No review done yet.
      %br/
      %tr
        %th{:align => "left"} Reviewer score
      %tr
        %td{:align => "center"} --
      %br/
    - else
      %h3{:style=>"display:inline-block"}= "Reviewed by #{User.find(@reviewer_id).fullname} (Round #{round})"
      - response_id = instance_variable_get('@response_id_round_' + round.to_s).to_s
      - response = Response.find(response_id)
      - if response.visibility=='public'
        %button{ :id=>"btn"+round.to_s, :onclick=>"publish_example_review(this)", :data => { :response_id => response_id }, :style=>"float:right" } Mark as Example
      - elsif response.visibility=='published'
        %button{ :id=>"btnun"+round.to_s, :onclick=>"suppress_example_review(this)", :data => { :response_id => response_id }, :style=>"float:right" } Unmark as Example

      %table{:class => "general", :border => "1px solid #ccc"}
        %tr
          %th{:align => "left", :width => "50%"} Question
          %th{:width => "5%"} Score
          %th{:width => "45%"} Comments
        - instance_variable_get('@scores_round_' + round.to_s).each do |answer|
          %tr
            %td{:align => "left"}
              = answer.question.txt
            - if answer.question.is_a?(ScoredQuestion)
              %td{:align => "center"}
                = answer.answer
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}
            - elsif answer.question.is_a?(Checkbox)
              %td{:align => "center"}
                =answer.answer==0 ? image_tag("delete_icon.png"): image_tag("Check-icon.png")
            -else
              %td{:align => "center"}
                =answer.answer
            %td{:align => "left"}
              = answer.comments
        %tr
          %th Reviewer Score (Σ weighted score/Σ weighted available score)
          %td{:align => "center"}
            = instance_variable_get('@sum_round_' + round.to_s)
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}
          %td{:align => "left"}
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}
      %br/
      %table{:class => "general",:width => "100%"}
        %tr
          %th Additional Comment
        %tr
          - additional_comment = Response.find(instance_variable_get('@response_id_round_' + round.to_s)).additional_comment
          %td= additional_comment.nil? ? 'No Comments' : additional_comment.html_safe
      %hr/
  %br/

  %div{:id=>"dialogConfirmMark",:class=>"col-md-12"}
    %h5{:class=>"col-md-11"}
    %strong Select the assignments for which you want to mark these reviews as samples:
    %br/
    %table{:class => "general",:width => "100%"}
      %tr
        %td
        %th Assignments
      - @similar_assignments.each do |assignment|
        %tr
          - @course_name = Assignment.find(assignment.id).course.name
          %td= check_box_tag "published_assignments", assignment.id
          %td= label_tag "#{@course_name} : #{assignment.name}"


  %div{:id=>"dialogConfirmUnmark",:class=>"col-md-12"}
    %div{:class=>"col-md-12",:id=>"similar_assignments_popup"}
      %p
        This will remove this review as example for all assignments. Continue?


{'fraction_non_alphanumeric': 0.16247170062591557, 'fraction_numerical': 0.0075908909308829405, 'mean_word_length': 2.5060690943043884, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 85, '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': '1678473', 'n_tokens_mistral': 2513, 'n_tokens_neox': 2441, 'n_words': 440}