<commit_before>###
JQuery Wrapper manually added
###
exmatrikulatorInteractivity = ($) ->
  console.debug 'Assigning exmatrikulator activity...'
  overwrite = false
  ###
  Toggle: Navigation
  ###
  $ '#nav .semester-links > li > a'
    .on "click", (e) ->
      e.preventDefault()

      item = $ this
        .parent 'li'

      isActive = item
        .hasClass 'active'

      if isActive then  item.removeClass 'active'
      else              item.addClass 'active'
  ###
  Show/hide modals
  ###
  window.exModal = ->
    for name in arguments
      # If name starts with :, hide the modal
      if name.indexOf(':') == 0
        modal = name.substring 1

        PF modal
          .hide()
      else
        PF name
          .show()

        if name == "gradeInsert"
          gradingModal true

    return false
  ###
  Dropdown toggle
  ###
  $ '.dropdown-toggle'
    .on 'click', (e) ->
      e.preventDefault()

      show = $ this
               .next '.dropdown-menu'
               .is ':visible'

      $ '.dropdown-menu'
        .hide()

      if !show
        $ this
          .next '.dropdown-menu'
          .show()

  $ '.dropdown-menu a'
    .on 'click', () ->
      $ '.dropdown-menu'
        .hide()
  ###
  Logic for grading modals
  ###
  gradingModal = (buttons) ->
    value = $ '#gradeExamination select'
      .val()

    if value == "-1"
      $ '#pabo-grade-selection'
      .show()
      $ '#other-grade-selection'
      .hide()
    else
      $ '#pabo-grade-selection'
      .hide()
      $ '#other-grade-selection'
      .show()

    if !overwrite
      console.log "Reset form inputs"
      $ '#gradeStudent input'
        .val ''
        .focus()

      gradingModalButtons false
    else
      overwrite = false

    if buttons
      gradingModalButtons false<commit_msg>Reset public and private comments after storing the grade<commit_after>###
JQuery Wrapper manually added
###
exmatrikulatorInteractivity = ($) ->
  console.debug 'Assigning exmatrikulator activity...'
  overwrite = false
  ###
  Toggle: Navigation
  ###
  $ '#nav .semester-links > li > a'
    .on "click", (e) ->
      e.preventDefault()

      item = $ this
        .parent 'li'

      isActive = item
        .hasClass 'active'

      if isActive then  item.removeClass 'active'
      else              item.addClass 'active'
  ###
  Show/hide modals
  ###
  window.exModal = ->
    for name in arguments
      # If name starts with :, hide the modal
      if name.indexOf(':') == 0
        modal = name.substring 1

        PF modal
          .hide()
      else
        PF name
          .show()

        if name == "gradeInsert"
          gradingModal true

    return false
  ###
  Dropdown toggle
  ###
  $ '.dropdown-toggle'
    .on 'click', (e) ->
      e.preventDefault()

      show = $ this
               .next '.dropdown-menu'
               .is ':visible'

      $ '.dropdown-menu'
        .hide()

      if !show
        $ this
          .next '.dropdown-menu'
          .show()

  $ '.dropdown-menu a'
    .on 'click', () ->
      $ '.dropdown-menu'
        .hide()
  ###
  Logic for grading modals
  ###
  gradingModal = (buttons) ->
    value = $ '#gradeExamination select'
      .val()

    if value == "-1"
      $ '#pabo-grade-selection'
      .show()
      $ '#other-grade-selection'
      .hide()
    else
      $ '#pabo-grade-selection'
      .hide()
      $ '#other-grade-selection'
      .show()

    if !overwrite
      console.log "Reset form inputs"
      $ '#gradeStudent input'
        .val ''
        .focus()
      $ '#gradeInsertForm\\:publicComment'
        .val ''
      $ '#gradeInsertForm\\:privateComment'
        .val ''

      gradingModalButtons false
    else
      overwrite = false

    if buttons
      gradingModalButtons false
{'fraction_non_alphanumeric': 0.13414312120411936, 'fraction_numerical': 0.0015843675732770002, 'mean_word_length': 1.647099930118798, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '1678092', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1130, 'n_words': 291}