<commit_before><div class="content">
	<div class="masthead">
		<div class="row">
			<div class="info">
				<h6><%= @challenge.challenge %></h6>
				<h2>Update Submission</h2>
			</div>
		</div>
	</div>

  <div class="row">
    <br/>
    <label>Submission ID</label>
    <div>
      <%= @submission.id %>
    </div>
    <br/>
    <label>Participant</label>
    <div>
      <%= link_to @submission.participant.name, participant_path(@submission.participant_id), target: :blank %>
    </div>

    <br/>
    <% if @challenge.submissions_downloadable || current_participant.admin? %>
      <% if @submission.submission_files.present? %>
        <fieldset>
          <label>Submission Files</label>
          <% @submission.submission_files.each do |file| %>
              <%= link_to "Download file #{file.id}",
                  s3_expiring_url(file.submission_file_s3_key)
                  %><br/>
          <% end %>
        </fieldset>
      <% end %>
    <% end %>

    <% if @submission.meta && @submission.meta.key?('repo_url') %>
      <label>GitLab Repo</label>
      <%= link_to @submission.meta['repo_url'], @submission.meta['repo_url'], target: :blank %><br/><br/>

      <label>Ref</label>
      <%= @submission.meta['repo_ref'] %><br/><br/>

      <label>GitLab Project ID</label>
      <%= @submission.meta['gitlab_project_id'] %><br/>
    <% end %>

    <br/>
    <label>Media Fields</label>
    <% if @submission.media_content_type.present? %>
      <ul>
        <li>Content Type: <% @submission.media_content_type %></li>
        <li>Thumbnail: <%= @submission.media_thumbnail %></li>
        <li>Large: <%= @submission.media_thumbnail %></li>
      </ul>
    <% else %>
      No Media attached to this submission.
    <% end %>

    <%= form_for [@challenge, @submission],
          html: {
            class: "sgl-col",
            data: { controller: 'submission-baseline'}
          } do |f| %>
      <fieldset>
        <div class="twin-container">
          <div class="twin-field">
            <%= f.label :score %>
            <%= f.text_field :score %>
          </div>
          <div class="twin-field">
            <%= f.label :score_secondary %>
            <%= f.text_field :score_secondary %>
          </div>
        </div>
        <fieldset>
          <%= f.label :grading_message %>
          <%= f.text_field :grading_message %>
        </fieldset>
        <div class="twin-container">
          <div class="twin-field">
            <%= f.label :grading_status %>
            <%= f.select :grading_status, enum_option_pairs(Submission, :grading_status) %>
          </div>
          <div class="twin-field"></div>
        </div>
        <div class="twin-container">
          <div class="twin-field">
        </div>
      </fieldset>
      <% if @submission.graded? %>
        <fieldset class="checkbox">
          <div>
            <%= f.check_box :baseline,
                { data:
                  { target: 'submission-baseline.baseline',
                  action: 'click->submission-baseline#toggleBaseline' }
                }, "true", "false" %>
            <%= f.label :baseline, 'Baseline?' %>
          </div><commit_msg>allow editing of media content types<commit_after><div class="content">
	<div class="masthead">
		<div class="row">
			<div class="info">
				<h6><%= @challenge.challenge %></h6>
				<h2>Update Submission</h2>
			</div>
		</div>
	</div>

  <div class="row">
    <br/>
    <label>Submission ID</label>
    <div>
      <%= @submission.id %>
    </div>
    <br/>
    <label>Participant</label>
    <div>
      <%= link_to @submission.participant.name, participant_path(@submission.participant_id), target: :blank %>
    </div>

    <br/>
    <% if @challenge.submissions_downloadable || current_participant.admin? %>
      <% if @submission.submission_files.present? %>
        <fieldset>
          <label>Submission Files</label>
          <% @submission.submission_files.each do |file| %>
              <%= link_to "Download file #{file.id}",
                  s3_expiring_url(file.submission_file_s3_key)
                  %><br/>
          <% end %>
        </fieldset>
      <% end %>
    <% end %>

    <% if @submission.meta && @submission.meta.key?('repo_url') %>
      <label>GitLab Repo</label>
      <%= link_to @submission.meta['repo_url'], @submission.meta['repo_url'], target: :blank %><br/><br/>

      <label>Ref</label>
      <%= @submission.meta['repo_ref'] %><br/><br/>

      <label>GitLab Project ID</label>
      <%= @submission.meta['gitlab_project_id'] %><br/>
    <% end %>

    <%= form_for [@challenge, @submission],
          html: {
            class: "sgl-col",
            data: { controller: 'submission-baseline'}
          } do |f| %>
      <fieldset>
        <div class="twin-container">
          <div class="twin-field">
            <%= f.label :score %>
            <%= f.text_field :score %>
          </div>
          <div class="twin-field">
            <%= f.label :score_secondary %>
            <%= f.text_field :score_secondary %>
          </div>
        </div>
        <fieldset>
          <%= f.label :grading_message %>
          <%= f.text_field :grading_message %>
        </fieldset>
        <div class='twin-container'>
          <div class="twin-field">
            <%= f.label :media_content_type %>
            <%= f.text_field :media_content_type %>
          </div>
          <div class="twin-field">
          </div>
        </div>
        <fieldset>
          <%= f.label :media_thumbnail %>
          <%= f.text_field :media_thumbnail %>
        </fieldset>
        <fieldset>
          <%= f.label :media_large %>
          <%= f.text_field :media_large %>
        </fieldset>
        <div class="twin-container">
          <div class="twin-field">
            <%= f.label :grading_status %>
            <%= f.select :grading_status, enum_option_pairs(Submission, :grading_status) %>
          </div>
          <div class="twin-field"></div>
        </div>
        <div class="twin-container">
          <div class="twin-field">
        </div>
      </fieldset>
      <% if @submission.graded? %>
        <fieldset class="checkbox">
          <div>
            <%= f.check_box :baseline,
                { data:
                  { target: 'submission-baseline.baseline',
                  action: 'click->submission-baseline#toggleBaseline' }
                }, "true", "false" %>
            <%= f.label :baseline, 'Baseline?' %>
          </div>
{'fraction_non_alphanumeric': 0.17542503863987635, 'fraction_numerical': 0.0018547140649149924, 'mean_word_length': 1.9440400363967243, 'pattern_counts': {'":': 0, '<': 212, '<?xml version=': 0, '>': 214, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '911016', 'n_tokens_mistral': 2271, 'n_tokens_neox': 2048, 'n_words': 350}