<commit_before><%! from django.utils.translation import ugettext as _ %>
<%!
  from django.core.urlresolvers import reverse
  from courseware.courses import course_image_url, get_course_about_section
  from courseware.access import has_access
%>
<%namespace name='static' file='../static_content.html'/>

<%inherit file="../main.html" />

<%block name="headextra">
  % if self.theme_enabled():
    <%include file="../theme-google-analytics.html" />
  % else:
    <%include file="../google_analytics.html" />
  % endif
</%block>

<%block name="js_extra">

  <script type="text/javascript">
  (function() {
    $(".register").click(function(event) {
      $("#class_enroll_form").submit();
      event.preventDefault();
    });

    ## making the conditional around this entire JS block for sanity
    %if settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
    $('#class_enroll_form').on('ajax:complete', function(event, xhr) {
      if(xhr.status == 200) {
        location.href = "${reverse('dashboard')}";
      } else if (xhr.status == 403) {
        location.href = "${reverse('course-specific-register', args=[course.id])}?course_id=${course.id}&enrollment_action=enroll";
      } else if (xhr.status == 400) { //This means the user did not have permission
        $('#register_error').html('This course has restricted enrollment.  Sorry, you do not have permission to enroll.<br />' +
                                  'You may need to log out and re-login with a university account, such as WebAuth'
        ).css("display", "block");
      } else {
        $('#register_error').html(
            (xhr.responseText ? xhr.responseText : 'An error occurred. Please try again later.')
        ).css("display", "block");
      }
    });

    %else:

    $('#class_enroll_form').on('ajax:complete', function(event, xhr) {
      if(xhr.status == 200) {
        if (xhr.responseText == "") {
          location.href = "${reverse('dashboard')}";
        }
        else {
          location.href = xhr.responseText;
        }
      } else if (xhr.status == 403) {
        location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll";
      } else {
        $('#register_error').html(
            (xhr.responseText ? xhr.responseText : 'An error occurred. Please try again later.')
        ).css("display", "block");
      }
    });

    %endif

  })(this)
  </script>

  <script src="${static.url('js/course_info.js')}"></script>
</%block>

<%block name="title"><title>${_("About {course.display_number_with_default}").format(course=course) | h}</title></%block>

<section class="course-info">
  <header class="course-profile">
    <div class="intro-inner-wrapper">
      <div class="table">
      <section class="intro">
        <hgroup>
          <h1>
            ${course.display_number_with_default | h}: ${get_course_about_section(course, "title")}
            % if not self.theme_enabled():
              <a href="#">${get_course_about_section(course, "university")}</a>
            % endif
          </h1>
        </hgroup>

        <div class="main-cta">
        %if user.is_authenticated() and registered:
	              %if show_courseware_link:
                    <a href="${course_target}">
                %endif

                <span class="register disabled">${_("You are registered for this course {course.display_number_with_default}").format(course=course) | h}</span>
                %if show_courseware_link:
                    <strong>${_("View Courseware")}</strong>
                    </a>
                %endif

        %else:
            <a href="#" class="register">${_("Register for {course.display_number_with_default}").format(course=course) | h}</a>

            <a href="${reverse('verify_student_show_requirements')}">Mock Verify Enrollment</a>

            <div id="register_error"></div>
        %endif
        </div>

      </section>
      % if get_course_about_section(course, "video"):<commit_msg>Remove mock verify enrollment link<commit_after><%! from django.utils.translation import ugettext as _ %>
<%!
  from django.core.urlresolvers import reverse
  from courseware.courses import course_image_url, get_course_about_section
  from courseware.access import has_access
%>
<%namespace name='static' file='../static_content.html'/>

<%inherit file="../main.html" />

<%block name="headextra">
  % if self.theme_enabled():
    <%include file="../theme-google-analytics.html" />
  % else:
    <%include file="../google_analytics.html" />
  % endif
</%block>

<%block name="js_extra">

  <script type="text/javascript">
  (function() {
    $(".register").click(function(event) {
      $("#class_enroll_form").submit();
      event.preventDefault();
    });

    ## making the conditional around this entire JS block for sanity
    %if settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
    $('#class_enroll_form').on('ajax:complete', function(event, xhr) {
      if(xhr.status == 200) {
        location.href = "${reverse('dashboard')}";
      } else if (xhr.status == 403) {
        location.href = "${reverse('course-specific-register', args=[course.id])}?course_id=${course.id}&enrollment_action=enroll";
      } else if (xhr.status == 400) { //This means the user did not have permission
        $('#register_error').html('This course has restricted enrollment.  Sorry, you do not have permission to enroll.<br />' +
                                  'You may need to log out and re-login with a university account, such as WebAuth'
        ).css("display", "block");
      } else {
        $('#register_error').html(
            (xhr.responseText ? xhr.responseText : 'An error occurred. Please try again later.')
        ).css("display", "block");
      }
    });

    %else:

    $('#class_enroll_form').on('ajax:complete', function(event, xhr) {
      if(xhr.status == 200) {
        if (xhr.responseText == "") {
          location.href = "${reverse('dashboard')}";
        }
        else {
          location.href = xhr.responseText;
        }
      } else if (xhr.status == 403) {
        location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll";
      } else {
        $('#register_error').html(
            (xhr.responseText ? xhr.responseText : 'An error occurred. Please try again later.')
        ).css("display", "block");
      }
    });

    %endif

  })(this)
  </script>

  <script src="${static.url('js/course_info.js')}"></script>
</%block>

<%block name="title"><title>${_("About {course.display_number_with_default}").format(course=course) | h}</title></%block>

<section class="course-info">
  <header class="course-profile">
    <div class="intro-inner-wrapper">
      <div class="table">
      <section class="intro">
        <hgroup>
          <h1>
            ${course.display_number_with_default | h}: ${get_course_about_section(course, "title")}
            % if not self.theme_enabled():
              <a href="#">${get_course_about_section(course, "university")}</a>
            % endif
          </h1>
        </hgroup>

        <div class="main-cta">
        %if user.is_authenticated() and registered:
	              %if show_courseware_link:
                    <a href="${course_target}">
                %endif

                <span class="register disabled">${_("You are registered for this course {course.display_number_with_default}").format(course=course) | h}</span>
                %if show_courseware_link:
                    <strong>${_("View Courseware")}</strong>
                    </a>
                %endif

        %else:
            <a href="#" class="register">${_("Register for {course.display_number_with_default}").format(course=course) | h}</a>
            <div id="register_error"></div>
        %endif
        </div>

      </section>
      % if get_course_about_section(course, "video"):
{'fraction_non_alphanumeric': 0.1645888427150233, 'fraction_numerical': 0.004281576627628762, 'mean_word_length': 2.711214953271028, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2967626', 'n_tokens_mistral': 2434, 'n_tokens_neox': 2352, 'n_words': 477}