From b0af0b18b9fc4a1d3b13ddcd9b78cc700933a199 Mon Sep 17 00:00:00 2001 From: "Dave St.Germain" Date: Tue, 4 Feb 2014 13:39:36 -0500 Subject: [PATCH 1/2] Converted
    to
    to prevent a11y confusion. --- lms/static/sass/course/_profile.scss | 14 +++++------- lms/templates/courseware/progress.html | 31 +++++++++++++------------- lms/templates/main.html | 4 ++-- lms/templates/main_django.html | 4 ++-- 4 files changed, 26 insertions(+), 27 deletions(-) diff --git a/lms/static/sass/course/_profile.scss b/lms/static/sass/course/_profile.scss index ae405f7b47..efcc6bb393 100644 --- a/lms/static/sass/course/_profile.scss +++ b/lms/static/sass/course/_profile.scss @@ -132,7 +132,7 @@ div.profile-wrapper { } } - section.course-info { + div.course-info { @extend .content; header { @@ -153,13 +153,12 @@ div.profile-wrapper { width: 100%; } - > ol { + > div.chapters { border-top: 1px solid #e3e3e3; - list-style: none; margin-top: lh(); padding-left: 0; - > li { + > section { @extend .clearfix; border-bottom: 1px solid #e3e3e3; display: table; @@ -182,13 +181,12 @@ div.profile-wrapper { width: flex-grid(2, 9); } - ol.sections { + div.sections { display: table-cell; - list-style: none; padding-left: flex-gutter(9); width: flex-grid(7, 9); - > li { + > div { padding:0 0 lh() 0; &:first-child { @@ -214,7 +212,7 @@ div.profile-wrapper { font-size: em(14); } - section.scores { + div.scores { margin: lh(.5) 0; h3 { diff --git a/lms/templates/courseware/progress.html b/lms/templates/courseware/progress.html index 59eedd21c4..2339e63c8d 100644 --- a/lms/templates/courseware/progress.html +++ b/lms/templates/courseware/progress.html @@ -29,10 +29,10 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph", <%include file="/dashboard/_dashboard_prompt_midcourse_reverify.html" /> <%include file="/courseware/course_navigation.html" args="active_page='progress'" /> -
    +
    -
    +

    ${_("Course Progress for Student '{username}' ({email})").format(username=student.username, email=student.email)}

    @@ -41,15 +41,15 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph", %endif -
      +
      %for chapter in courseware_summary: %if not chapter['display_name'] == "hidden": -
    1. +

      ${ chapter['display_name'] }

      -
        +
        %for section in chapter['sections']: -
      1. +
        <% earned = section['section_total'].earned total = section['section_total'].possible @@ -61,8 +61,9 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph", %if total > 0 or earned > 0: ${_("{earned:.3n} of {total:.3n} possible points").format( earned = float(earned), total = float(total) )} - + %endif + %if total > 0 or earned > 0: ${"({0:.3n}/{1:.3n}) {2}".format( float(earned), float(total), percentageString )} %endif @@ -81,7 +82,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph", %endif

        -
        +
        %if len(section['scores']) > 0:

        ${ _("Problem Scores: ") if section['graded'] else _("Practice Scores: ")}

          @@ -92,17 +93,17 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph", %else:

          ${_("No problem scores in this section")}

          %endif -
        +
        -
      2. +
        %endfor -
      -
    2. +
      +
    %endif %endfor -
+ - + - + diff --git a/lms/templates/main.html b/lms/templates/main.html index 1a5123fd44..e9595ad4fc 100644 --- a/lms/templates/main.html +++ b/lms/templates/main.html @@ -110,10 +110,10 @@ <%include file="${header_file}" /> %endif -
+
${self.body()} <%block name="bodyextra"/> -
+ % if not suppress_toplevel_navigation: <%include file="${footer_file}" /> diff --git a/lms/templates/main_django.html b/lms/templates/main_django.html index da82d81720..9c33b9048e 100644 --- a/lms/templates/main_django.html +++ b/lms/templates/main_django.html @@ -30,10 +30,10 @@ {% trans "Skip to this view's content" %} {% include "navigation.html" %} -
+
{% block body %}{% endblock %} {% block bodyextra %}{% endblock %} -
+ {% include "footer.html" %} From 26068a982fc0e5eaba85c87976c981df09c86cce Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Wed, 5 Feb 2014 10:49:37 -0500 Subject: [PATCH 2/2] LMS: removing redundancy and markup reliability from progress-page Sass selectors --- lms/static/sass/course/_profile.scss | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lms/static/sass/course/_profile.scss b/lms/static/sass/course/_profile.scss index efcc6bb393..87272963be 100644 --- a/lms/static/sass/course/_profile.scss +++ b/lms/static/sass/course/_profile.scss @@ -1,7 +1,7 @@ -div.profile-wrapper { +.profile-wrapper { color: #000; - section.user-info { + .user-info { @extend .sidebar; border-left: 1px solid #d3d3d3; border-radius: 0px 4px 4px 0; @@ -63,15 +63,15 @@ div.profile-wrapper { } } - div#description { + #description { font-size: 12px; } - a#change_language, - a#change_location, - a.edit-email, - a.name-edit, - a.email-edit { + #change_language, + #change_location, + .edit-email, + .name-edit, + .email-edit { color: #999; font-size: 12px; position: absolute; @@ -91,12 +91,12 @@ div.profile-wrapper { margin-top: 4px; } - a.deactivate { + .deactivate { color: #aaa; font-style: italic; } - input#pwd_reset_button { + #pwd_reset_button { background: none; border: none; box-shadow: none; @@ -117,7 +117,7 @@ div.profile-wrapper { } } - div#change_password_pop { + #change_password_pop { border-bottom: 1px solid #d3d3d3; box-shadow: 0 1px 0 #eee; color: #4D4D4D; @@ -132,7 +132,7 @@ div.profile-wrapper { } } - div.course-info { + .course-info { @extend .content; header { @@ -148,12 +148,12 @@ div.profile-wrapper { } } - div#grade-detail-graph { + #grade-detail-graph { min-height: 400px; width: 100%; } - > div.chapters { + > .chapters { border-top: 1px solid #e3e3e3; margin-top: lh(); padding-left: 0; @@ -181,7 +181,7 @@ div.profile-wrapper { width: flex-grid(2, 9); } - div.sections { + .sections { display: table-cell; padding-left: flex-gutter(9); width: flex-grid(7, 9); @@ -212,7 +212,7 @@ div.profile-wrapper { font-size: em(14); } - div.scores { + .scores { margin: lh(.5) 0; h3 {