<commit_before>{% extends "base.html" %}

{% load i18n %}
{% load compressed %}
{% load staticfiles %}
{% load timtec_markdown %}

{% block js %}
{{ block.super }}
{% compressed_js 'lesson' %}
{% endblock %}

{% block content %}

<script type="text/javascript">
window.lessonId = {{ lesson.pk }};
// Content type id for object type core.Unit used by django generic relations.
window.unit_content_type_id = {{ unit_content_type_id }};

$(document).ready(function() {
    $(".nav-tabs a").click(function(e) {
        e.preventDefault();
        $(this).tab('show');
    })
    $('a.unit').tooltip();
})
</script>

<!-- COURSE -->
<div id="course" class="course-lesson" ng-app="lesson">

    <!-- HEADER -->
    {% include "_course-header-inline.html"  with course=lesson.course %}
    <!-- END HEADER -->

    <!-- COURSE CONTENT -->
    <section id="course-content" class="container">

        <nav class="course-lessons hidden-xs">
            <div class="row">
                <div class="col-lg-12">
                    <h1>{{ lesson.name }}</h1>
                    <p class="description">{{ lesson.desc }}</p>
                </div>
            </div>
        </nav>

        <nav class="lesson-units hidden-xs">
            <div class="btn-group">
                <button type="button" class="btn btn-sm btn-default">{{ lesson.name }}</button>
                <button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
                    <i class="fa fa-chevron-down"></i>
                </button>
                <ul class="dropdown-menu">
                    {% for list_lesson in lesson.course.public_lessons %}
                        <li><a href="{% url 'lesson' list_lesson.course.slug list_lesson.slug %}">{{ list_lesson.name }}</a></li>
                    {% endfor %}
                </ul>
            </div>
        </nav>


        <!-- LESSON NAVIGATION FOR PHONE -->
        <p class="visible-xs">
            <select onchange="document.location=this.value" class="form-control">
                <option>{{lesson.name}}</option>
                {% for list_lesson in lesson.course.public_lessons %}
                    {% if list_lesson.name != lesson.name %}
                        <option value="{% url 'lesson' list_lesson.course.slug list_lesson.slug %}">{{ list_lesson.name }}</option>
                    {% endif %}
                {% endfor %}
            </select>
        </p>
        <!-- END LESSON NAVIGATION FOR PHONE -->

        <!-- ROW -->
        <div class="row" ng-controller="MainCtrl">

            {% verbatim %}
            <!-- UNITS NAVIGATION FOR TABLET AND DESKTOP -->
            <div class="col-lg-1 col-md-1 col-sm-1 hidden-xs">
                <!-- UNITS -->
                <div class="units">
                    <a style="display:block;" data-placement="right"
                       title="{{unit.video.name}}"
                       href="#/{{$index+1}}"
                       class="has-tooltip unit track" data-toggle="tooltip"
                       ng-repeat="unit in lesson.units"
                       ng-class="{watching: unit==currentUnit, done: unit.progress.complete}">
                           <i class="fa fa-caret-right"></i>
                           <span class="position" ng-bind="unit.position+1"></span>
                           <i class="fa fa-list" ng-show="unit.activities"></i>
                    </a>
                    <!-- <label ng-hide="false" style="font-family: monospace">
                        video <input type="radio" ng-model="section" value="video"/>
                    </label>
                    <label ng-hide="false" style="font-family: monospace">
                        ativi <input type="radio" ng-model="section" value="activity"/>
                    </label> -->
                </div>
                <!-- END UNITS -->
            </div>
            <!-- END UNITS NAVIGATION FOR TABLET AND DESKTOP -->

            <!-- UNITS NAVIGATION FOR PHONES -->
            <div class="col-xs-12 visible-xs">
                <p>
                    <select ng-model="currentUnitPos" class="form-control">
                        <option ng-repeat="unit in lesson.units"
                                ng-value="unit"
                                ng-selected="unit==currentUnit"
                                value="{{$index+1}}">{% trans 'Unit' %} {{ unit.position + 1 }}</option>
                    </select>
                </p>
            </div>
            <!-- END UNITS NAVIGATION FOR PHONES -->
            {% endverbatim %}

            <div class="col-lg-8 col-md-8 col-sm-11 col-xs-12">
                <div ng-show="section=='video'">
                    <div class="video">
                        <div class="row">
                            <div id="player-outter" class="col-lg-12 col-md-12 col-sm-12">
                                <div id="youtube-player" youtube-player></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div ng-show="section=='activity'">
                    <div class="course-activity">
                        <ng:include src="activityTemplateUrl"></ng:include>
                    </div>
                </div>
                <div ng-show="section=='comment'" class="comment">
                    <div class="panel panel-default" style="min-height: 368px;">
                        <div class="panel-heading">
                            <h2 class="panel-title">{% trans 'Professor comment' %}</h2>
                        </div>
                        <div class="panel-body" ng-bind-html="currentActivity.comment|markdown"></div>
                    </div>
                    <div class="row" ng-if="answer.correct">
                        <div class="col-lg-12 col-md-12 col-sm-12 textright">
                            <button class="btn btn-success" ng-click="nextStep()">{% trans 'Continue' %}</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- div ng-view></div -->

            <!-- NOTES -->
            <div class="col-lg-3 col-md-3 hidden-sm hidden-xs">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#notes" data-toggle="tab">{% trans 'Annotations' %}</a></li>
                </ul>
                <div class="tab-content">
                    {% include "_notes_inline.html" %}
                </div>
            </div>
            <!-- END NOTES -->
        </div>
        <!-- END ROW -->
        
        <div class="row">
            <div class="col-lg-8 col-sm-10 col-lg-offset-1 col-sm-offset-1">
                <!-- SIDENOTES -->
                <div class="side-notes">
                    <div class="page-header-double">
                        <h3><i class="fa fa-angle-double-right"></i> {% trans 'Addicional materials' %}</h3>
                    </div>   
                    <span ng-bind-html="currentUnit.side_notes|markdown"></span>
                    <p ng-if="!currentUnit.side_notes">{% trans 'This unit has no notes' %}</p>
                </div>
                <!-- END SIDENOTES -->

                <!-- FORUM -->
                {% include "_forum_inline.html"  with course=lesson.course question_form=1 %}
                <!-- END FORUM -->
            </div><commit_msg>fix unit navigation on small screens<commit_after>{% extends "base.html" %}

