<commit_before><div ng-controller="StateInteraction" id="tutorialStateInteraction">
  <md-card style="margin: 20px 0px; padding: 0px;" ng-if="!interactionId">
    <div class="oppia-add-interaction-button-container">
      <button type="button" class="btn btn-default btn-lg oppia-add-interaction-button protractor-test-open-add-interaction-modal" ng-click="openInteractionCustomizerModal()">
        + Add Interaction / End Conversation
      </button>
    </div>
  </md-card>

  <div ng-if="interactionId">
    <md-card class="oppia-editor-card-with-avatar">
      <div class="oppia-editor-card-body" title="<[getCurrentInteractionName()]>">
        <div class="oppia-editor-card-section-container">
          <div class="oppia-editor-card-section" style="height: 100%;">
            <button type="button" class="protractor-test-delete-interaction oppia-delete-interaction-button oppia-transition-200" ng-click="deleteInteraction()" ng-if="editabilityService.isEditable()">
              <img src="/third_party/static/material-design-icons-1.0.1/ic_close_black_48dp.png">
            </button>

            <div ng-if="hasLoaded" class="protractor-test-interaction" ng-class="{'oppia-editable-section': editabilityService.isEditable()}">
              <div class="oppia-interaction-preview oppia-transition-200" style="position: absolute; width: 100%; height: 100%;" ng-click="openInteractionCustomizerModal()">
              </div>
              <div angular-html-bind="interactionPreviewHtml" class="oppia-pre-avatar-user" style="padding: 5px; pointer-events: none;">
              </div>
            </div>
          </div>
        </div>
      </div>
    </md-card>
  </div>
</div>

<script type="text/ng-template" id="modals/customizeInteraction">
  <div class="modal-header" style="border-bottom: 0; padding-bottom: 0;">
    <h3 ng-if="!stateInteractionIdService.displayed">
      Choose Interaction
    </h3>

    <h3 ng-if="stateInteractionIdService.displayed">
      Customize Interaction (<[INTERACTION_SPECS[stateInteractionIdService.displayed].name]>)
    </h3>
  </div>

  <div class="modal-body">
    <div ng-if="!stateInteractionIdService.displayed" ng-cloak>
      <tabset>
        <tab ng-repeat="category in ALLOWED_INTERACTION_CATEGORIES"
             heading="<[category.name]>" active="category.active"
             class="protractor-test-interaction-tab">
          <br>
          <div ng-repeat="interactionId in category.interaction_ids"
               ng-click="onChangeInteractionId(interactionId)"
               class="oppia-interaction-tile protractor-test-interaction-tile-<[interactionId]>">
            <img ng-src="/extensions/interactions/<[interactionId]>/static/<[interactionId]>.png">
            <div class="oppia-interaction-tile-name">
              <[INTERACTION_SPECS[interactionId].name]>
            </div>
          </div>
        </tab>
      </tabset>
    </div>

    <form ng-if="stateInteractionIdService.displayed" name="form.schemaForm" class="protractor-test-interaction-editor">
      <div ng-if="customizationArgSpecs.length === 0">
        <em>There are no customizations options available.<br><br>
        To use this interaction, click 'Save Interaction'.</em>
      </div>

      <div ng-repeat="customizationArgSpec in customizationArgSpecs track by $index">
        <div class="oppia-interaction-customization-label"><[customizationArgSpec.description]></div>
        <div>
          <schema-based-editor local-value="stateCustomizationArgsService.displayed[customizationArgSpec.name].value" schema="customizationArgSpec.schema">
          </schema-based-editor>
          <div style="margin-bottom: 15px;"></div>
        </div>
      </div>
    </form>
  </div>

  <div class="modal-footer">
    <button class="btn btn-default" style="float: left;" ng-click="returnToInteractionSelector()" ng-if="stateInteractionIdService.displayed">Change Interaction</button>

    <button class="btn btn-default" ng-click="cancel()">Cancel</button>
    <button class="btn btn-success protractor-test-save-interaction" ng-click="save()"
            ng-disabled="!stateInteractionIdService.displayed || form.schemaForm.$invalid">
      Save Interaction
    </button>
  </div>
</script>

