From 02ca97a32c06ab2c06578cf5f9774093963293d9 Mon Sep 17 00:00:00 2001 From: cjt Date: Wed, 1 Feb 2012 14:15:21 -0500 Subject: [PATCH 01/54] tutorial html --- schematic_tutorial.html | 1 + 1 file changed, 1 insertion(+) create mode 120000 schematic_tutorial.html diff --git a/schematic_tutorial.html b/schematic_tutorial.html new file mode 120000 index 0000000000..da681ac006 --- /dev/null +++ b/schematic_tutorial.html @@ -0,0 +1 @@ +../data/problems/schematic_tutorial.html \ No newline at end of file From 348796e5ebd3248dfda1182152aaddf256b049c5 Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Wed, 1 Feb 2012 14:33:20 -0500 Subject: [PATCH 02/54] Simple graphing of homework and lab scores --HG-- branch : profiledev --- .DS_Store | Bin 12292 -> 12292 bytes profile.html | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index a630216fad2b616b683bda11c2b2e6803e0fb4f3..bf54290bb5b9500cfecff77144f84e6b8fba5aaa 100644 GIT binary patch delta 106 zcmZokXi3;mEWo&Ka*05)w|I56iMfG}f~7^RjzYDCp`ng~sikFYEhi@jr$9T0sFI$I qM@V9IO>JF00~jzeLTCnFC=H_;H!BN1VcX0m@ttM!KN&V*Mg{<3C>DhP delta 84 zcmZokXi3;mEWo&aa*04Pw?uWdiII_xf}x4osx`HB^$iSQz{m)p8F-;IjB47f UB>04FGrPn$7RHp#e`VN&0cf`pZ~y=R diff --git a/profile.html b/profile.html index e50efed801..3f88a4995b 100644 --- a/profile.html +++ b/profile.html @@ -1,5 +1,9 @@ <%inherit file="main.html" /> +<%! + import json +%> + + + + +
    % for hw in homeworks:
  1. ${ hw['chapter'] }

    -

    ${ hw['section'] }

    +

    ${hw['format']} - ${ hw['section'] } ${"({0}/{1})".format( hw['section_total'][0], hw['section_total'][1] )}

      % for score in hw['scores']: From ec548fda0a6550b8cbc19a1789a4e8e7ee8f3f77 Mon Sep 17 00:00:00 2001 From: Kyle Fiedler Date: Wed, 1 Feb 2012 16:50:50 -0500 Subject: [PATCH 03/54] Added style for sequence nav and reworked courseware problems --- homework.html | 1 + problem.html | 14 +- problem_ajax.html | 2 +- sass/_base-extends.scss | 5 +- sass/_base.scss | 8 ++ sass/_courseware-sequence-nav.scss | 142 ++++++++++++++++++++ sass/_courseware-video.scss | 5 +- sass/_courseware.scss | 205 ++++++++++++----------------- sass/_layout.scss | 21 +-- sass/_theme.scss | 8 -- sass/application.scss | 6 +- schematicinput.html | 30 +++-- seq_module.html | 19 +-- textinput.html | 28 ++-- video.html | 4 +- 15 files changed, 315 insertions(+), 183 deletions(-) create mode 100644 sass/_courseware-sequence-nav.scss diff --git a/homework.html b/homework.html index 4aae9095e8..058f513280 100644 --- a/homework.html +++ b/homework.html @@ -4,6 +4,7 @@ % for problem in homework['problems']:
    • ${ problem['name'] }

      + ${ problem['html'] }
      diff --git a/problem.html b/problem.html index 67d74cedc8..965f5a9c38 100644 --- a/problem.html +++ b/problem.html @@ -1,23 +1,25 @@

      ${ problem['name'] }

      -

      ${ problem['html'] }

      +
      + ${ problem['html'] }
      % if check_button: - + % endif % if reset_button: - + % endif % if save_button: - + % endif % if answer_available: - + % endif % if explain : - Explanation + Explanation % endif
      +
      diff --git a/problem_ajax.html b/problem_ajax.html index fb8a98c765..7296b362ad 100644 --- a/problem_ajax.html +++ b/problem_ajax.html @@ -1 +1 @@ -
      +
      diff --git a/sass/_base-extends.scss b/sass/_base-extends.scss index de1f917fca..c8c5e4b687 100644 --- a/sass/_base-extends.scss +++ b/sass/_base-extends.scss @@ -39,6 +39,7 @@ .content { @include box-sizing(border-box); + @include box-shadow(inset 0 0 2px 3px #f3f3f3); display: table-cell; padding: lh(); vertical-align: top; @@ -46,8 +47,9 @@ } .sidebar { - @include box-shadow( inset -1px 0 0 #f6f6f6); + @include box-shadow( inset 0 0 0 1px #f6f6f6); @include box-sizing(border-box); + @include border-radius(4px 0 0 4px); background: #e3e3e3; border-right: 1px solid #d3d3d3; display: table-cell; @@ -106,6 +108,7 @@ margin: (-$body-line-height) (-$body-line-height) $body-line-height; font-size: 12px; text-shadow: 0 1px 0 #fff; + @include box-shadow(inset 0 1px 0 #fff, inset 1px 0 0 #fff); @extend .clearfix; a { diff --git a/sass/_base.scss b/sass/_base.scss index a703cf208e..f0e86c7624 100644 --- a/sass/_base.scss +++ b/sass/_base.scss @@ -41,6 +41,14 @@ em { } } +a:link, a:visited { + text-decoration:none; +} + +a:hover { + text-decoration:underline; +} + input[type="submit"], input[type="button"], button { @extend .button; } diff --git a/sass/_courseware-sequence-nav.scss b/sass/_courseware-sequence-nav.scss new file mode 100644 index 0000000000..5a7b971fe2 --- /dev/null +++ b/sass/_courseware-sequence-nav.scss @@ -0,0 +1,142 @@ +nav.sequence-nav { + @extend .topbar; + margin-bottom: $body-line-height; + + ol { + a { + @extend .block-link; + } + + .inactive { + background-repeat: no-repeat; + + &:hover { + background-color: lighten(#F6EFD4, 3%); + } + } + + .visited { + background-color: shade(#F6EFD4, 10%); + background-repeat: no-repeat; + border-color: shade(#F6EFD4, 10%); + + &:hover { + background-color: #F6EFD4; + } + } + + .active { + // @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 20%), inset 1px 0 0 darken(#F6EFD4, 20%)); + @include box-shadow(0 1px 0 #fff); + background-color: #fff; + background-repeat: no-repeat; + + &:hover { + background-color: #fff; + } + } + + li { + border: none; + border-right: 1px solid darken(#F6EFD4, 10%); + @include box-shadow(1px 0 0 #fff); + cursor: pointer; + display: table-cell; + padding: lh(.75); + float: left; + width: 18px; + + //problem + // &.seq_problem_inactive { + // width: 14px; + // background: url('/static/images/problem-icon.png') 13px 13px no-repeat; + // @extend .inactive; + // } + + // &.seq_problem_visited { + // width: 14px; + // background: shade(#F6EFD4, 4%) url('/static/images/problem-icon.png') -57px 13px no-repeat; + // &:hover { + // background-color: #F6EFD4; + // } + // } + + // &.seq_problem_active { + // width: 14px; + // background: #FFFBEB url('/static/images/problem-icon.png') -22px 13px no-repeat; + // @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 20%), inset 1px 0 0 darken(#F6EFD4, 20%)); + + // &:hover { + // background-color: #F6EFD4; + // } + // } + + //video + &.seq_video_inactive { + @extend .inactive; + background-image: url('/static/images/video-icon.png'); + background-position: 13px 15px; + } + + &.seq_video_visited { + @extend .visited; + background-image: url('/static/images/video-icon.png'); + background-position: -81px 15px; + } + + &.seq_video_active { + @extend .active; + background-image: url('/static/images/video-icon.png'); + background-position: -32px 15px; + } + + //vertical + &.seq_vertical_inactive, &.seq_problem_inactive { + background-image: url('/static/images/vertical-icon.png'); + background-position: -82px 15px; + @extend .inactive; + } + + &.seq_vertical_visited, &.seq_problem_visited { + background-image: url('/static/images/vertical-icon.png'); + background-position: 13px 15px; + @extend .visited; + } + + &.seq_vertical_active, &.seq_problem_active { + background-image: url('/static/images/vertical-icon.png'); + background-position: -35px 15px; + @extend .active; + } + + } + } + + ul { + float: right; + margin-right: 1px; + + li { + float: left; + + &.prev, &.next { + @include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%)); + background: darken(#F6EFD4, 5%); + border-left: 1px solid darken(#f6efd4, 20%); + color: darken(#F6EFD4, 80%); + float: right; + letter-spacing: 1px; + padding: lh(.75); + text-transform: uppercase; + cursor: pointer; + + &:hover { + text-decoration: none; + color: darken(#F6EFD4, 60%); + text-decoration: none; + background: none; + } + } + } + } +} diff --git a/sass/_courseware-video.scss b/sass/_courseware-video.scss index 389c23c370..f8067e703c 100644 --- a/sass/_courseware-video.scss +++ b/sass/_courseware-video.scss @@ -132,7 +132,9 @@ section.course-content { font-weight: bold; span { + @include inline-block(); cursor: pointer; + margin-bottom: 0; &:hover { color: $mit-red; @@ -146,7 +148,8 @@ section.course-content { ol.subtitles { float: left; width: flex-grid(3, 9); - min-height: 570px; + height: 530px; + overflow: hidden; li { margin-bottom: 0px; diff --git a/sass/_courseware.scss b/sass/_courseware.scss index 3c59e6e0c8..aae17b46fd 100644 --- a/sass/_courseware.scss +++ b/sass/_courseware.scss @@ -86,146 +86,115 @@ div.course-wrapper { section.course-content { @extend .content; - ol.vert-mod { - > li { - @extend .clearfix; - border-bottom: 1px solid #eee; - padding: 15px 0; + p { + margin-bottom: lh(); - &:last-child { - border-bottom: none; - } - - h2 { - margin-top: 0; - margin-bottom: 15px; - } - - input[type="text"] { - display: inline-block; - margin: 8px 4px 4px 10px; - } + &:empty { + display: none; + margin-bottom: 0; } } - ol.sequence-nav { - margin-bottom: $body-line-height; - @extend .topbar; + .problem-set { + position: relative; + @extend .clearfix; - a { - @extend .block-link; + h2 { + margin-top: 0; + margin-bottom: 15px; + width: flex-grid(2, 9); + padding-right: flex-gutter(9); + border-right: 1px dotted #ccc; + @include box-sizing(border-box); + display: table-cell; + vertical-align: top; + + @media screen and (max-width:910px) { + display: block; + width: auto; + } } - li { - border: none; - cursor: pointer; + section.problem { display: table-cell; - padding: lh(.75); - float: left; + width: flex-grid(7, 9); + padding-left: flex-gutter(9); - //problem - &.seq_problem_inactive { - width: 14px; - background: url('/static/images/problem-icon.png') 13px 13px no-repeat; - @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 10%)); - - &:hover { - background-color: lighten(#F6EFD4, 3%); - } + @media screen and (max-width:910px) { + display: block; + width: auto; } - &.seq_problem_visited { - width: 14px; - background: shade(#F6EFD4, 4%) url('/static/images/problem-icon.png') -57px 13px no-repeat; - &:hover { - background-color: #F6EFD4; + span { + &.unanswered { + @include inline-block(); + background: url('/static/images/unanswered-icon.png') center center no-repeat; + height: 14px; + position: relative; + top: 4px; + width: 14px; + } + + &.correct { + @include inline-block(); + background: url('/static/images/correct-icon.png') center center no-repeat; + height: 20px; + position: relative; + top: 6px; + width: 25px; + } + + &.incorrect { + @include inline-block(); + background: url('/static/images/incorrect-icon.png') center center no-repeat; + height: 20px; + width: 20px; + position: relative; + top: 6px; } } + } - &.seq_problem_active { - width: 14px; - background: #FFFBEB url('/static/images/problem-icon.png') -22px 13px no-repeat; - @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 20%), inset 1px 0 0 darken(#F6EFD4, 20%)); - - &:hover { - background-color: #F6EFD4; - } + div { + > span { + display: block; + margin-bottom: lh(.5); } + } - //video - &.seq_video_inactive { - width: 14px; - background: url('/static/images/video-icon.png') 13px 15px no-repeat; - @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 10%)); + input[type="text"] { + display: inline-block; + } - &:hover { - background-color: lighten(#F6EFD4, 3%); - } - } + center { + display: block; + margin: lh() 0; + border: 1px solid #ccc; + padding: lh(); + } - &.seq_video_visited { - width: 14px; - background: shade(#F6EFD4, 4%) url('/static/images/video-icon.png') -81px 15px no-repeat; - &:hover { - background-color: #F6EFD4; - } - } - - &.seq_video_active { - width: 14px; - background: #FFFBEB url('/static/images/video-icon.png') -32px 15px no-repeat; - @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 20%),inset 1px 0 0 darken(#F6EFD4, 20%)); - &:hover { - background-color: #F6EFD4; - } - } + section.action { + margin-top: lh(); + } + } - //vertical - &.seq_vertical_inactive { - width: 14px; - background: url('/static/images/vertical-icon.png') -82px 15px no-repeat; - @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 10%)); + section.problems-wrapper, div#seq_content { + @extend .problem-set; + } - &:hover { - background-color: lighten(#F6EFD4, 3%); - } - } + ol.vert-mod { + > li { + @extend .clearfix; + @extend .problem-set; + border-bottom: 1px solid #ddd; + margin-bottom: 15px; + padding: 0 0 15px; - &.seq_vertical_visited { - width: 14px; - background: shade(#F6EFD4, 4%) url('/static/images/vertical-icon.png') 13px 15px no-repeat; - &:hover { - background-color: #F6EFD4; - } - } - - &.seq_vertical_active { - width: 14px; - background: #FFFBEB url('/static/images/vertical-icon.png') -35px 15px no-repeat; - @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 20%), inset 1px 0 0 darken(#F6EFD4, 20%)); - - &:hover { - background-color: #F6EFD4; - } - } - - &.prev, &.next { - @include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%)); - background: darken(#F6EFD4, 5%); - border-left: 1px solid darken(#f6efd4, 20%); - color: darken(#F6EFD4, 80%); - float: right; - letter-spacing: 1px; - padding: lh(.75); - text-transform: uppercase; - - &:hover { - text-decoration: none; - color: darken(#F6EFD4, 60%); - text-decoration: none; - background: none; - } + &:last-child { + border-bottom: none; + margin-bottom: 0; + padding-bottom: 0; } } } diff --git a/sass/_layout.scss b/sass/_layout.scss index 2614e3b56c..8867ef5348 100644 --- a/sass/_layout.scss +++ b/sass/_layout.scss @@ -6,7 +6,7 @@ html { font: $body-font-size $body-font-family; text-align: center; margin: 0; - background: #f6f6f6; + background: #f4f4f4; //#f3f1e5 div.header-wrapper { // @include linear-gradient(lighten($mit-red, 5%), darken($mit-red, 5%)); @@ -28,7 +28,7 @@ html { font-size: 20px; font-weight: 800; margin: 0 lh() 0 0; - padding: 17px lh() 17px 0; + padding: 17px lh() 14px 0; text-shadow: 0 1px 0 lighten($mit-red, 10%); line-height: lh(); } @@ -44,16 +44,16 @@ html { h2 { float: left; margin: 0 lh() 0 0; - padding: 19px lh() 12px 0; + padding: 19px lh() 9px 0; line-height: lh(); border-right: 1px solid darken($mit-red, 5%); a { color: #fff; + text-decoration: none; &:hover { color: rgba(#fff, .7); - text-decoration: none; } } } @@ -61,7 +61,7 @@ html { ul { @extend .clearfix; display: inline-block; - padding: 19px 0 12px; + padding: 19px 0 9px; margin: 0; li { @@ -72,6 +72,7 @@ html { a { color: #fff; + text-decoration: none; &:hover { color: rgba(#fff, .7); @@ -88,15 +89,17 @@ html { section.main-content { @extend .clearfix; @extend .wrapper; - @include box-shadow(0 0 4px #ddd); @include box-sizing(border-box); + @include border-radius(4px); + overflow: hidden; background: #fff; border-bottom: 1px solid #bbb; @media screen and (min-width: 1400px) { - margin-top: lh(.5); - @include border-radius(3px); - border: 1px solid #bbb; + // @include border-radius(3px); + @include box-shadow(0 0 4px #dfdfdf); + border: 1px solid #bbb; + margin-top: lh(.5); } } diff --git a/sass/_theme.scss b/sass/_theme.scss index 276bb6a694..31e45ae734 100644 --- a/sass/_theme.scss +++ b/sass/_theme.scss @@ -37,14 +37,6 @@ h3 { clear:both; } -a:link, a:visited { - text-decoration:none; -} - -a:hover { - text-decoration:underline; -} - #wrapper { background: transparent url( images/css/page-vbg.jpg ) repeat-y scroll 50% 0px; margin:0 auto ; diff --git a/sass/application.scss b/sass/application.scss index 6d046c2a6a..ad0298d720 100644 --- a/sass/application.scss +++ b/sass/application.scss @@ -8,7 +8,7 @@ @import "leanmodal"; // pages -@import "courseware", "courseware-video"; +@import "courseware", "courseware-video", "courseware-sequence-nav"; @import "textbook"; @import "profile"; @import "wiki-basic-html", "wiki-create", "wiki"; @@ -17,5 +17,5 @@ @import "askbot-original", "discussion", "discussion-questions", "discussion-tags", "question-view" ; // left over -@import "theme"; -@import "local"; +// @import "theme"; +// @import "local"; diff --git a/schematicinput.html b/schematicinput.html index 8c7f7e0c83..3290de3b44 100644 --- a/schematicinput.html +++ b/schematicinput.html @@ -1,19 +1,23 @@ - - - - - -% if state == 'unsubmitted': + + + + + + + + + % if state == 'unsubmitted': -% elif state == 'correct': + % elif state == 'correct': -% elif state == 'incorrect': + % elif state == 'incorrect': -% elif state == 'incomplete': + % elif state == 'incomplete': -% endif + % endif + diff --git a/seq_module.html b/seq_module.html index 6608344e2f..b011815e68 100644 --- a/seq_module.html +++ b/seq_module.html @@ -1,12 +1,15 @@ -
        +
      +
        + + +
      + diff --git a/textinput.html b/textinput.html index fbe9090df8..1473eadbf2 100644 --- a/textinput.html +++ b/textinput.html @@ -1,13 +1,15 @@ - - - -% if state == 'unsubmitted': - -% elif state == 'correct': - -% elif state == 'incorrect': - -% elif state == 'incomplete': - -% endif - +
      + + + + + % if state == 'unsubmitted': + + % elif state == 'correct': + + % elif state == 'incorrect': + + % elif state == 'incomplete': + + % endif +
      diff --git a/video.html b/video.html index 7e13c80974..d32bbfb49c 100644 --- a/video.html +++ b/video.html @@ -27,7 +27,7 @@
        -
      1. +
      2. @@ -42,5 +42,5 @@
      3. -
      4. +
      From 5db3d4c5aa1dfafba72ae61da40b2af3105e64a7 Mon Sep 17 00:00:00 2001 From: Reda Lemeden Date: Wed, 1 Feb 2012 18:08:27 -0500 Subject: [PATCH 04/54] Re-skinned the top part of the question view --- sass/_discussion-questions.scss | 39 ------- sass/_question-view.scss | 176 +++++++++++++++++++++++++++----- 2 files changed, 150 insertions(+), 65 deletions(-) diff --git a/sass/_discussion-questions.scss b/sass/_discussion-questions.scss index 8c7f04871a..18a4575aa6 100644 --- a/sass/_discussion-questions.scss +++ b/sass/_discussion-questions.scss @@ -153,42 +153,3 @@ div.search-tips { .search-result-summary { } - -div.post-update-info { - @include box-sizing(border-box); - @include border-radius(5px); - background:lighten(#F6EFD4, 5%); - padding: 10px; - - a { - color:$mit-red ; - } - - div.change-date { - font-size: 12px; - margin-bottom: 10px; - } - - div.avatar { - display: inline-block; - float: left; - margin-right: 3px; - - img.gravatar { - background: white; - border: 1px solid darken(#F6EFD4, 10%); - margin-right: 5px; - padding: 3px ; - vertical-align: bottom; - } - } - - div.user-meta { - display: inline-block; - width: 60%; - - span.user-badges { - display: block; - } - } -} diff --git a/sass/_question-view.scss b/sass/_question-view.scss index 4f3cac582f..abbc16669f 100644 --- a/sass/_question-view.scss +++ b/sass/_question-view.scss @@ -2,34 +2,40 @@ div.question-header { div.vote-buttons { display: inline-block; float: left; - width: flex-grid(1,9); margin-right: flex-gutter(9); + width: flex-grid(0.7,9); - ul li { - background-position: center; - background-repeat: no-repeat; - cursor: pointer; - font-weight: bold; - height: 20px; - list-style: none; - padding: 10px; - text-align: center; - width: 25px; + ul { + li { + background-position: center; + background-repeat: no-repeat; + cursor: pointer; + font-weight: bold; + height: 20px; + list-style: none; + padding: 10px; + text-align: center; + width: 70%; - &.question-img-upvote, &.answer-img-upvote { - background-image: url(/static/images/askbot/vote-arrow-up-new.png); - background-color: #F6EFD4; - - &:hover, &.on { - background-image: url(/static/images/askbot/vote-arrow-up-on-new.png); + &.post-vote { + @include border-radius(4px); + background-color: lighten(#F6EFD4, 3%); } - } - &.question-img-downvote, &.answer-img-downvote { - background-image: url(/static/images/askbot/vote-arrow-down-new.png); + &.question-img-upvote, &.answer-img-upvote { + background-image: url(/static/images/askbot/vote-arrow-up.png); - &:hover, &.on { - background-image: url(/static/images/askbot/vote-arrow-down-on-new.png); + &:hover, &.on { + background-color:#d1e3a8; + } + } + + &.question-img-downvote, &.answer-img-downvote { + background-image: url(/static/images/askbot/vote-arrow-down.png); + + &:hover, &.on { + background-color:#eac6ad; + } } } } @@ -38,7 +44,7 @@ div.question-header { div.question-container { display: inline-block; float: left; - width: flex-grid(8,9); + width: flex-grid(8.3,9); h1 { margin-top: 0; @@ -47,9 +53,9 @@ div.question-header { div.meta-bar { border-bottom: 1px solid #eee; display: block; - margin: 20px 0 10px; + margin: 10px 0; overflow: hidden; - padding-bottom: 15px; + padding: 5px 0 10px; div.tag-list { @@ -89,10 +95,128 @@ div.question-header { width: flex-grid(6.2,8); } - div.post-update-info { + div.post-update-container { display: inline-block; float: left; width: flex-grid(1.8,8); + + div.post-update-info { + @include box-sizing(border-box); + @include border-radius(5px); + background:lighten(#F6EFD4, 5%); + padding: 10px; + margin-bottom: 10px; + + &:last-child { + margin-bottom: 0; + } + + &.revision { + text-align: center; + background:lighten(#F6EFD4, 7%); + + a { + color: black; + } + } + + a { + color:$mit-red ; + } + + div.change-date { + font-size: 12px; + margin-bottom: 10px; + } + + div.avatar { + display: inline-block; + float: left; + margin-right: 3px; + + img.gravatar { + background: white; + border: 1px solid darken(#F6EFD4, 10%); + margin-right: 5px; + padding: 3px ; + vertical-align: bottom; + } + } + + div.user-meta { + display: inline-block; + width: 60%; + + span.user-badges { + display: block; + } + } + } + } + } + + div.comments-container { + @include box-sizing(border-box); + background: lighten(#efefef, 3%); + padding: 3%; + display: inline-block; + margin: 15px 0 0; + padding: 3%; + width: 100%; + + div.comments-content { + font-size: 13px; + + div.comment { + border-bottom: 1px solid #ddd; + border-top: 1px solid #fff; + padding: 15px 0; + display: block; + + &:first-child { + border-top: 0; + } + + &:last-child { + margin-bottom: 20px; + } + + div.comment-votes { + display: inline; + + .upvote { + background: #ccc; + display:inline-block; + margin: 0px; + padding-right: 17px; + padding-top: 2px; + height: 20px; + color: #777; + width: 20px; + } + } + + div.comment-delete { + display: inline; + } + + div.comment-body { + } + } + } + + #edit-comment-form { + margin: 10px 0; + min-height: 100px; + width: 99%; + resize: vertical; + } + .counter { + color: #888; + display: block; + float: right; + margin-top: 5px; + text-align: right; } } } From a5f5af3b837f586ccff66b5a27237755caff1730 Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Wed, 1 Feb 2012 21:03:54 -0500 Subject: [PATCH 05/54] Got a basic, working graph of the scores --HG-- branch : profiledev --- profile.html | 69 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 7 deletions(-) diff --git a/profile.html b/profile.html index 3f88a4995b..02be14e4e9 100644 --- a/profile.html +++ b/profile.html @@ -104,29 +104,84 @@ $(function() { + From 5a246d1bd7a0a4d0f41eb476e22ef63d280196ed Mon Sep 17 00:00:00 2001 From: Kyle Fiedler Date: Thu, 2 Feb 2012 11:39:44 -0500 Subject: [PATCH 06/54] add video to mitx_global --- mitx_global.html | 11 +++++++++++ sass/_index.scss | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/mitx_global.html b/mitx_global.html index 9c5ac92f8e..12640b63df 100644 --- a/mitx_global.html +++ b/mitx_global.html @@ -6,10 +6,20 @@
      +

      MITx will offer a portfolio of MIT courses for free to a virtual community of learners around the world. It will also enhance the educational experience of its on-campus students, offering them online tools that supplement and enrich their classroom and laboratory experiences.

      The first MITx course, 6.002x (Circuits and Electronics), will be launched in an experimental prototype form. Watch this space for further upcoming courses, which will become available in Fall 2012.

      + +
      +
      +
      + +
      +
      + +

      MITx courses will be offered on an online learning platform that:

      @@ -22,6 +32,7 @@

      Press & links: Boston Globe, New York Times, MIT Press Release, MITx FAQ

      +
      diff --git a/sass/_index.scss b/sass/_index.scss index f1dd89392f..6fd33f904f 100644 --- a/sass/_index.scss +++ b/sass/_index.scss @@ -237,6 +237,44 @@ section.index-content { } } + &.intro { + section { + margin-bottom: 0; + + &.intro-text { + margin-right: flex-gutter(8); + width: flex-grid(4, 8); + + p { + margin-right: 0; + width: auto; + float: none; + } + } + + &.intro-video { + width: flex-grid(4, 8); + + div.video-wrapper { + position: relative; + padding-bottom: 56.25%; + padding-top: 30px; + height: 0; + overflow: hidden; + width: 100%; + + iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + } + } + } + } + &.features { border-top: 1px solid #E5E5E5; padding-top: lh(); From 2458b52aa9bfffae779227c2c51ed5a63dc577ce Mon Sep 17 00:00:00 2001 From: Kyle Fiedler Date: Thu, 2 Feb 2012 12:16:58 -0500 Subject: [PATCH 07/54] put video in overlay --- mitx_global.html | 11 ++++++----- sass/_index.scss | 18 +++++++----------- sass/_leanmodal.scss | 5 ++++- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/mitx_global.html b/mitx_global.html index 12640b63df..5505b84238 100644 --- a/mitx_global.html +++ b/mitx_global.html @@ -9,17 +9,14 @@

      MITx will offer a portfolio of MIT courses for free to a virtual community of learners around the world. It will also enhance the educational experience of its on-campus students, offering them online tools that supplement and enrich their classroom and laboratory experiences.

      The first MITx course, 6.002x (Circuits and Electronics), will be launched in an experimental prototype form. Watch this space for further upcoming courses, which will become available in Fall 2012.

      -
      +
      -
      - -
      + Watch intro video
      -

      MITx courses will be offered on an online learning platform that:

      @@ -49,6 +46,10 @@

      Taught by Anant Agarwal, with Gerald Sussman and Piotr Mitros, 6.002x (Circuits and Electronics) is an on-line adaption of 6.002, MIT’s first undergraduate analog design course. This prototype course will run, free of charge, for students worldwide from March 1, 2012 through June 8, 2012. Students will be given the opportunity to demonstrate their mastery of the material and earn a certificate from MITx.

      + +
      + +
      + From 1c3f067736a99ce511b175deb04fa71cdafd5a03 Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Thu, 2 Feb 2012 16:08:45 -0500 Subject: [PATCH 12/54] Graph tweaks. --HG-- branch : profiledev --- profile.html | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/profile.html b/profile.html index ca7eb643f7..baded20d6f 100644 --- a/profile.html +++ b/profile.html @@ -103,7 +103,7 @@ $(function() {


      -
      +
      @@ -124,7 +124,14 @@ $(function() { } /* -------------------------------- Grade detail graph -------------------------------- */ - var colors = [$.color.parse("#E8B800"), $.color.parse("#A0CEFA"), $.color.parse("#BD3738"), $.color.parse("#429A2E")]; + //var colors = [$.color.parse("#E8B800"), $.color.parse("#A0CEFA"), $.color.parse("#BD3738"), $.color.parse("#429A2E")]; + //var colors = [$.color.parse("#1B2045"), $.color.parse("#557a00"), $.color.parse("#F5600"), $.color.parse("#FEBA2C")]; + //var colors = [$.color.parse("#E7C856"), $.color.parse("#CD462E"), $.color.parse("#B01732"), $.color.parse("#41192A")]; + var colors = [$.color.parse("#434F5E"), $.color.parse("#BEF731"), $.color.parse("#FB5455"), $.color.parse("#44C4B7")]; + //var colors = [$.color.parse("#147A7D"), $.color.parse("#C0C900"), $.color.parse("#C9005B"), $.color.parse("#FCF9A5")]; + + + var series = []; var ticks = []; //These are the indices and x-axis labels for the data var bottomTicks = []; //Labels on the bottom @@ -234,13 +241,17 @@ $(function() { totalScore = 0.0 %> %for section in grade_summary: + %if section['totalscore']['score'] > 0: series.push({label: "${section['category']}", data: [[${section['totalscore']['score'] * section['weight']}, 1]], - color: colors[${sectionIndex}].toString(), }); + color: colors[${sectionIndex}].toString(), + ##We need at least one to be on xaxis 2 for the second xaxis labels to show up + ${"xaxis: 2" if sectionIndex % 2 == 0 else ""} }); + %endif ticks.push( [${totalWeight + section['weight'] * 0.5}, "${'{} - {:.0%}'.format(section['category'], section['weight'])}" ] ); - markings.push({xaxis: {from: ${totalWeight}, to: ${totalWeight + section['weight']} }, color:colors[${sectionIndex}].scale("a", 0.3).toString() }); + markings.push({xaxis: {from: ${totalWeight}, to: ${totalWeight + section['weight']} }, color:colors[${sectionIndex}].scale("a", 0.6).toString() }); overview_tooltips["${section['category']}"] = [ "${section['totalscore']['summary']}" ]; <% @@ -250,15 +261,12 @@ $(function() { %> %endfor - //Alwasy be sure that one series has the xaxis set to 2, or the second xaxis labels won't show up - series.push({label: "Total", data: [[0.9, 1]], points: {symbol: "cross", show: true, radius: 3}, bars: {show: false}, color: "red", xaxis: 2}); - options = { series: {stack: 0, lines: {show: false, steps: false }, - bars: {show: true, barWidth: 1, align: 'center', horizontal: true, linewidth: 0, fill:1},}, + bars: {show: true, barWidth: 0.8, align: 'center', horizontal: true, linewidth:0, fill:1},}, xaxis: {min: 0.0, max: 1.0}, - yaxis: {min: 0.0, max: 2.0, ticks: []}, + yaxis: {min: 0.0, max: 2.0, labelWidth:50, ticks:[[1.18,"Grade Totals"]], tickLength: 0}, xaxes: [ {ticks: [[0.87, "A 87%"], [0.7, "B 70%"], [0.6, "C 60%"]], position: top}, {ticks: ticks }], grid: { markings: markings, hoverable: true, clickable: true, borderWidth: 1}, @@ -270,7 +278,7 @@ $(function() { //Put the percent on the graph var o = plot.pointOffset({x: ${totalScore}, y: 1 }); - $gradeOverviewGraph.append('
      ${"{:.0%}".format(totalScore)}
      '); + $gradeOverviewGraph.append('
      ${"{:.0%}".format(totalScore)}
      '); $("#grade-overview-graph").bind("plothover", function (event, pos, item) { From 1b0f03d722b4728297bcc5fbc32438697ed39404 Mon Sep 17 00:00:00 2001 From: Kyle Fiedler Date: Thu, 2 Feb 2012 16:32:46 -0500 Subject: [PATCH 13/54] Continued style on profile page --- profile.html | 117 +++++++++++++++++++++++---------------------- sass/_profile.scss | 57 ++++++++++++++++++---- 2 files changed, 108 insertions(+), 66 deletions(-) diff --git a/profile.html b/profile.html index 689bffaa38..1ed517b2a8 100644 --- a/profile.html +++ b/profile.html @@ -1,11 +1,71 @@ <%inherit file="main.html" /> + +<%include file="navigation.html" /> + +
      +
      + +
      +

      Course Progress

      + +
        + % for hw in homeworks: +
      1. +

        ${ hw['chapter'] }

        + +
        +

        ${ hw['section'] }

        + +
          + % for score in hw['scores']: +
        • ${ score[0] }/${ score[1] }
        • + % endfor +
        +
        +
      2. + % endfor +
      +
      + + +
      +
      + - -<%include file="navigation.html" /> - -
      -
      - - -
      -

      Course Progress

      - - - -
        - % for hw in homeworks: -
      1. -

        ${ hw['chapter'] }

        -

        ${ hw['section'] }

        - -
          - % for score in hw['scores']: -
        • ${ score[0] }/${ score[1] }
        • - % endfor -
        -
      2. - % endfor -
      -
      -
      -
      diff --git a/sass/_profile.scss b/sass/_profile.scss index 5ba10ab283..504185b055 100644 --- a/sass/_profile.scss +++ b/sass/_profile.scss @@ -1,20 +1,33 @@ div.profile-wrapper { @extend .table-wrapper; + color: #000; section.user-info { @extend .sidebar; - padding: lh(); + @include border-radius(0px 4px 0px 4px); + border-left: 1px solid #d3d3d3; + border-right: 0; + + h1 { + padding: lh(); + } ul { list-style: none; li { - margin-bottom: lh(.5); + @include transition(); + color: lighten($text-color, 10%); + display: block; + text-decoration: none; + @include box-shadow(0 1px 0 #eee); + padding: 7px lh(); + border-bottom: 1px solid #d3d3d3; } } - div #change_password_pop { - border-top: 1px; + div#change_password_pop { + padding: 7px lh(); } } @@ -23,15 +36,39 @@ div.profile-wrapper { ol { list-style: none; - } - ul { - list-style: none; + > li { + border-bottom: 1px solid #e3e3e3; + padding: lh() 0; + @extend .clearfix; - li { - display: inline-block; - padding-right: 1em; + h2 { + float: left; + padding: 0; + margin: 0; + width: flex-grid(2, 9); + margin-right: flex-gutter(9); + } + + div.scores { + float: left; + width: flex-grid(7, 9); + + h3 { + color: #666; + } + + ul { + list-style: none; + + li { + display: inline-block; + padding-right: 1em; + } + } + } } } + } } From bdde1599c4359c72b4912ee8bbc64e5e5de34b86 Mon Sep 17 00:00:00 2001 From: Kyle Fiedler Date: Thu, 2 Feb 2012 17:09:19 -0500 Subject: [PATCH 14/54] More edits to the profile page --- profile.html | 8 ++++++-- sass/_profile.scss | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/profile.html b/profile.html index 1ed517b2a8..ed3ac70f85 100644 --- a/profile.html +++ b/profile.html @@ -64,8 +64,9 @@ var loc=true; // Activate on clicks? Not if already clicked. var lang=true; $(function() { $("#change_location").click(function() { + $(this).hide(); + log_event("profile", {"type":"location_show", "old":$("#location_sub").text()}); - $("#change-location").hide(); if(loc) { $("#description").html('
      '+ @@ -78,7 +79,8 @@ $(function() { $("#location_sub").html(''+ ''); $("#change_loc_button").click(function() { - $("#change-location").show(); + $("#change_location").show(); + postJSON('/change_setting', {'location':$("#id_loc_text").attr("value")}, function(json) { $("#location_sub").text(json.location); loc=true; @@ -90,6 +92,7 @@ $(function() { }); $("#change_language").click(function() { + $(this).hide(); log_event("profile", {"type":"language_show", "old":$("#language_sub").text()}); if(lang) { @@ -97,6 +100,7 @@ $(function() { $("#language_sub").html(''+ ''); $("#change_lang_button").click(function() { + $("#change_language").show(); postJSON('/change_setting', {'language':$("#id_lang_text").attr("value")}, function(json) { $("#language_sub").text(json.language); lang=true; diff --git a/sass/_profile.scss b/sass/_profile.scss index 504185b055..b383c61a85 100644 --- a/sass/_profile.scss +++ b/sass/_profile.scss @@ -23,11 +23,29 @@ div.profile-wrapper { @include box-shadow(0 1px 0 #eee); padding: 7px lh(); border-bottom: 1px solid #d3d3d3; + + div#location_sub, div#language_sub { + font-weight: bold; + @include inline-block(); + + input { + margin: lh(.5) 0; + } + + &:empty { + padding: 0; + } + } + + div#description { + font-size: 12px; + } } } div#change_password_pop { padding: 7px lh(); + color: #4D4D4D; } } From 8b1b7168188ae3124fee9ab6019f768951095dd6 Mon Sep 17 00:00:00 2001 From: Reda Lemeden Date: Thu, 2 Feb 2012 17:23:12 -0500 Subject: [PATCH 15/54] Redesigned the answer list. Answer controls (edit, delete, etc) still missing. --- sass/_discussion-answers.scss | 45 +++++++++++++++++++++++++++++++++ sass/_discussion-questions.scss | 12 ++++++--- sass/_question-view.scss | 6 ++--- sass/application.scss | 2 +- 4 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 sass/_discussion-answers.scss diff --git a/sass/_discussion-answers.scss b/sass/_discussion-answers.scss new file mode 100644 index 0000000000..12d6500c48 --- /dev/null +++ b/sass/_discussion-answers.scss @@ -0,0 +1,45 @@ +div.answer-controls { + @extend div.question-controls; + display: inline-block; + margin-top: 20px; + margin-bottom: 0; + + div.answer-sort { + @extend div.question-sort; + } + + div.answer-count { + @extend div.question-count; + } +} + +div.answer-block { + @extend div.question-header; + border-top: #ddd 1px solid; + display: inline-block; + float: left; + margin: 20px 0; + padding-top: 20px; + width: 100%; + + img.answer-img-accept { + margin: 10px 0px 10px 16px; + } + div.answer-container { + @extend div.question-container; + + div.answer-content { + @extend div.question-content; + + div.answer-body { + @extend div.question-body; + } + } + } + + div.meta-bar { + div.answer-actions { + @extend div.question-actions; + } + } +} diff --git a/sass/_discussion-questions.scss b/sass/_discussion-questions.scss index 18a4575aa6..4a8704c477 100644 --- a/sass/_discussion-questions.scss +++ b/sass/_discussion-questions.scss @@ -10,7 +10,7 @@ div.question-controls { div.question-count { margin-right: flex-gutter(); - width: flex-grid(5.5,9); + width: flex-grid(5,9); h1 { margin-top: 0; @@ -19,7 +19,7 @@ div.question-controls { div.question-sort { vertical-align: bottom; - width: flex-grid(3.5,9); + width: flex-grid(4,9); nav { @include border-radius(35px); @@ -28,10 +28,14 @@ div.question-controls { float: right; font-size: 16px; margin: 3px 0; - padding: 0 20px; + padding:0px 20px 5px; a { - color: darken(#F6EFD4, 50%); + color: darken(#F6EFD4, 50%); + + &.on span{ + font-weight: bold; + } &:before { content: '|'; diff --git a/sass/_question-view.scss b/sass/_question-view.scss index ff66a8052f..4fca12d2e4 100644 --- a/sass/_question-view.scss +++ b/sass/_question-view.scss @@ -176,9 +176,9 @@ div.question-header { &:first-child { border-top: 0; } - &:only-of-type { - border: 0; - } + // &:only-of-type { + // border: 0; + // } } form.post-comments { diff --git a/sass/application.scss b/sass/application.scss index ad0298d720..9d67161043 100644 --- a/sass/application.scss +++ b/sass/application.scss @@ -14,7 +14,7 @@ @import "wiki-basic-html", "wiki-create", "wiki"; @import "activation"; @import "help"; -@import "askbot-original", "discussion", "discussion-questions", "discussion-tags", "question-view" ; +@import "askbot-original", "discussion", "discussion-questions", "discussion-tags", "question-view" , "discussion-answers"; // left over // @import "theme"; From 621ab8ff94b477093cf9a74091bf9f7e40fe5ff4 Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Thu, 2 Feb 2012 17:33:13 -0500 Subject: [PATCH 16/54] Moved graph code to a seperate file --HG-- branch : profiledev --- profile.html | 331 +++++++++------------------------------------- profile_graphs.js | 202 ++++++++++++++++++++++++++++ 2 files changed, 267 insertions(+), 266 deletions(-) create mode 100644 profile_graphs.js diff --git a/profile.html b/profile.html index baded20d6f..186aba9625 100644 --- a/profile.html +++ b/profile.html @@ -1,70 +1,78 @@ <%inherit file="main.html" /> -<%! - import json -%> +<%block name="headextra"> + - if(lang) { - lang=false; - $("#language_sub").html(''+ - ''); - $("#change_lang_button").click(function() { - postJSON('/change_setting', {'language':$("#id_lang_text").attr("value")}, function(json) { - $("#language_sub").text(json.language); - lang=true; - $("#description").html(""); - log_event("profile", {"type":"language_change", "new":json.language}); - }); - }); - } - }); + + + + + + - $('#change_password').click(function(){ - $('.modal').trigger('click'); - log_event("profile", {"type":"password_show"}); - }); - $('#pwd_reset_button').click(function() { - $.post('/password_reset/',{ "csrfmiddlewaretoken" : "${ csrf }", - "email" : $('#id_email').val()}, function(data){ - $('#pwd_reset').html(data); - log_event("profile", {"type":"password_send"}); - }); - }); -}); - - <%include file="navigation.html" /> @@ -101,216 +109,7 @@ $(function() {

      Course Progress

      -
      -
      -
      - - - - - - + diff --git a/profile_graphs.js b/profile_graphs.js new file mode 100644 index 0000000000..3de53d2c33 --- /dev/null +++ b/profile_graphs.js @@ -0,0 +1,202 @@ +<%! + import json +%> + +$(function () { + function showTooltip(x, y, contents) { + $('
      ' + contents + '
      ').css( { + position: 'absolute', + display: 'none', + top: y + 5, + left: x + 5, + border: '1px solid #fdd', + padding: '2px', + 'background-color': '#fee', + opacity: 0.90 + }).appendTo("body").fadeIn(200); + } + + /* -------------------------------- Grade detail graph -------------------------------- */ + var colors = [$.color.parse("#E8B800"), $.color.parse("#A0CEFA"), $.color.parse("#BD3738"), $.color.parse("#429A2E")]; + //var colors = [$.color.parse("#1B2045"), $.color.parse("#557a00"), $.color.parse("#F5600"), $.color.parse("#FEBA2C")]; + //var colors = [$.color.parse("#E7C856"), $.color.parse("#CD462E"), $.color.parse("#B01732"), $.color.parse("#41192A")]; + //var colors = [$.color.parse("#434F5E"), $.color.parse("#BEF731"), $.color.parse("#FB5455"), $.color.parse("#44C4B7")]; + //var colors = [$.color.parse("#147A7D"), $.color.parse("#C0C900"), $.color.parse("#C9005B"), $.color.parse("#FCF9A5")]; + + + + var series = []; + var ticks = []; //These are the indices and x-axis labels for the data + var bottomTicks = []; //Labels on the bottom + var detail_tooltips = {}; //This an dictionary mapping from 'section' -> array of detail_tooltips + var droppedScores = []; //These are the datapoints to indicate assignments which aren't factored into the total score + detail_tooltips['Dropped Scores'] = []; + <% + tickIndex = 1 + sectionSpacer = 0.5 + sectionIndex = 0 + %> + %for section in grade_summary: + %if 'subscores' in section: ##This is for sections like labs or homeworks, with several smaller components and a total + series.push({label: "${section['category']}", + data: ${ json.dumps( [[i + tickIndex, score['percentage']] for i,score in enumerate(section['subscores'])] ) }, + color: colors[${sectionIndex}].toString(), + }); + ticks = ticks.concat( ${ json.dumps( [[i + tickIndex, str(i + 1)] for i,score in enumerate(section['subscores'])] ) } ); + bottomTicks.push( [ ${tickIndex + len(section['subscores'])/2}, "${section['category']}" ] ); + detail_tooltips["${section['category']}"] = ${ json.dumps([score['summary'] for score in section['subscores']] ) }; + + droppedScores = droppedScores.concat(${ json.dumps( [[tickIndex + index, 0.05] for index in section['dropped_indices']]) }); + <% dropExplanation = "The lowest {} {} scores are dropped".format( len(section['dropped_indices']), section['category'] ) %> + detail_tooltips['Dropped Scores'] = detail_tooltips['Dropped Scores'].concat( ${json.dumps( [dropExplanation] * len(section['dropped_indices']) )} ); + + <% tickIndex += len(section['subscores']) + sectionSpacer %> + + ##Now put on the aggregate score + series.push({label: "${section['category']} Total", + data: [[${tickIndex}, ${section['totalscore']['score']}]], + color: colors[${sectionIndex}].toString(), + }); + ticks = ticks.concat( [ [${tickIndex}, "Total"] ] ); + detail_tooltips["${section['category']} Total"] = [ "${section['totalscore']['summary']}" ]; + <% tickIndex += 1 + sectionSpacer %> + + %else: ##This is for sections like midterm or final, which have no smaller components + series.push({label: "${section['category']}", + data: [[${tickIndex}, ${section['totalscore']['score']}]], + color: colors[${sectionIndex}].toString(), + }); + %if section['category'] == "Midterm": + bottomTicks = bottomTicks.concat( [ [${tickIndex}, "${section['category']}"] ] ); + %else: + ticks = ticks.concat( [ [${tickIndex}, "${section['category']}"] ] ); + %endif + + detail_tooltips["${section['category']}"] = [ "${section['totalscore']['summary']}" ]; + + <% tickIndex += 1 + sectionSpacer %> + %endif + <%sectionIndex += 1 %> + %endfor + + //Alwasy be sure that one series has the xaxis set to 2, or the second xaxis labels won't show up + series.push( {label: 'Dropped Scores', data: droppedScores, points: {symbol: "cross", show: true, radius: 3}, bars: {show: false}, color: "red", xaxis: 2} ); + + var options = { + series: {lines: {show: false, steps: false }, + bars: {show: true, barWidth: 0.6, align: 'center', lineWidth: 1},}, + xaxis: {tickLength: 0, min: 0.0, max: ${tickIndex - sectionSpacer}}, + xaxes: [{ticks: ticks}, {ticks: bottomTicks}], + yaxis: {ticks: [[1, "100%"], [0.87, "A 87%"], [0.7, "B 70%"], [0.6, "C 60%"], [0, "0%"]], min: 0.0, max: 1.0, labelWidth: 50}, + grid: { hoverable: true, clickable: true, borderWidth: 1, + markings: [ {yaxis: {from: 0.87, to: 1 }, color: "#EBFFD5"}, {yaxis: {from: 0.7, to: 0.87 }, color: "#E6FFFF"}, + {yaxis: {from: 0.6, to: 0.7 }, color: "#FFF2E3"}, ] }, + legend: {show: false}, + }; + + $.plot($("#grade-detail-graph"), series, options); + + var previousPoint = null; + $("#grade-detail-graph").bind("plothover", function (event, pos, item) { + $("#x").text(pos.x.toFixed(2)); + $("#y").text(pos.y.toFixed(2)); + if (item) { + if (previousPoint != item.dataIndex) { + previousPoint = item.dataIndex; + + $("#tooltip").remove(); + + if (item.series.label in detail_tooltips) { + var series_tooltips = detail_tooltips[item.series.label]; + if (item.dataIndex < series_tooltips.length) { + var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2); + + showTooltip(item.pageX, item.pageY, series_tooltips[item.dataIndex]); + } + } + + } + } else { + $("#tooltip").remove(); + previousPoint = null; + } + }); + + + /* ------------------------------- Grade overview graph ------------------------------- */ + series = []; + ticks = []; + var markings = []; + var overview_tooltips = {}; + <% + totalWeight = 0.0 + sectionIndex = 0 + totalScore = 0.0 + %> + %for section in grade_summary: + %if section['totalscore']['score'] > 0: + series.push({label: "${section['category']}", + data: [[${section['totalscore']['score'] * section['weight']}, 1]], + color: colors[${sectionIndex}].toString(), + ##We need at least one to be on xaxis 2 for the second xaxis labels to show up + ${"xaxis: 2" if sectionIndex % 2 == 0 else ""} }); + %endif + + ticks.push( [${totalWeight + section['weight'] * 0.5}, "${'{} - {:.0%}'.format(section['category'], section['weight'])}" ] ); + + markings.push({xaxis: {from: ${totalWeight}, to: ${totalWeight + section['weight']} }, color:colors[${sectionIndex}].scale("a", 0.6).toString() }); + + overview_tooltips["${section['category']}"] = [ "${section['totalscore']['summary']}" ]; + <% + sectionIndex += 1 + totalWeight += section['weight'] + totalScore += section['totalscore']['score'] * section['weight'] + %> + %endfor + + options = { + series: {stack: 0, + lines: {show: false, steps: false }, + bars: {show: true, barWidth: 0.8, align: 'center', horizontal: true, linewidth:0, fill:1},}, + xaxis: {min: 0.0, max: 1.0}, + yaxis: {min: 0.0, max: 2.0, labelWidth:50, ticks:[[1.18,"Grade Totals"]], tickLength: 0}, + xaxes: [ {ticks: [[0.87, "A 87%"], [0.7, "B 70%"], [0.6, "C 60%"]], position: top}, + {ticks: ticks }], + grid: { markings: markings, hoverable: true, clickable: true, borderWidth: 1}, + legend: {show: false}, + }; + + var $gradeOverviewGraph = $("#grade-overview-graph"); + var plot = $.plot($gradeOverviewGraph, series, options); + + //Put the percent on the graph + var o = plot.pointOffset({x: ${totalScore}, y: 1 }); + $gradeOverviewGraph.append('
      ${"{:.0%}".format(totalScore)}
      '); + + + $("#grade-overview-graph").bind("plothover", function (event, pos, item) { + $("#x").text(pos.x.toFixed(2)); + $("#y").text(pos.y.toFixed(2)); + if (item) { + if (previousPoint != (item.dataIndex, item.seriesIndex)) { + previousPoint = (item.dataIndex, item.seriesIndex); + + $("#tooltip").remove(); + + if (item.series.label in overview_tooltips) { + var series_tooltips = overview_tooltips[item.series.label]; + if (item.dataIndex < series_tooltips.length) { + var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2); + + showTooltip(item.pageX, item.pageY, series_tooltips[item.dataIndex]); + } + } + + } + } else { + $("#tooltip").remove(); + previousPoint = null; + } + }); + +}); From 5bc671e40f33768a8627ffab74d8656f656a845e Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Thu, 2 Feb 2012 17:53:34 -0500 Subject: [PATCH 17/54] Added section totals to profile page --HG-- branch : profiledev --- profile.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profile.html b/profile.html index 13e98c1c9e..45b6dfcc2b 100644 --- a/profile.html +++ b/profile.html @@ -94,7 +94,7 @@ $(function() {

      ${ hw['chapter'] }

      -

      ${ hw['section'] }

      +

      ${ hw['section'] } ${"({0}/{1})".format( hw['section_total'][0], hw['section_total'][1] )}

        % for score in hw['scores']: From ff6f7a5287f73c6415a563514ea65df24555c0ca Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Thu, 2 Feb 2012 17:57:00 -0500 Subject: [PATCH 18/54] Changed flot to min library. IMPORTANT: UPDATE 3RD PARTY --HG-- branch : profiledev --- profile.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profile.html b/profile.html index 45b6dfcc2b..c7b922a378 100644 --- a/profile.html +++ b/profile.html @@ -1,7 +1,7 @@ <%inherit file="main.html" /> <%block name="headextra"> - + -<%include file="navigation.html" /> +<%include file="navigation.html" args="active_page='courseware'" />
        diff --git a/info.html b/info.html index 5867feb021..f6f59462b4 100644 --- a/info.html +++ b/info.html @@ -1,6 +1,6 @@ <%inherit file="main.html" /> -<%include file="navigation.html" /> +<%include file="navigation.html" args="active_page='info'" />
        diff --git a/navigation.html b/navigation.html index 278a560af9..b639dc5b28 100644 --- a/navigation.html +++ b/navigation.html @@ -1,17 +1,18 @@ +<%page args="active_page" />

        MITx

        -
        diff --git a/profile.html b/profile.html index 689bffaa38..7ba5dd6d8c 100644 --- a/profile.html +++ b/profile.html @@ -62,7 +62,7 @@ $(function() { -<%include file="navigation.html" /> +<%include file="navigation.html" args="active_page='profile'" />
        diff --git a/simplewiki_base.html b/simplewiki_base.html index f73c63218e..731f5be8d9 100644 --- a/simplewiki_base.html +++ b/simplewiki_base.html @@ -73,7 +73,7 @@ <%block name="wiki_head"/> -<%include file="navigation.html" /> +<%include file="navigation.html" args="active_page='wiki'" />
        diff --git a/staticbook.html b/staticbook.html index 46348a1441..a9afbede22 100644 --- a/staticbook.html +++ b/staticbook.html @@ -34,7 +34,7 @@ function next_page() { } -<%include file="navigation.html" /> +<%include file="navigation.html" args="active_page='book'" />
        From d5aa7532de789928fd833dfa1486fb526b576e8b Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Fri, 3 Feb 2012 14:53:53 -0500 Subject: [PATCH 20/54] Fixed graph bug that threw error if div didn't exist. --- profile_graphs.js | 55 +++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/profile_graphs.js b/profile_graphs.js index 3de53d2c33..66d5576267 100644 --- a/profile_graphs.js +++ b/profile_graphs.js @@ -93,8 +93,10 @@ $(function () { {yaxis: {from: 0.6, to: 0.7 }, color: "#FFF2E3"}, ] }, legend: {show: false}, }; - - $.plot($("#grade-detail-graph"), series, options); + + if ($("#grade-detail-graph").length > 0) { + $.plot($("#grade-detail-graph"), series, options); + } var previousPoint = null; $("#grade-detail-graph").bind("plothover", function (event, pos, item) { @@ -167,36 +169,37 @@ $(function () { }; var $gradeOverviewGraph = $("#grade-overview-graph"); - var plot = $.plot($gradeOverviewGraph, series, options); - - //Put the percent on the graph - var o = plot.pointOffset({x: ${totalScore}, y: 1 }); - $gradeOverviewGraph.append('
        ${"{:.0%}".format(totalScore)}
        '); + if ($gradeOverviewGraph.length > 0) { + var plot = $.plot($gradeOverviewGraph, series, options); + + //Put the percent on the graph + var o = plot.pointOffset({x: ${totalScore}, y: 1 }); + $gradeOverviewGraph.append('
        ${"{:.0%}".format(totalScore)}
        '); - $("#grade-overview-graph").bind("plothover", function (event, pos, item) { - $("#x").text(pos.x.toFixed(2)); - $("#y").text(pos.y.toFixed(2)); - if (item) { - if (previousPoint != (item.dataIndex, item.seriesIndex)) { - previousPoint = (item.dataIndex, item.seriesIndex); + $gradeOverviewGraph.bind("plothover", function (event, pos, item) { + $("#x").text(pos.x.toFixed(2)); + $("#y").text(pos.y.toFixed(2)); + if (item) { + if (previousPoint != (item.dataIndex, item.seriesIndex)) { + previousPoint = (item.dataIndex, item.seriesIndex); - $("#tooltip").remove(); + $("#tooltip").remove(); - if (item.series.label in overview_tooltips) { - var series_tooltips = overview_tooltips[item.series.label]; - if (item.dataIndex < series_tooltips.length) { - var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2); + if (item.series.label in overview_tooltips) { + var series_tooltips = overview_tooltips[item.series.label]; + if (item.dataIndex < series_tooltips.length) { + var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2); - showTooltip(item.pageX, item.pageY, series_tooltips[item.dataIndex]); + showTooltip(item.pageX, item.pageY, series_tooltips[item.dataIndex]); + } } - } + } + } else { + $("#tooltip").remove(); + previousPoint = null; } - } else { - $("#tooltip").remove(); - previousPoint = null; - } - }); - + }); + } }); From bd9cc58e37a37b3f8294ee8f12d515a9b9bad1fd Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Fri, 3 Feb 2012 16:17:14 -0500 Subject: [PATCH 21/54] Killed parallel --- main.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.html b/main.html index 1004f27740..2e1c0ff3cd 100644 --- a/main.html +++ b/main.html @@ -74,7 +74,7 @@

        Supported suffixes: %kMGTcmunp

        -

        Supported operations: ^ * / + - || ()

        +

        Supported operations: ^ * / + - ()

        @@ -86,16 +90,27 @@ $(function() {

        Course Progress

        - - +
        +
          + <% + lastChapter = None + %> % for hw in homeworks:
        1. -

          ${ hw['chapter'] }

          + %if hw['chapter'] != lastChapter: +

          + ${ hw['chapter'] }

          + <% lastChapter = hw['chapter'] %> + %else: +

          -

          + %endif
          -

          ${ hw['section'] } ${"({0}/{1})".format( hw['section_total'][0], hw['section_total'][1] )}

          - +

          + ${ hw['section'] } ${"({0}/{1})".format( hw['section_total'][0], hw['section_total'][1] )}

          + +
            % for score in hw['scores']:
          • ${ score[0] }/${ score[1] }
          • From 9c94ef9c685fd3462fa2226f618ed0e9b3288489 Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Fri, 3 Feb 2012 17:04:59 -0500 Subject: [PATCH 24/54] Removed course overview graph, (course detail graph still remains). --- profile.html | 3 +- profile_graphs.js | 79 ----------------------------------------------- 2 files changed, 1 insertion(+), 81 deletions(-) diff --git a/profile.html b/profile.html index 3a9646614c..343a6b98e4 100644 --- a/profile.html +++ b/profile.html @@ -90,8 +90,7 @@ $(function() {

            Course Progress

            -
            - +
              <% lastChapter = None diff --git a/profile_graphs.js b/profile_graphs.js index 66d5576267..18a6928eab 100644 --- a/profile_graphs.js +++ b/profile_graphs.js @@ -123,83 +123,4 @@ $(function () { previousPoint = null; } }); - - - /* ------------------------------- Grade overview graph ------------------------------- */ - series = []; - ticks = []; - var markings = []; - var overview_tooltips = {}; - <% - totalWeight = 0.0 - sectionIndex = 0 - totalScore = 0.0 - %> - %for section in grade_summary: - %if section['totalscore']['score'] > 0: - series.push({label: "${section['category']}", - data: [[${section['totalscore']['score'] * section['weight']}, 1]], - color: colors[${sectionIndex}].toString(), - ##We need at least one to be on xaxis 2 for the second xaxis labels to show up - ${"xaxis: 2" if sectionIndex % 2 == 0 else ""} }); - %endif - - ticks.push( [${totalWeight + section['weight'] * 0.5}, "${'{} - {:.0%}'.format(section['category'], section['weight'])}" ] ); - - markings.push({xaxis: {from: ${totalWeight}, to: ${totalWeight + section['weight']} }, color:colors[${sectionIndex}].scale("a", 0.6).toString() }); - - overview_tooltips["${section['category']}"] = [ "${section['totalscore']['summary']}" ]; - <% - sectionIndex += 1 - totalWeight += section['weight'] - totalScore += section['totalscore']['score'] * section['weight'] - %> - %endfor - - options = { - series: {stack: 0, - lines: {show: false, steps: false }, - bars: {show: true, barWidth: 0.8, align: 'center', horizontal: true, linewidth:0, fill:1},}, - xaxis: {min: 0.0, max: 1.0}, - yaxis: {min: 0.0, max: 2.0, labelWidth:50, ticks:[[1.18,"Grade Totals"]], tickLength: 0}, - xaxes: [ {ticks: [[0.87, "A 87%"], [0.7, "B 70%"], [0.6, "C 60%"]], position: top}, - {ticks: ticks }], - grid: { markings: markings, hoverable: true, clickable: true, borderWidth: 1}, - legend: {show: false}, - }; - - var $gradeOverviewGraph = $("#grade-overview-graph"); - if ($gradeOverviewGraph.length > 0) { - var plot = $.plot($gradeOverviewGraph, series, options); - - //Put the percent on the graph - var o = plot.pointOffset({x: ${totalScore}, y: 1 }); - $gradeOverviewGraph.append('
              ${"{:.0%}".format(totalScore)}
              '); - - - $gradeOverviewGraph.bind("plothover", function (event, pos, item) { - $("#x").text(pos.x.toFixed(2)); - $("#y").text(pos.y.toFixed(2)); - if (item) { - if (previousPoint != (item.dataIndex, item.seriesIndex)) { - previousPoint = (item.dataIndex, item.seriesIndex); - - $("#tooltip").remove(); - - if (item.series.label in overview_tooltips) { - var series_tooltips = overview_tooltips[item.series.label]; - if (item.dataIndex < series_tooltips.length) { - var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2); - - showTooltip(item.pageX, item.pageY, series_tooltips[item.dataIndex]); - } - } - - } - } else { - $("#tooltip").remove(); - previousPoint = null; - } - }); - } }); From eb31a163fac8b4b69e467e237f76894daaaf2521 Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Fri, 3 Feb 2012 17:17:04 -0500 Subject: [PATCH 25/54] Added percentages to sections in profile --- profile.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/profile.html b/profile.html index 343a6b98e4..cd933d1836 100644 --- a/profile.html +++ b/profile.html @@ -107,10 +107,17 @@ $(function() {

              - ${ hw['section'] } ${"({0}/{1})".format( hw['section_total'][0], hw['section_total'][1] )}

              - + <% + earned = hw['section_total'][0] + total = hw['section_total'][1] + percentageString = "{:.0%}".format( float(earned)/total) if earned > 0 else "" + %> + ${ hw['section'] } ${"({}/{}) {}".format( earned, total, percentageString )}
                + %if len(hw['scores']) > 0: + Problem Scores: + %endif % for score in hw['scores']:
              • ${ score[0] }/${ score[1] }
              • % endfor From 893dde182a333f70f7e7a9b4955c12045c4eb315 Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Fri, 3 Feb 2012 18:36:45 -0500 Subject: [PATCH 26/54] Legal, calculator --- main.html | 13 +++- privacy.html | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++- tos.html | 160 +++++++++++++++++++++----------------------- 3 files changed, 271 insertions(+), 86 deletions(-) diff --git a/main.html b/main.html index 2e1c0ff3cd..dacab60abb 100644 --- a/main.html +++ b/main.html @@ -73,8 +73,17 @@ -

                Supported suffixes: %kMGTcmunp

                -

                Supported operations: ^ * / + - ()

                + + + + + +
                Suffixes :  %kMGTcmunp
                Operations :  ^ * / + - ()
                Functions :  sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs
                Constants :  e