{% load i18n %}
{% load compressed %}
{% load staticfiles %}
{% load timtec_markdown %}

{% block js %}
{{ block.super }}
{% compressed_js 'lesson' %}
<script type="text/javascript" src="{% static 'js/introjs/lesson.js' %}"></script>
{% endblock %}

{% block content %}

<script type="text/javascript">
window.lessonId = {{ lesson.pk }};
// Content type id for object type core.Unit used by django generic relations.
window.unit_content_type_id = {{ unit_content_type_id }};

$(document).ready(function() {
    $(".nav-tabs a").click(function(e) {
        e.preventDefault();
        $(this).tab('show');
    })
    $('a.unit').tooltip();

    startIntro();
})
</script>

<!-- COURSE -->
<div id="course" class="course-lesson" ng-app="lesson">

    <!-- HEADER -->
    {% include "_course-header-inline.html"  with course=lesson.course %}
    <!-- END HEADER -->

    <!-- COURSE CONTENT -->
    <section id="course-content" class="container">

        <nav class="course-lessons hidden-xs">
            <div class="row">
                <div class="col-lg-12">
                    <h1>{{ lesson.name }}</h1>
                    <p class="description">{{ lesson.desc }}</p>
                </div>
            </div>
        </nav>

        <nav class="lesson-units hidden-xs">
            <div class="btn-group" id="lesson-list-dropdown">
                <button type="button" class="btn btn-sm btn-default">{{ lesson.name }}</button>
                <button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
                    <i class="fa fa-chevron-down"></i>
                </button>
                <ul class="dropdown-menu">
                    {% for list_lesson in lesson.course.public_lessons %}
                        <li><a href="{% url 'lesson' list_lesson.course.slug list_lesson.slug %}">{{ list_lesson.name }}</a></li>
                    {% endfor %}
                </ul>
            </div>
        </nav>


        <!-- LESSON NAVIGATION FOR PHONE -->
        <p class="visible-xs">
            <select onchange="document.location=this.value" class="form-control">
                <option>{{lesson.name}}</option>
                {% for list_lesson in lesson.course.public_lessons %}
                    {% if list_lesson.name != lesson.name %}
                        <option value="{% url 'lesson' list_lesson.course.slug list_lesson.slug %}">{{ list_lesson.name }}</option>
                    {% endif %}
                {% endfor %}
            </select>
        </p>
        <!-- END LESSON NAVIGATION FOR PHONE -->

        <!-- ROW -->
        <div class="row" ng-controller="MainCtrl">

            {% verbatim %}
            <!-- UNITS NAVIGATION FOR TABLET AND DESKTOP -->
            <div class="col-lg-1 col-md-1 col-sm-1 hidden-xs" id="lesson-units-nav">
                <!-- UNITS -->
                <div class="units">
                    <a style="display:block;" data-placement="right"
                       title="{{unit.video.name}}"
                       href="#/{{$index+1}}"
                       class="has-tooltip unit track" data-toggle="tooltip"
                       ng-repeat="unit in lesson.units"
                       ng-class="{watching: unit==currentUnit, done: unit.progress.complete}">
                           <span class="position" ng-bind="unit.position+1"></span>
                           <i class="fa fa-list" ng-show="unit.activities"></i>
                    </a>
                    <!-- <label ng-hide="false" style="font-family: monospace">
                        video <input type="radio" ng-model="section" value="video"/>
                    </label>
                    <label ng-hide="false" style="font-family: monospace">
                        ativi <input type="radio" ng-model="section" value="activity"/>
                    </label> -->
                </div>
                <!-- END UNITS -->
            </div>
            <!-- END UNITS NAVIGATION FOR TABLET AND DESKTOP -->

            <!-- UNITS NAVIGATION FOR PHONES -->
            <div class="col-xs-12 visible-xs">
                <p>
                    <select ng-model="currentUnitPos" class="form-control">
                        <option ng-repeat="unit in lesson.units"
                                ng-value="unit"
                                ng-selected="unit==currentUnit"
                                value="{{$index+1}}">{% endverbatim %}{% trans 'Unit' %}{% verbatim %} {{ unit.position + 1 }}</option>
                    </select>
                </p>
            </div>
            <!-- END UNITS NAVIGATION FOR PHONES -->
            {% endverbatim %}

            <div class="col-lg-8 col-md-8 col-sm-11 col-xs-12">
                <div ng-show="section=='video'">
                    <div class="video">
                        <div class="row">
                            <div id="player-outter" class="col-lg-12 col-md-12 col-sm-12">
                                <div id="youtube-player" youtube-player></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div ng-show="section=='activity'">
                    <div class="course-activity">
                        <ng:include src="activityTemplateUrl"></ng:include>
                    </div>
                </div>
                <div ng-show="section=='comment'" class="comment">
                    <div class="panel panel-default" style="min-height: 368px;">
                        <div class="panel-heading">
                            <h2 class="panel-title">{% trans 'Professor comment' %}</h2>
                        </div>
                        <div class="panel-body" ng-bind-html="currentActivity.comment|markdown"></div>
                    </div>
                    <div class="row" ng-if="answer.correct">
                        <div class="col-lg-12 col-md-12 col-sm-12 textright">
                            <button class="btn btn-success" ng-click="nextStep()">{% trans 'Continue' %}</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- div ng-view></div -->

            <!-- NOTES -->
            <div class="col-lg-3 col-md-3 hidden-sm hidden-xs" id="student-notes">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#notes" data-toggle="tab">{% trans 'Annotations' %}</a></li>
                </ul>
                <div class="tab-content">
                    {% include "_notes_inline.html" %}
                </div>
            </div>
            <!-- END NOTES -->
        </div>
        <!-- END ROW -->
        
        <div class="row">
            <div class="col-lg-8 col-sm-10 col-lg-offset-1 col-sm-offset-1">
                <!-- SIDENOTES -->
                <div class="side-notes" id="materials">
                    <div class="page-header-double">
                        <h3><i class="fa fa-angle-double-right"></i> {% trans 'Addicional materials' %}</h3>
                    </div>   
                    <span ng-bind-html="currentUnit.side_notes|markdown"></span>
                    <p ng-if="!currentUnit.side_notes">{% trans 'This unit has no notes' %}</p>
                </div>
                <!-- END SIDENOTES -->

                <!-- FORUM -->
                {% include "_forum_inline.html"  with course=lesson.course question_form=1 %}
                <!-- END FORUM -->
            </div>
{'fraction_non_alphanumeric': 0.16405990016638936, 'fraction_numerical': 0.006389351081530782, 'mean_word_length': 1.3452473856719214, 'pattern_counts': {'":': 0, '<': 299, '<?xml version=': 0, '>': 299, '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': '4024780', 'n_tokens_mistral': 4360, 'n_tokens_neox': 3958, 'n_words': 826}