<commit_before>.small-12.columns
  %h6 Supporting Files:
    .s3_uploader
      = s3_uploader_form key: upload_url('assignment_files', @assignment), acl: "private", max_file_size: 40.megabytes do
        = file_field_tag :file, :multiple => true
      - if @assignment.assignment_files.present?
        %h6#uploaded_files Attachments Uploaded:
      .upload.s3_progress
        Progress:
        .progress
          .bar
  = simple_form_for(@assignment) do |f|
    .panel
      %h4 The Basics
      %hr

      .small-12.large-4.columns.right.panel.callout
        .small-12
        %label.checkbox{ :for => "visible" }
          = f.label :visible
          = f.check_box :visible
        %h6.small Can #{term_for :students} see this #{term_for :assignment} in their dashboard?

        .small-12
          %label.checkbox{ :for => "include_in_predictor" }
            = f.label :include_in_predictor
            = f.check_box :include_in_predictor
          %h6.small Can #{term_for :students} see this #{term_for :assignment} in the grade predictor?

        .small-12
          %label.checkbox{ :for => "include_in_timeline" }
            = f.label :include_in_timeline
            = f.check_box :include_in_timeline
          %h6.small Can #{term_for :students} see this #{term_for :assignment} in the course timeline? Note that #{term_for :assignments} without open or due dates will be excluded automatically.

        .small-12
          %label.checkbox{ :for => "required" }
            = f.label :required
            = f.check_box :required
          %h6.small Are ALL #{term_for :students} expected to complete this #{term_for :assignment} to pass the course?

      .small-12.large-4.columns
        = f.label :assignment_type, "#{term_for :assignment} Type"
        = select_tag :assignment_type_id, options_from_collection_for_select(current_course.assignment_types, "id", "name", @assignment.try(:assignment_type_id))

      .small-12.large-4.columns
        = f.label :name
        = f.text_field :name

      .small-12.large-4.columns
        = f.label :point_total, "Total Score Possible"
        = f.text_field :point_total, data: {autonumeric: true, "m-dec" => "0"}
        - if @assignment.assignment_type.present? && @assignment.assignment_type.point_setting == "For All Assignments"
          %h6.small= "This assignment's category is currently set to have a maximum number of #{points @assignment.assignment_type.universal_point_value} points. Would you like to override this?"

      .small-12.large-4.columns
        = f.label :points_predictor_display
        = f.select :points_predictor_display, [["Fixed"], ["Slider"], ["Select List"]]

      .small-12.large-4.columns
        = f.input :open_at, as: :string, :include_blank => true, :input_html => { :class => 'datetimepicker', :value => @assignment.try(:open_at) }

      .small-12.large-4.columns
        = f.input :due_at, as: :string, :include_blank => true, :input_html => { :class => 'datetimepicker', :value => @assignment.try(:due_at) }

      .clearfix

      .small-12.large-4.columns
        
        = f.simple_fields_for :assignment_files, @assignment.assignment_files.new do |aff|
          = aff.input :filepath, :input_html => { :class => 's3_files' }, :as => :hidden        

      .clearfix

      .small-12.large-12.columns
        = f.bootsy_area :description
        %h6.small This will be shown to students on their dashboard, and when they submit their assignment.


      .clearfix

    - if @assignment.assignment_type.present? && @assignment.assignment_type.points_predictor_display == "Set per Assignment" ||  ! @assignment.assignment_type.present?
      .panel
        %h4 Predictor
        %hr

        .small-12.large-3.columns
          = f.label :points_predictor_display
          = f.select :points_predictor_display, [[], ["Fixed"], ["Slider"], ["Select List"]]

        .clearfix

    .panel
      %h4 Timeline
      %hr

      .small-12.large-3.columns
        = f.label :media
        = f.text_field :media

      .small-12.large-3.columns
        = f.label :thumbnail
        = f.text_field :thumbnail

      .small-12.large-3.columns
        = f.label :media_credit
        = f.text_field :media_credit

      .small-12.large-3.columns
        = f.label :media_caption
        = f.text_field :media_caption

      .clearfix

    .panel
      %h4 Grading
      %hr

      .small-12.large-4.columns
        = f.label :grade_scope
        = f.select :grade_scope, [["Individual"], ["Group"], ["Team"]]

      - if @assignment.assignment_type.present? && @assignment.assignment_type.mass_grade_type == "Set per Assignment"
        .small-12.large-4.columns
          = f.label :mass_grade_type, "Quick Grade Format"
          = f.select :mass_grade_type, [[], ["Radio Buttons"], ["Select List"], ["Checkbox"], ["Text"]]
          %h6.small Would you like the levels to be represented via checkbox, radio buttons or select forms?

      - if current_course.accepts_submissions?
        .small-12.large-4.columns
          %label.checkbox{ :for => "accepts_submissions" }
            = f.label :accepts_submissions #{term_for :assignment} Submissions
            = f.check_box :accepts_submissions
          %h6.small Will you be using GradeCraft to accept submissions for this #{term_for :assignment}?

        .clearfix

        .small-12.large-4.columns
          = f.input :accepts_submissions_until, as: :string, :include_blank => true, :input_html => { :class => 'datetimepicker', :value => @assignment.try(:accepts_submissions_until) }
          %h6.small When would you like to accept submissions until?

        .small-12.large-4.columns
          %label.checkbox{ :for => "student_logged" }
            = f.label :student_logged
            = f.check_box :student_logged
          %h6.small Do students self-report their grade for this #{term_for :assignment}?

        .small-12.large-4.columns
          %label.checkbox{ :for => "release_necessary" }
            = f.label :release_necessary
            = f.check_box :release_necessary
          %h6.small Do you want to release all grades at once? This is particularly useful for situations where extensive feedback is important.

        .clearfix

      - if @assignment.assignment_type.present? && ! @assignment.assignment_type.notify_released?
        .small-12.large-4.columns
          = f.label :notify_released, "Notify by email?"
          = f.input :notify_released
          %h6.small Do you want to notify students by email when a grade is awarded? If grade release is necessary, this email will not be sent out until the grade is officially released.

    .panel
      %h4 Grading Scheme
      %hr
      .assignment-score-levels
        %p.hint Example: You could create three score levels to produce a quick grading scheme for just this #{term_for :assignment} - Complete (5000 points), Finalist (7000 points), and Winner (10,000 points). These levels will then be available to use for quick grading, and when students are setting goals in the grade predictor.
        %script(id="assignment-score-level-template" type="text/x-template")
          %fieldset.assignment-score-level
            = f.simple_fields_for :assignment_score_levels, AssignmentScoreLevel.new, class: 'form-inline', child_index: 'child_index' do |slf|
              = render 'assignment_score_level_fields', f: slf
        - @assignment.assignment_score_levels.each do |assignment_score_level|
          %fieldset.assignment-score-level
            = f.simple_fields_for :assignment_score_levels, assignment_score_level, class: 'form-inline' do |slf|
              = render 'assignment_score_level_fields', f: slf
      %hr
      = link_to 'Add a Level', '#', class: 'add-assignment-score-level'

    .right
      = f.button :submit, "#{@assignment.persisted? ? 'Update' : 'Create'} #{term_for :assignment}", :class => "button radius tiny"
      = link_to 'Cancel', assignments_path, :class => "button radius tiny"
