<commit_before>%div.modal#modal-create-instructor{ :tabindex => "-1", :role => "dialog", "aria-labelledby" => "myModalLabel", "aria-hidden" => "true"}
  %div.modal-dialog
    %div.modal-content
      %div.modal-header
        %button.close{ :type => "button", "data-dismiss" => "modal", "aria-hidden" => "true"}
          &times;
        %h3.modal-title.inline#title= "Create Instructor"
      %div.modal-body#modalbody
        = form_tag admin_instructor_create_path(), remote:true, method: :post do 
          %div#email-div
            This will assign a random password for the instructor and will automatically send an email to the instructor with their credentials.
            %p
            = label_tag nil, 'Email:', class: 'control-label'
            = text_field_tag :email, nil, class: 'form-control'
            %span.help-block.inline#email-help
          %div#name-div
            = label_tag nil, 'Name:', class: 'control-label'
            = text_field_tag :name, nil, class: 'form-control'
            %span.help-block.inline#name-help
          %div#organization-div
            = label_tag nil, 'Organization:', class: 'control-label'
            = text_field_tag :organization, nil, class: 'form-control'
            %span.help-block.inline#organization-help
          %p
          = submit_tag 'Create', :class => 'btn btn-default'

      %div.modal-footer
        %button.btn.btn-default{"data-dismiss" => "modal"}
          Close

%div.modal#modal-student-group-create{ :tabindex => "-1", :role => "dialog", "aria-labelledby" => "myModalLabel", "aria-hidden" => "true"}
  %div.modal-dialog
    %div.modal-content
      %div.modal-header
        %button.close{ :type => "button", "data-dismiss" => "modal", "aria-hidden" => "true"}
          &times;
        %h3.modal-title.inline#title
          Create Student Group
      %div.modal-body#modalbody
        = form_tag admin_student_group_create_path(@scenario), remote: true, method: :post do 
          %div#name-div
            = label_tag nil, "Name:"
            = text_field_tag "name", nil, class: 'form-control'
            %span.help-block.inline#name-help
          %br
          = submit_tag "Submit", :class => 'btn btn-default'
      %div.modal-footer
        %button.btn.btn-default{"data-dismiss" => "modal"}
          Close

%div.modal#modal-student-group-user-add{ :tabindex => "-1", :role => "dialog", "aria-labelledby" => "myModalLabel", "aria-hidden" => "true"}
  %div.modal-dialog
    %div.modal-content
      %div.modal-header
        %button.close{ :type => "button", "data-dismiss" => "modal", "aria-hidden" => "true"}
          &times;
        %h3.modal-title.inline#title
          Add User to Student Group
      %div.modal-body#modalbody
        = form_tag admin_student_group_user_add_path(@scenario), remote: true, method: :post do
          = label_tag nil, "User:"
          %span#user-name
          = hidden_field_tag 'user_id'
          %div#name-div
            = label_tag nil, "Student Group Name:"
            = text_field_tag "student_group_name", nil, class: 'form-control'
            %span.help-block.inline#name-help
          %br
          = submit_tag "Submit", :class => 'btn btn-default'
      %div.modal-footer
        %button.btn.btn-default{"data-dismiss" => "modal"}
          Close

