<commit_before><div id="validation_for_deliverable_<%= deliverable.id %>">
	<%= form_for(deliverable.deliverable_validation ||
               DeliverableValidation.new(:deliverable => deliverable),
               :url => update_deliverable_deliverable_validation_path(deliverable),
               :html => {:multipart => true, :method => :put,
                         :id => "deliverable_validation_#{deliverable.id}"}) do |f| %>
		<div style="display: none;">
			<%= f.hidden_field :deliverable_id, :id => "deliverable_validation_id_#{deliverable.id}" %>
		</div>
		<div class="deliverable_name">
			Validator: <%= f.select :type, [['Built-in', 'ProcValidation'], ['Remote Package', 'RemoteScriptValidation'], ['Uploaded Package', 'UploadedScriptValidation']], {}, :id => "deliverable_validation_type_#{deliverable.id}", :class => 'form_field' %>			
		</div>
		<div class="deliverable_description">
			<div id="deliverable_validation_rpkg_<%= deliverable.id %>" style="display: none;">
				URL: <%= f.text_field :pkg_uri, :class => 'form_field', :id => "deliverable_validation_uri_#{deliverable.id}" %>
			</div>
			<div id="deliverable_validation_upkg_<%= deliverable.id %>" style="display: none;">
				Script: <%= f.file_field :pkg, :class => 'form_field', :id => "deliverable_validation_file_#{deliverable.id}" %>
				<% if deliverable.deliverable_validation.instance_of? UploadedScriptValidation %>
					<br />
					Old script: <%= link_to "#{deliverable.deliverable_validation.file_name} (#{number_to_human_size deliverable.deliverable_validation.file_contents.length})", :controller => :deliverable_validations, :action => :contents, :id => deliverable.id %>
				<% end %>
			</div>
			<div id="deliverable_validation_rupkg_<%= deliverable.id %>" style="display: none">
				<div>
					Timelimit: <%= f.text_field :time_limit, :class => 'form_field', :id => "deliverable_validation_timeout_#{deliverable.id}", :size => 3 %> s 
				</div>									
			</div>
			<div id="deliverable_validation_bin_<%= deliverable.id %>" style="display: none;">
					<%= f.select :message_name, [['PDF checker', 'validate_pdf']], {}, :class => 'form_field', :id => "deliverable_validation_message_#{deliverable.id}" %>
			</div>
		</div>

<%= javascript_tag <<JS_END
	submission_validation_update_visiblity('#{deliverable.id}');
JS_END
%>

	<%= observe_field "deliverable_validation_type_#{deliverable.id}", :frequency => 0.2, :function => "submission_validation_update_visiblity('#{deliverable.id}');" %>

		<div>
			<%= f.submit 'Save', :id => "deliverable_validation_submit_#{deliverable.id}" %>
		</div>
		<div class="float_clearer"></div>
	<% end %><commit_msg>fixes crash in deliverable submission.<commit_after><div id="validation_for_deliverable_<%= deliverable.id %>">
	<%= form_for(deliverable.deliverable_validation ||
               DeliverableValidation.new(:deliverable => deliverable),
               :url => update_deliverable_deliverable_validation_path(deliverable),
               :html => {:multipart => true, :method => :put,
                         :id => "deliverable_validation_#{deliverable.id}"}) do |f| %>
		<div style="display: none;">
			<%= f.hidden_field :deliverable_id, :id => "deliverable_validation_id_#{deliverable.id}" %>
		</div>
		<div class="deliverable_name">
			Validator: <%= f.select :type, [['Built-in', 'ProcValidation'], ['Remote Package', 'RemoteScriptValidation'], ['Uploaded Package', 'UploadedScriptValidation']], {}, :id => "deliverable_validation_type_#{deliverable.id}", :class => 'form_field' %>			
		</div>
		<div class="deliverable_description">
			<div id="deliverable_validation_rpkg_<%= deliverable.id %>" style="display: none;">
				URL: <%= f.text_field :pkg_uri, :class => 'form_field', :id => "deliverable_validation_uri_#{deliverable.id}" %>
			</div>
			<div id="deliverable_validation_upkg_<%= deliverable.id %>" style="display: none;">
				Script: <%= f.file_field :pkg, :class => 'form_field', :id => "deliverable_validation_file_#{deliverable.id}" %>
				<% if deliverable.deliverable_validation.instance_of? UploadedScriptValidation %>
					<br />
					Old script: <%= link_to "#{deliverable.deliverable_validation.pkg_file_name} (#{number_to_human_size deliverable.deliverable_validation.pkg_file_size})", :controller => :deliverable_validations, :action => :contents, :id => deliverable.id %>
				<% end %>
			</div>
			<div id="deliverable_validation_rupkg_<%= deliverable.id %>" style="display: none">
				<div>
					Timelimit: <%= f.text_field :time_limit, :class => 'form_field', :id => "deliverable_validation_timeout_#{deliverable.id}", :size => 3 %> s 
				</div>									
			</div>
			<div id="deliverable_validation_bin_<%= deliverable.id %>" style="display: none;">
					<%= f.select :message_name, [['PDF checker', 'validate_pdf']], {}, :class => 'form_field', :id => "deliverable_validation_message_#{deliverable.id}" %>
			</div>
		</div>

<%= javascript_tag <<JS_END
	submission_validation_update_visiblity('#{deliverable.id}');
JS_END
%>

	<%= observe_field "deliverable_validation_type_#{deliverable.id}", :frequency => 0.2, :function => "submission_validation_update_visiblity('#{deliverable.id}');" %>

		<div>
			<%= f.submit 'Save', :id => "deliverable_validation_submit_#{deliverable.id}" %>
		</div>
		<div class="float_clearer"></div>
	<% end %>
{'fraction_non_alphanumeric': 0.18123827392120076, 'fraction_numerical': 0.001125703564727955, 'mean_word_length': 5.13463751438435, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 133, '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': '1564122', 'n_tokens_mistral': 2016, 'n_tokens_neox': 1786, 'n_words': 286}