<commit_msg>Updating assignment form<commit_after>.small-12.columns
  %h6 Supporting Files:
  .s3_uploader
    = s3_uploader_form key: upload_url('assignment_files', @assignment), acl: "private", max_file_size: 40.megabytes do
      = file_field_tag :file, :multiple => true
    - if @assignment.assignment_files.present?
      %h6#uploaded_files Attachments Uploaded:
    .upload.s3_progress
      Progress:
      .progress
        .bar
  = simple_form_for(@assignment) do |f|
    .panel
      %h4 The Basics
      %hr

      .small-12.large-4.columns.right.panel.callout
        .small-12
        %label.checkbox{ :for => "visible" }
          = f.label :visible
          = f.check_box :visible
        %h6.small Can #{term_for :students} see this #{term_for :assignment} in their dashboard?

        .small-12
          %label.checkbox{ :for => "include_in_predictor" }
            = f.label :include_in_predictor
            = f.check_box :include_in_predictor
          %h6.small Can #{term_for :students} see this #{term_for :assignment} in the grade predictor?

        .small-12
          %label.checkbox{ :for => "include_in_timeline" }
            = f.label :include_in_timeline
            = f.check_box :include_in_timeline
          %h6.small Can #{term_for :students} see this #{term_for :assignment} in the course timeline? Note that #{term_for :assignments} without open or due dates will be excluded automatically.

        .small-12
          %label.checkbox{ :for => "required" }
            = f.label :required
            = f.check_box :required
          %h6.small Are ALL #{term_for :students} expected to complete this #{term_for :assignment} to pass the course?

      .small-12.large-4.columns
        = f.label :assignment_type, "#{term_for :assignment} Type"
        = select_tag :assignment_type_id, options_from_collection_for_select(current_course.assignment_types, "id", "name", @assignment.try(:assignment_type_id))

      .small-12.large-4.columns
        = f.label :name
        = f.text_field :name

      .small-12.large-4.columns
        = f.label :point_total, "Total Score Possible"
        = f.text_field :point_total, data: {autonumeric: true, "m-dec" => "0"}
        - if @assignment.assignment_type.present? && @assignment.assignment_type.point_setting == "For All Assignments"
          %h6.small= "This assignment's category is currently set to have a maximum number of #{points @assignment.assignment_type.universal_point_value} points. Would you like to override this?"

      .small-12.large-4.columns
        = f.label :points_predictor_display
        = f.select :points_predictor_display, [["Fixed"], ["Slider"], ["Select List"]]

      .small-12.large-4.columns
        = f.input :open_at, as: :string, :include_blank => true, :input_html => { :class => 'datetimepicker', :value => @assignment.try(:open_at) }

      .small-12.large-4.columns
        = f.input :due_at, as: :string, :include_blank => true, :input_html => { :class => 'datetimepicker', :value => @assignment.try(:due_at) }

      .clearfix

      .small-12.large-4.columns
        
        = f.simple_fields_for :assignment_files, @assignment.assignment_files.new do |aff|
          = aff.input :filepath, :input_html => { :class => 's3_files' }, :as => :hidden        

      .clearfix

      .small-12.large-12.columns
        = f.bootsy_area :description
        %h6.small This will be shown to students on their dashboard, and when they submit their assignment.


      .clearfix

    - if @assignment.assignment_type.present? && @assignment.assignment_type.points_predictor_display == "Set per Assignment" ||  ! @assignment.assignment_type.present?
      .panel
        %h4 Predictor
        %hr

        .small-12.large-3.columns
          = f.label :points_predictor_display
          = f.select :points_predictor_display, [[], ["Fixed"], ["Slider"], ["Select List"]]

        .clearfix

    .panel
      %h4 Timeline
      %hr

      .small-12.large-3.columns
        = f.label :media
        = f.text_field :media

      .small-12.large-3.columns
        = f.label :thumbnail
        = f.text_field :thumbnail

      .small-12.large-3.columns
        = f.label :media_credit
        = f.text_field :media_credit

      .small-12.large-3.columns
        = f.label :media_caption
        = f.text_field :media_caption

      .clearfix

    .panel
      %h4 Grading
      %hr

      .small-12.large-4.columns
        = f.label :grade_scope
        = f.select :grade_scope, [["Individual"], ["Group"], ["Team"]]

      - if @assignment.assignment_type.present? && @assignment.assignment_type.mass_grade_type == "Set per Assignment"
        .small-12.large-4.columns
          = f.label :mass_grade_type, "Quick Grade Format"
          = f.select :mass_grade_type, [[], ["Radio Buttons"], ["Select List"], ["Checkbox"], ["Text"]]
          %h6.small Would you like the levels to be represented via checkbox, radio buttons or select forms?

      - if current_course.accepts_submissions?
        .small-12.large-4.columns
          %label.checkbox{ :for => "accepts_submissions" }
            = f.label :accepts_submissions #{term_for :assignment} Submissions
            = f.check_box :accepts_submissions
          %h6.small Will you be using GradeCraft to accept submissions for this #{term_for :assignment}?

        .clearfix

        .small-12.large-4.columns
          = f.input :accepts_submissions_until, as: :string, :include_blank => true, :input_html => { :class => 'datetimepicker', :value => @assignment.try(:accepts_submissions_until) }
          %h6.small When would you like to accept submissions until?

        .small-12.large-4.columns
          %label.checkbox{ :for => "student_logged" }
            = f.label :student_logged
            = f.check_box :student_logged
          %h6.small Do students self-report their grade for this #{term_for :assignment}?

        .small-12.large-4.columns
          %label.checkbox{ :for => "release_necessary" }
            = f.label :release_necessary
            = f.check_box :release_necessary
          %h6.small Do you want to release all grades at once? This is particularly useful for situations where extensive feedback is important.

        .clearfix

      - if @assignment.assignment_type.present? && ! @assignment.assignment_type.notify_released?
        .small-12.large-4.columns
          = f.label :notify_released, "Notify by email?"
          = f.input :notify_released
          %h6.small Do you want to notify students by email when a grade is awarded? If grade release is necessary, this email will not be sent out until the grade is officially released.

    .panel
      %h4 Grading Scheme
      %hr
      .assignment-score-levels
        %p.hint Example: You could create three score levels to produce a quick grading scheme for just this #{term_for :assignment} - Complete (5000 points), Finalist (7000 points), and Winner (10,000 points). These levels will then be available to use for quick grading, and when students are setting goals in the grade predictor.
        %script(id="assignment-score-level-template" type="text/x-template")
          %fieldset.assignment-score-level
            = f.simple_fields_for :assignment_score_levels, AssignmentScoreLevel.new, class: 'form-inline', child_index: 'child_index' do |slf|
              = render 'assignment_score_level_fields', f: slf
        - @assignment.assignment_score_levels.each do |assignment_score_level|
          %fieldset.assignment-score-level
            = f.simple_fields_for :assignment_score_levels, assignment_score_level, class: 'form-inline' do |slf|
              = render 'assignment_score_level_fields', f: slf
      %hr
      = link_to 'Add a Level', '#', class: 'add-assignment-score-level'

    .right
      = f.button :submit, "#{@assignment.persisted? ? 'Update' : 'Create'} #{term_for :assignment}", :class => "button radius tiny"
      = link_to 'Cancel', assignments_path, :class => "button radius tiny"

{'fraction_non_alphanumeric': 0.11477564303147882, 'fraction_numerical': 0.014143563426997935, 'mean_word_length': 2.664297179545976, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 55, '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': '3929496', 'n_tokens_mistral': 5034, 'n_tokens_neox': 4817, 'n_words': 1208}