%div.panel.panel-default
  %div.panel-heading.nav.nav-pills
    %li
      %h3
        Admin Home

  %div.panel-body
    %label Account Information: 
    %div
      %dl
        Name: 
        <EMAIL>
        %br
        Email:
        <EMAIL>
        %br
        Password: ********
        %p
        = link_to 'edit', edit_user_registration_path, class: 'btn btn-primary'
        %p
        Last Sign In:
        =@user.last_sign_in_at
        From:
        =@user.last_sign_in_ip

    

    %label AWS Settings:
    %dl
      - if not @aws_working
        %div.failure
          FAILED TO VALIDATE CREDENTIALS
      %b Access Key ID:
      = ENV["AWS_ACCESS_KEY_ID"]
      %br
      %b Access Key:
      = ENV["AWS_SECRET_ACCESS_KEY"]
      %br
      %b Region:
      = ENV["AWS_REGION"]
      %br
      %b EC2 Key:
      = Settings.ec2_key
      %br
      %b Bucket Name:
      = Settings.bucket_name
      %br
      %b VPC Limit:
      = Settings.vpc_limit
      %br
      %b AMI NAT:
      = Settings.ami_nat
      %br
      %b AMI Ubuntu:
      = Settings.ami_ubuntu
    %p

    %label Registration Code:
    %dl
      = @user.registration_code
    %p

    %label User Information:
    = link_to 'Create Instructor', "#modal-create-instructor", :data => {:toggle=>"modal"}, class: 'btn btn-primary', onclick: "$('#modal-create-instructor').find('#email').val(''); $('#modal-create-instructor').find('#name').val(''); $('#modal-create-instructor').find('#organization').val('');"

    %div
      %dl
        %label Instructors:
        %table.table#instructors-table
          %tr
            %th Name
            %th Email
            %th Organization
            %th
            %th
            %th
          - @instructors.each do |user|
            = render 'instructor', user: user

      %dl
        %label Students:
        %table.table#students-table
          %tr
            %th Name
            %th Email
            %th Organization
            %th
            %th
          - @students.each do |user|
            = render 'student', user: user

      %dl
        %label Student Groups:
        = link_to 'Create Student Group', '#modal-student-group-create', data: {toggle: "modal"}, class: 'btn btn-primary', onclick: "$('#modal-student-group-create').find('#name-div').removeClass('has-error'); $('#modal-student-group-create').find('#name').val(''); $('#modal-student-group-create').find('#name-help').html(''); "
        %dl{ id: "student-groups" }
          - @user.student_groups.each do |student_group|
            = render 'student_group', student_group: student_group
<commit_msg>do not show entire AWS credentials on admin index<commit_after>%div.modal#modal-create-instructor{ :tabindex => "-1", :role => "dialog", "aria-labelledby" => "myModalLabel", "aria-hidden" => "true"}
  %div.modal-dialog
    %div.modal-content
      %div.modal-header
        %button.close{ :type => "button", "data-dismiss" => "modal", "aria-hidden" => "true"}
          &times;
        %h3.modal-title.inline#title= "Create Instructor"
      %div.modal-body#modalbody
        = form_tag admin_instructor_create_path(), remote:true, method: :post do 
          %div#email-div
            This will assign a random password for the instructor and will automatically send an email to the instructor with their credentials.
            %p
            = label_tag nil, 'Email:', class: 'control-label'
            = text_field_tag :email, nil, class: 'form-control'
            %span.help-block.inline#email-help
          %div#name-div
            = label_tag nil, 'Name:', class: 'control-label'
            = text_field_tag :name, nil, class: 'form-control'
            %span.help-block.inline#name-help
          %div#organization-div
            = label_tag nil, 'Organization:', class: 'control-label'
            = text_field_tag :organization, nil, class: 'form-control'
            %span.help-block.inline#organization-help
          %p
          = submit_tag 'Create', :class => 'btn btn-default'

      %div.modal-footer
        %button.btn.btn-default{"data-dismiss" => "modal"}
          Close

%div.modal#modal-student-group-create{ :tabindex => "-1", :role => "dialog", "aria-labelledby" => "myModalLabel", "aria-hidden" => "true"}
  %div.modal-dialog
    %div.modal-content
      %div.modal-header
        %button.close{ :type => "button", "data-dismiss" => "modal", "aria-hidden" => "true"}
          &times;
        %h3.modal-title.inline#title
          Create Student Group
      %div.modal-body#modalbody
        = form_tag admin_student_group_create_path(@scenario), remote: true, method: :post do 
          %div#name-div
            = label_tag nil, "Name:"
            = text_field_tag "name", nil, class: 'form-control'
            %span.help-block.inline#name-help
          %br
          = submit_tag "Submit", :class => 'btn btn-default'
      %div.modal-footer
        %button.btn.btn-default{"data-dismiss" => "modal"}
          Close