<script type="text/ng-template" id="modals/deleteInteraction">
  <div class="modal-header">
    <h3>Delete Interaction</h3>
  </div>

  <div class="modal-body">
    <p>
      Are you sure you want to delete this interaction? This will also clear
      all its responses.
    </p>
  </div>

  <div class="modal-footer">
    <button class="btn btn-default" ng-click="cancel()">Cancel</button>
    <button class="btn btn-danger protractor-test-confirm-delete-interaction"
            ng-click="reallyDelete()">
      Delete Interaction
    </button>
  </div>
</script>

<script type="text/ng-template" id="teaching/testInteractionPanel">
  <div class="form-inline" style="margin-bottom: 20px;">
    <table class="preview-conversation-skin-card-row-container">
      <tr class="preview-conversation-skin-card-row">
        <td class="preview-conversation-skin-row-avatar" valign="top">
          <img class="preview-conversation-skin-row-avatar-img" src="/images/general/oppia_black_48px.png">
        </td>
        <td class="preview-conversation-skin-oppia-content">
          <div angular-html-bind="stateContent()"></div>
        </td>
      </tr>
    </table>
    <div ng-if="interactionIsInline">
      <div class="preview-conversation-skin-inline-interaction">
        <table class="preview-conversation-skin-card-row-container" style="margin-bottom: 0;">
          <tr class="preview-conversation-skin-card-row">
            <td class="preview-conversation-skin-row-avatar" valign="top">
              <img class="preview-conversation-skin-row-avatar-img img-circle" ng-src="/images/general/user_mint_48px.png">
            </td>
            <td class="preview-conversation-skin-learner-input" angular-html-bind="inputTemplate()">
            </td>
          </tr>
        </table>
      </div>
    </div>
    <div class="preview-conversation-skin-supplemental-interaction" ng-if="!interactionIsInline">
      <div>
        <md-card class="preview-conversation-skin-supplemental-card">
          <div angular-html-bind="inputTemplate()">
          </div>
        </md-card>
      </div>
    </div>
  </div>
</script>
<commit_msg>Remove 'Change Interaction' button from modal when an interaction has been selected.<commit_after><div ng-controller="StateInteraction" id="tutorialStateInteraction">
  <md-card style="margin: 20px 0px; padding: 0px;" ng-if="!interactionId">
    <div class="oppia-add-interaction-button-container">
      <button type="button" class="btn btn-default btn-lg oppia-add-interaction-button protractor-test-open-add-interaction-modal" ng-click="openInteractionCustomizerModal()">
        + Add Interaction / End Conversation
      </button>
    </div>
  </md-card>

  <div ng-if="interactionId">
    <md-card class="oppia-editor-card-with-avatar">
      <div class="oppia-editor-card-body" title="<[getCurrentInteractionName()]>">
        <div class="oppia-editor-card-section-container">
          <div class="oppia-editor-card-section" style="height: 100%;">
            <button type="button" class="protractor-test-delete-interaction oppia-delete-interaction-button oppia-transition-200" ng-click="deleteInteraction()" ng-if="editabilityService.isEditable()">
              <img src="/third_party/static/material-design-icons-1.0.1/ic_close_black_48dp.png">
            </button>

            <div ng-if="hasLoaded" class="protractor-test-interaction" ng-class="{'oppia-editable-section': editabilityService.isEditable()}">
              <div class="oppia-interaction-preview oppia-transition-200" style="position: absolute; width: 100%; height: 100%;" ng-click="openInteractionCustomizerModal()">
              </div>
              <div angular-html-bind="interactionPreviewHtml" class="oppia-pre-avatar-user" style="padding: 5px; pointer-events: none;">
              </div>
            </div>
          </div>
        </div>
      </div>
    </md-card>
  </div>
</div>

