<commit_before><template>

  <div class="summary-section">

    <!--TOPICS-->
    <div v-if="kind === 'topic'">
      <p>{{ exercisecount }} Exercises - {{ contentcount }} Content Items</p>
      <p>Last Active: {{ lastActiveText }}</p>
      <div>
        <p>Exercises</p>
        <progress-bar :progress="exerciseprogress"></progress-bar>
      </div>
      <div>
        <p>Content</p>
        <progress-bar :progress="contentprogress"></progress-bar>
      </div>
    </div>

    <!--EXERCISE-->
    <div v-if="kind === 'exercise'">
      <p>{{ questions_count }} Questions - Mastery Model: {{ mastery_model }}</p>
      <p>Last Active: {{ last_active }}</p>
      <div v-if="singleuser">
        <p>{{ questions_answered }} Questions Answered - {{ attempts }} Attempts - {{ time_spent }} -
          {{ date_mastered }}</p>
      </div>
      <div v-else>
        <p>Mastered:</p>
        <p>{{ exercise_mastered }} / {{ exercise_total }} Learners</p>
      </div>
    </div>

    <!--VIDEO/AUDIO-->
    <div v-if="kind === 'video' ">
      <p>{{ duration }}</p>
      <p>Last Active: {{ last_active }}</p>
      <div v-if="singleuser">
        <p>{{ time_spent }}</p>
        <progress-bar :progress="video_progress"></progress-bar>
      </div>
      <div v-else>
        <progress-bar :progress="video_progress"></progress-bar>
      </div>
    </div>

    <!--DOCUMENT-->
    <div v-if="kind === ('document' || 'audio')">
      <p>{{ pages }} Pages</p>
      <p>Last Active: {{ last_active }}</p>
      <div v-if="singleuser">
        <p>
          <span v-if="document_progress === 1.000">Viewed - {{ time_spent }}</span>
          <span v-else>Not Viewed</span>
        </p>
      </div>
      <div v-else>
        <progress-bar :progress="document_progress"></progress-bar>
      </div>
    </div>
  </div>

</template>


<script>

  module.exports = {
    $trNameSpace: 'report-summary',
    $trs: {
      lastActiveText: '{0, date, medium}',
    },
    computed: {
      lastActiveText() {
        if (this.lastactive) {
          return this.$tr('lastActiveText', new Date(this.lastactive));
        }
        return '–';
      },
    },
    props: {
      kind: {
        type: String,
        required: true,
      },
      exercisecount: {
        type: Number,
        required: true,
      },
      exerciseprogress: {
        type: Number,
        required: true,
      },
      contentcount: {
        type: Number,
        required: true,
      },
      contentprogress: {
        type: Number,
        required: true,
      },
      lastactive: {
        type: String,
      },
      singleuser: {
        type: Boolean,
        required: true,
      },
    },
    data: () => ({
      questions_count: 20,
      mastery_model: '3 out of 5 correct',
      questions_answered: 20,
      attempts: 40,
      time_spent: '3:40:32',
      exercise_mastered: 20,
      exercise_total: 100,
      date_mastered: 'Oct 31 2016',
      video_progress: 0.75,
      pages: 300,
      document_progress: 1.0,
    }),
  };

</script>


<style lang="stylus" scoped>

  @require '~kolibri.styles.coreTheme'

  .summary-section
    padding: 20px
    background-color: white

</style>
<commit_msg>Removed data.<commit_after><template>

  <div class="summary-section">

    <!--TOPICS-->
    <div v-if="kind === 'topic'">
      <p>{{ exercisecount }} Exercises - {{ contentcount }} Content Items</p>
      <p>Last Active: {{ lastActiveText }}</p>
      <div>
        <p>Exercises</p>
        <progress-bar :progress="exerciseprogress"></progress-bar>
      </div>
      <div>
        <p>Content</p>
        <progress-bar :progress="contentprogress"></progress-bar>
      </div>
    </div>

    <!--EXERCISE-->
    <div v-if="kind === 'exercise'">
      <!--<p>{{ questions_count }} Questions - Mastery Model: {{ mastery_model }}</p>-->
      <p>Last Active: {{ lastActiveText }}</p>
      <div v-if="singleuser">
        <!--TODO: Should just be one of the 3 progress states.-->
        <progress-bar :progress="exerciseprogress"></progress-bar>
      </div>
      <div v-else>
        <p>Mastered: exerciseprogress {{ exerciseprogress }} / exerciseCount {{ exerciseCount }} Learners</p>
      </div>
    </div>

    <!--VIDEO/AUDIO-->
    <div v-if="kind === 'video' ">
      <p>Last Active: {{ lastActiveText }}</p>
      <div v-if="singleuser">
        <!--TODO: Should just be one of the 3 progress states.-->
        <progress-bar :progress="contentprogress"></progress-bar>
      </div>
      <div v-else>
        <progress-bar :progress="contentprogress"></progress-bar>
      </div>
    </div>

    <!--DOCUMENT-->
    <div v-if="kind === ('document' || 'audio')">
      <p>Last Active: {{ lastActiveText }}</p>
      <div v-if="singleuser">
        <!--TODO: Should just be one of the 2 progress states, viewed or not.-->
        <progress-bar :progress="contentprogress"></progress-bar>
      </div>
      <div v-else>
        <progress-bar :progress="contentprogress"></progress-bar>
      </div>
    </div>
  </div>

</template>


<script>

  module.exports = {
    $trNameSpace: 'report-summary',
    $trs: {
      lastActiveText: '{0, date, medium}',
    },
    computed: {
      lastActiveText() {
        if (this.lastactive) {
          return this.$tr('lastActiveText', new Date(this.lastactive));
        }
        return '–';
      },
    },
    props: {
      kind: {
        type: String,
        required: true,
      },
      exercisecount: {
        type: Number,
        required: true,
      },
      exerciseprogress: {
        type: Number,
        required: true,
      },
      contentcount: {
        type: Number,
        required: true,
      },
      contentprogress: {
        type: Number,
        required: true,
      },
      lastactive: {
        type: String,
      },
      singleuser: {
        type: Boolean,
        required: true,
      },
    },
  };

</script>


<style lang="stylus" scoped>

  @require '~kolibri.styles.coreTheme'

  .summary-section
    padding: 20px
    background-color: white

</style>

{'fraction_non_alphanumeric': 0.17796470394194294, 'fraction_numerical': 0.007422068283028204, 'mean_word_length': 1.9960474308300395, 'pattern_counts': {'":': 0, '<': 155, '<?xml version=': 0, '>': 156, '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': '7394274', 'n_tokens_mistral': 2034, 'n_tokens_neox': 1948, 'n_words': 414}