%div.modal#modal-student-group-user-add{ :tabindex => "-1", :role => "dialog", "aria-labelledby" => "myModalLabel", "aria-hidden" => "true"}
  %div.modal-dialog
    %div.modal-content
      %div.modal-header
        %button.close{ :type => "button", "data-dismiss" => "modal", "aria-hidden" => "true"}
          &times;
        %h3.modal-title.inline#title
          Add User to Student Group
      %div.modal-body#modalbody
        = form_tag admin_student_group_user_add_path(@scenario), remote: true, method: :post do
          = label_tag nil, "User:"
          %span#user-name
          = hidden_field_tag 'user_id'
          %div#name-div
            = label_tag nil, "Student Group Name:"
            = text_field_tag "student_group_name", nil, class: 'form-control'
            %span.help-block.inline#name-help
          %br
          = submit_tag "Submit", :class => 'btn btn-default'
      %div.modal-footer
        %button.btn.btn-default{"data-dismiss" => "modal"}
          Close

%div.panel.panel-default
  %div.panel-heading.nav.nav-pills
    %li
      %h3
        Admin Home

  %div.panel-body
    %label Account Information: 
    %div
      %dl
        Name: 
        <EMAIL>
        %br
        Email:
        <EMAIL>
        %br
        Password: ********
        %p
        = link_to 'edit', edit_user_registration_path, class: 'btn btn-primary'
        %p
        Last Sign In:
        <EMAIL>in_at
        From:
        <EMAIL>.last_sign_in_ip

    

    %label AWS Settings:
    %dl
      - if not @aws_working
        %div.failure
          FAILED TO VALIDATE CREDENTIALS
      %b Access Key ID:
      = ENV["AWS_ACCESS_KEY_ID"].sub(/^.............../, "...............")
      %br
      %b Access Key:
      = ENV["AWS_SECRET_ACCESS_KEY"].sub(/^.................................../, "...................................")
      %br
      %b Region:
      = ENV["AWS_REGION"]
      %br
      %b EC2 Key:
      = Settings.ec2_key
      %br
      %b Bucket Name:
      = Settings.bucket_name
      %br
      %b VPC Limit:
      = Settings.vpc_limit
      %br
      %b AMI NAT:
      = Settings.ami_nat
      %br
      %b AMI Ubuntu:
      = Settings.ami_ubuntu
    %p

    %label Registration Code:
    %dl
      = @user.registration_code
    %p

    %label User Information:
    = link_to 'Create Instructor', "#modal-create-instructor", :data => {:toggle=>"modal"}, class: 'btn btn-primary', onclick: "$('#modal-create-instructor').find('#email').val(''); $('#modal-create-instructor').find('#name').val(''); $('#modal-create-instructor').find('#organization').val('');"

    %div
      %dl
        %label Instructors:
        %table.table#instructors-table
          %tr
            %th Name
            %th Email
            %th Organization
            %th
            %th
            %th
          - @instructors.each do |user|
            = render 'instructor', user: user

      %dl
        %label Students:
        %table.table#students-table
          %tr
            %th Name
            %th Email
            %th Organization
            %th
            %th
          - @students.each do |user|
            = render 'student', user: user

      %dl
        %label Student Groups:
        = link_to 'Create Student Group', '#modal-student-group-create', data: {toggle: "modal"}, class: 'btn btn-primary', onclick: "$('#modal-student-group-create').find('#name-div').removeClass('has-error'); $('#modal-student-group-create').find('#name').val(''); $('#modal-student-group-create').find('#name-help').html(''); "
        %dl{ id: "student-groups" }
          - @user.student_groups.each do |student_group|
            = render 'student_group', student_group: student_group

{'fraction_non_alphanumeric': 0.1543019277309522, 'fraction_numerical': 0.0015021280146874738, 'mean_word_length': 2.054026503567788, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 67, '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': '7225012', 'n_tokens_mistral': 3737, 'n_tokens_neox': 3666, 'n_words': 788}