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

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

{% block content %}

<!-- COURSE -->
<div id="course" class="course-intro">

    <div class="illust hidden-xs"></div><!-- .illust // top ilustration -->

    <div class="main-content">
        <div class="container">         
           
            <div class="left-col col-lg-7 col-md-7 col-sm-12 col-xs-12">
                
                <section class="course-main" role="main">

                    <header>
                        <h1>{{course.name}}</h1>
                        {% include "_course-professors-inline.html" with course=course %}
                    </header>

                    <!-- COURSE-VIDEO -->
                    <section class="video">
                        <!-- ROW -->
                        <div class="row">
                            {% with yid=course.intro_video.youtube_id %}
                                <div class="col-lg-12 col-md-12 col-sm-12 col-sx-12">
                                    <iframe id="youtube-player" type="text/html" frameborder="0" src="//www.youtube.com/embed/{{yid}}?rel=0&showinfo=0&autohide=1&theme=light&wmode=opaque" allowfullscreen>
                                    </iframe>
                                </div>
                            {% endwith %}
                        </div>
                        <!-- END ROW -->
                    </section>
                    <!-- END COURSE-VIDEO -->

                    <!-- COURSE-INFO -->
                    <section class="course-info">
                        <!-- ROW -->
                        <div class="row">
                            <!-- COL-LG-6 -->
                            <div class="application col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <div class="page-header-double">
                                    <h3 class="top">{% trans "Why do this course?" %}</h3>
                                </div>
                                <div class="info">{{ course.application|timtec_markdown }}</div>
                            </div>
                            <!-- END COL-LG-6 -->
                            <!-- COL-LG-6 -->
                            <div class="requirement col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <div class="page-header-double">
                                    <h3 class="top">{% trans "What do I have to know?" %}</h3>
                                </div>
                                <div class="info">{{ course.requirement|timtec_markdown }}</div>
                            </div>
                            <!-- END COL-LG-6 -->
                        </div>
                        <!-- END ROW -->
                    </section>
                    <!-- END COURSE-INFO -->

                </section>
                {% if user.is_authenticated and course.has_started %}
                    <div class="row">
                    <!-- COURSE-LESSONS -->
                    <section class="lessons col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <!-- PAGE-HEADER-DOUBLE -->
                            <div class="page-header-double">
                                <h3>{% trans "Lessons" %}</h3>
                            </div>
                            <!-- END PAGE-HEADER-DOUBLE -->

                            <!-- FOR LESSON IN COURSE.PUBLIC_LESSONS -->
                            {% for lesson in course.public_lessons %}
                                <!-- LESSON -->
                                <div class="lesson row">
                                    <!-- COL-LG-3 -->
                                    <div class="col-lg-3 col-sm-3 col-sm-3 hidden-xs">
                                        <img src="{{ lesson.thumbnail }}" class="img-thumbnail img-responsive">
                                    </div>
                                    <!-- END COL-LG-3 -->

                                    <!-- COL-LG-9 -->
                                    <div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">

                                        <p>
                                            {% if lesson.is_ready and user_is_enrolled %}
                                                <a href="{% url 'lesson' course.slug lesson.slug %}" class="title">{{ lesson.name }}</a>
                                            {% else %}
                                                <span class="title">{{ lesson.name }}</span>
                                            {% endif %}
                                            <span class="description">{{ lesson.desc }}</span>
                                        </p>

                                        <!-- HIDDEN-XS -->
                                        <div class="hidden-xs">
                                            <!-- TABLE -->
                                            <table class="units table ">
                                                <!-- TR -->
                                                <tr>
                                                    <!-- FOR UNIT IN UNITS -->
                                                    {% for unit in lesson.units.all %}
                                                        <!-- TD -->
                                                        <td>
                                                            {% if lesson.is_ready and user_is_enrolled %}
                                                                <a class="has-tooltip unit {% if unit.id in units_done %}done{% endif %}"
                                                                   data-toggle="tooltip" data-placement="bottom"
                                                                   data-original-title="Unidade {{ forloop.counter }}"
                                                                   href="{% url 'lesson' course.slug lesson.slug %}#/{{ forloop.counter }}">
                                                                   {% if unit.activity %}
                                                                       <i class="fa fa-list"></i>
                                                                   {% endif %}
                                                                </a>
                                                            {% else %}
                                                                <span class="has-tooltip unit {% if unit.id in units_done %}done{% endif %}"
                                                                      data-toggle="tooltip" data-placement="bottom"
                                                                      data-original-title="Unidade {{ forloop.counter }}">
                                                                      {% if unit.activity %}
                                                                          <i class="fa fa-list"></i>
                                                                      {% endif %}
                                                                </span>
                                                            {% endif %}
                                                        </td>
                                                        <!-- END TD -->
                                                    {% endfor %}
                                                    <!-- END FOR -->
                                                </tr>
                                                <!-- END TR -->
                                            </table>
                                            <!-- END TABLE -->
                                        </div>
                                        <!-- END HIDDEN-XS -->

                                        {% if lesson.is_ready %}
                                            <p><i class="fa fa-youtube-play"></i> <small>{{ lesson.video_count }} {% trans "videos" %}</small> | <i class="fa fa-list"></i> <small>{{ lesson.activity_count }} {% trans "activities" %}</small></p>
                                        {% endif %}
                                    </div>
                                    <!-- END COL-LG-9 -->
                                </div>
                                <!-- END LESSON -->
                            {% endfor %}
                            <!-- END FOR LESSON IN COURSE.PUBLIC_LESSONS -->
                    </section>
                    <!-- END COURSE-LESSONS -->
                </div>
                {% endif %}
            </div>

            <div class="right-col col-lg-5 col-md-5 col-sm-12 col-xs-12">
                
                <div class="buttons">
                    {% if course.first_lesson.slug %}
                        {% if user_is_enrolled %}
                            {% if course.has_started %}
                                <a href="{% url "lesson" course.slug course.first_lesson.slug %}" class="js-login-required col-lg-6 col-md-6 col-sm-6 col-xs-12 uppercase">{% trans "Resume" %}</a>
                                
                            {% else %}
                                <span href="#" class="has-tooltip js-login-required col-lg-6 col-md-6 col-sm-6 col-xs-12 uppercase" data-toggle="tooltip" data-placement="bottom" data-original-title="{% blocktrans with start_date=course.start_date %}Este curso começa dia {{ start_date|date:"d/m/Y" }} e você já está inscrito{% endblocktrans %}" title="{% blocktrans with start_date=course.start_date %}Este curso começa dia {{ start_date|date:"d/m/Y" }} e você já está inscrito{% endblocktrans %}">{% trans "Resume" %}</span>
                            {% endif %}
                        {% else %}
                            <a
                                {% if user.is_authenticated %}
                                    onClick="ga('send', 'event', 'course', 'take the course', 'authenticated user', 1);"
                                {% else %}
                                    onClick="ga('send', 'event', 'course', 'take the course', 'authenticated user', 0);"
                                {% endif %}
                                href="{% url "enroll_course" course.slug %}" class="js-login-required btn btn-lg btn-info col-lg-6 col-md-6 col-sm-6 col-xs-12 uppercase">{% trans "Take the Class" %}</a>

                        {% endif %}
                    {% endif %}
                    <a href="#" class="share-facebook col-lg-5 col-lg-offset-1 col-md-5 col-md-offset-1 col-sm-5 col-sm-offset-1 col-xs-12">Compartilhar</a>
                    
                </div>

                <!-- COURSE-SUMMARY - VISIBLE ONLY FOR PHONES -->
                <section class="summary row">
                    <!-- COL-XS-12 -->
                    <div class="col-xs-12"><commit_msg>fix showing start date in course<commit_after>{% extends "base.html" %}

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