<script type="text/ng-template" id="modals/customizeInteraction">
  <div class="modal-header" style="border-bottom: 0; padding-bottom: 0;">
    <h3 ng-if="!stateInteractionIdService.displayed">
      Choose Interaction
    </h3>

    <h3 ng-if="stateInteractionIdService.displayed">
      Customize Interaction (<[INTERACTION_SPECS[stateInteractionIdService.displayed].name]>)
    </h3>
  </div>

  <div class="modal-body">
    <div ng-if="!stateInteractionIdService.displayed" ng-cloak>
      <tabset>
        <tab ng-repeat="category in ALLOWED_INTERACTION_CATEGORIES"
             heading="<[category.name]>" active="category.active"
             class="protractor-test-interaction-tab">
          <br>
          <div ng-repeat="interactionId in category.interaction_ids"
               ng-click="onChangeInteractionId(interactionId)"
               class="oppia-interaction-tile protractor-test-interaction-tile-<[interactionId]>">
            <img ng-src="/extensions/interactions/<[interactionId]>/static/<[interactionId]>.png">
            <div class="oppia-interaction-tile-name">
              <[INTERACTION_SPECS[interactionId].name]>
            </div>
          </div>
        </tab>
      </tabset>
    </div>

    <form ng-if="stateInteractionIdService.displayed" name="form.schemaForm" class="protractor-test-interaction-editor">
      <div ng-if="customizationArgSpecs.length === 0">
        <em>There are no customizations options available.<br><br>
        To use this interaction, click 'Save Interaction'.</em>
      </div>

      <div ng-repeat="customizationArgSpec in customizationArgSpecs track by $index">
        <div class="oppia-interaction-customization-label"><[customizationArgSpec.description]></div>
        <div>
          <schema-based-editor local-value="stateCustomizationArgsService.displayed[customizationArgSpec.name].value" schema="customizationArgSpec.schema">
          </schema-based-editor>
          <div style="margin-bottom: 15px;"></div>
        </div>
      </div>
    </form>
  </div>

  <div class="modal-footer">
    <!-- Do not show this button if an interaction is already selected. -->
    <button class="btn btn-default" style="float: left;" ng-click="returnToInteractionSelector()" ng-if="stateInteractionIdService.displayed && !stateInteractionIdService.savedMemento">Change Interaction</button>

    <button class="btn btn-default" ng-click="cancel()">Cancel</button>
    <button class="btn btn-success protractor-test-save-interaction" ng-click="save()"
            ng-disabled="!stateInteractionIdService.displayed || form.schemaForm.$invalid">
      Save Interaction
    </button>
  </div>
</script>

<script type="text/ng-template" id="modals/deleteInteraction">
  <div class="modal-header">
    <h3>Delete Interaction</h3>
  </div>

  <div class="modal-body">
    <p>
      Are you sure you want to delete this interaction? This will also clear
      all its responses.
    </p>
  </div>

  <div class="modal-footer">
    <button class="btn btn-default" ng-click="cancel()">Cancel</button>
    <button class="btn btn-danger protractor-test-confirm-delete-interaction"
            ng-click="reallyDelete()">
      Delete Interaction
    </button>
  </div>
</script>

<script type="text/ng-template" id="teaching/testInteractionPanel">
  <div class="form-inline" style="margin-bottom: 20px;">
    <table class="preview-conversation-skin-card-row-container">
      <tr class="preview-conversation-skin-card-row">
        <td class="preview-conversation-skin-row-avatar" valign="top">
          <img class="preview-conversation-skin-row-avatar-img" src="/images/general/oppia_black_48px.png">
        </td>
        <td class="preview-conversation-skin-oppia-content">
          <div angular-html-bind="stateContent()"></div>
        </td>
      </tr>
    </table>
    <div ng-if="interactionIsInline">
      <div class="preview-conversation-skin-inline-interaction">
        <table class="preview-conversation-skin-card-row-container" style="margin-bottom: 0;">
          <tr class="preview-conversation-skin-card-row">
            <td class="preview-conversation-skin-row-avatar" valign="top">
              <img class="preview-conversation-skin-row-avatar-img img-circle" ng-src="/images/general/user_mint_48px.png">
            </td>
            <td class="preview-conversation-skin-learner-input" angular-html-bind="inputTemplate()">
            </td>
          </tr>
        </table>
      </div>
    </div>
    <div class="preview-conversation-skin-supplemental-interaction" ng-if="!interactionIsInline">
      <div>
        <md-card class="preview-conversation-skin-supplemental-card">
          <div angular-html-bind="inputTemplate()">
          </div>
        </md-card>
      </div>
    </div>
  </div>
</script>

{'fraction_non_alphanumeric': 0.15578083887943042, 'fraction_numerical': 0.006655316514471444, 'mean_word_length': 3.2039687703318154, 'pattern_counts': {'":': 0, '<': 274, '<?xml version=': 0, '>': 274, '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': '5998491', 'n_tokens_mistral': 4059, 'n_tokens_neox': 3903, 'n_words': 645}