{% block content %}

<!-- COURSE -->
<div id="course" class="course-intro">

    <div class="illust hidden-xs"></div><!-- .illust // top ilustration -->

    <div class="main-content">
        <div class="container">         
           
            <div class="left-col col-lg-7 col-md-7 col-sm-12 col-xs-12">
                
                <section class="course-main" role="main">

                    <header>
                        <h1>{{course.name}}</h1>
                        {% include "_course-professors-inline.html" with course=course %}
                    </header>

                    <!-- COURSE-VIDEO -->
                    <section class="video">
                        <!-- ROW -->
                        <div class="row">
                            {% with yid=course.intro_video.youtube_id %}
                                <div class="col-lg-12 col-md-12 col-sm-12 col-sx-12">
                                    <iframe id="youtube-player" type="text/html" frameborder="0" src="//www.youtube.com/embed/{{yid}}?rel=0&showinfo=0&autohide=1&theme=light&wmode=opaque" allowfullscreen>
                                    </iframe>
                                </div>
                            {% endwith %}
                        </div>
                        <!-- END ROW -->
                    </section>
                    <!-- END COURSE-VIDEO -->

                    <!-- COURSE-INFO -->
                    <section class="course-info">
                        <!-- ROW -->
                        <div class="row">
                            <!-- COL-LG-6 -->
                            <div class="application col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <div class="page-header-double">
                                    <h3 class="top">{% trans "Why do this course?" %}</h3>
                                </div>
                                <div class="info">{{ course.application|timtec_markdown }}</div>
                            </div>
                            <!-- END COL-LG-6 -->
                            <!-- COL-LG-6 -->
                            <div class="requirement col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <div class="page-header-double">
                                    <h3 class="top">{% trans "What do I have to know?" %}</h3>
                                </div>
                                <div class="info">{{ course.requirement|timtec_markdown }}</div>
                            </div>
                            <!-- END COL-LG-6 -->
                        </div>
                        <!-- END ROW -->
                    </section>
                    <!-- END COURSE-INFO -->

                </section>
                {% if user.is_authenticated and course.has_started %}
                    <div class="row">
                    <!-- COURSE-LESSONS -->
                    <section class="lessons col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <!-- PAGE-HEADER-DOUBLE -->
                            <div class="page-header-double">
                                <h3>{% trans "Lessons" %}</h3>
                            </div>
                            <!-- END PAGE-HEADER-DOUBLE -->

                            <!-- FOR LESSON IN COURSE.PUBLIC_LESSONS -->
                            {% for lesson in course.public_lessons %}
                                <!-- LESSON -->
                                <div class="lesson row">
                                    <!-- COL-LG-3 -->
                                    <div class="col-lg-3 col-sm-3 col-sm-3 hidden-xs">
                                        <img src="{{ lesson.thumbnail }}" class="img-thumbnail img-responsive">
                                    </div>
                                    <!-- END COL-LG-3 -->

                                    <!-- COL-LG-9 -->
                                    <div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">

                                        <p>
                                            {% if lesson.is_ready and user_is_enrolled %}
                                                <a href="{% url 'lesson' course.slug lesson.slug %}" class="title">{{ lesson.name }}</a>
                                            {% else %}
                                                <span class="title">{{ lesson.name }}</span>
                                            {% endif %}
                                            <span class="description">{{ lesson.desc }}</span>
                                        </p>

                                        <!-- HIDDEN-XS -->
                                        <div class="hidden-xs">
                                            <!-- TABLE -->
                                            <table class="units table ">
                                                <!-- TR -->
                                                <tr>
                                                    <!-- FOR UNIT IN UNITS -->
                                                    {% for unit in lesson.units.all %}
                                                        <!-- TD -->
                                                        <td>
                                                            {% if lesson.is_ready and user_is_enrolled %}
                                                                <a class="has-tooltip unit {% if unit.id in units_done %}done{% endif %}"
                                                                   data-toggle="tooltip" data-placement="bottom"
                                                                   data-original-title="Unidade {{ forloop.counter }}"
                                                                   href="{% url 'lesson' course.slug lesson.slug %}#/{{ forloop.counter }}">
                                                                   {% if unit.activity %}
                                                                       <i class="fa fa-list"></i>
                                                                   {% endif %}
                                                                </a>
                                                            {% else %}
                                                                <span class="has-tooltip unit {% if unit.id in units_done %}done{% endif %}"
                                                                      data-toggle="tooltip" data-placement="bottom"
                                                                      data-original-title="Unidade {{ forloop.counter }}">
                                                                      {% if unit.activity %}
                                                                          <i class="fa fa-list"></i>
                                                                      {% endif %}
                                                                </span>
                                                            {% endif %}
                                                        </td>
                                                        <!-- END TD -->
                                                    {% endfor %}
                                                    <!-- END FOR -->
                                                </tr>
                                                <!-- END TR -->
                                            </table>
                                            <!-- END TABLE -->
                                        </div>
                                        <!-- END HIDDEN-XS -->

                                        {% if lesson.is_ready %}
                                            <p><i class="fa fa-youtube-play"></i> <small>{{ lesson.video_count }} {% trans "videos" %}</small> | <i class="fa fa-list"></i> <small>{{ lesson.activity_count }} {% trans "activities" %}</small></p>
                                        {% endif %}
                                    </div>
                                    <!-- END COL-LG-9 -->
                                </div>
                                <!-- END LESSON -->
                            {% endfor %}
                            <!-- END FOR LESSON IN COURSE.PUBLIC_LESSONS -->
                    </section>
                    <!-- END COURSE-LESSONS -->
                </div>
                {% endif %}
            </div>

            <div class="right-col col-lg-5 col-md-5 col-sm-12 col-xs-12">
                
                <div class="buttons">
                    {% if course.first_lesson.slug %}
                        {% if user_is_enrolled %}
                            {% if course.has_started %}
                                <a href="{% url "lesson" course.slug course.first_lesson.slug %}" class="js-login-required col-lg-6 col-md-6 col-sm-6 col-xs-12 uppercase">{% trans "Resume" %}</a>
                                
                            {% else %}
                                <span href="#" class="has-tooltip js-login-required col-lg-6 col-md-6 col-sm-6 col-xs-12 uppercase" data-toggle="tooltip" data-placement="bottom" data-original-title="{% blocktrans with start_date=course.start_date|date:"d/m/Y" %}Este curso começa dia {{ start_date }} e você já está inscrito{% endblocktrans %}" title="{% blocktrans with start_date=course.start_date|date:"d/m/Y" %}Este curso começa dia {{ start_date }} e você já está inscrito{% endblocktrans %}">{% trans "Resume" %}</span>
                            {% endif %}
                        {% else %}
                            <a
                                {% if user.is_authenticated %}
                                    onClick="ga('send', 'event', 'course', 'take the course', 'authenticated user', 1);"
                                {% else %}
                                    onClick="ga('send', 'event', 'course', 'take the course', 'authenticated user', 0);"
                                {% endif %}
                                href="{% url "enroll_course" course.slug %}" class="js-login-required btn btn-lg btn-info col-lg-6 col-md-6 col-sm-6 col-xs-12 uppercase">{% trans "Take the Class" %}</a>

                        {% endif %}
                    {% endif %}
                    <a href="#" class="share-facebook col-lg-5 col-lg-offset-1 col-md-5 col-md-offset-1 col-sm-5 col-sm-offset-1 col-xs-12">Compartilhar</a>
                    
                </div>

                <!-- COURSE-SUMMARY - VISIBLE ONLY FOR PHONES -->
                <section class="summary row">
                    <!-- COL-XS-12 -->
                    <div class="col-xs-12">
{'fraction_non_alphanumeric': 0.12425197569777534, 'fraction_numerical': 0.008862089443150154, 'mean_word_length': 0.6749808722264728, 'pattern_counts': {'":': 0, '<': 285, '<?xml version=': 0, '>': 285, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 260, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1973622', 'n_tokens_mistral': 4913, 'n_tokens_neox': 4392, 'n_words': 960}