diff --git a/ubcpi/static/html/ubcpi.html b/ubcpi/static/html/ubcpi.html index 8e98d86..6564257 100644 --- a/ubcpi/static/html/ubcpi.html +++ b/ubcpi/static/html/ubcpi.html @@ -161,6 +161,7 @@

Correct Student Rationale"{{rc.rationale_revised}}" +

See how your classmates answered below

@@ -169,17 +170,16 @@

Correct
+

Class Breakdown

This is a look at how your classmates answered the question during the initial and final rounds.

- +

Answer Options

-

Answer Options

-

{{option.image_alt}} - Option {{$index + 1}} (Correct answer) + Option {{$index + 1}} (Correct answer) {{option.text}} {{option.text}} @@ -189,12 +189,14 @@

Answer Options

- +

Initial Answer Selection

+

Original Answer

+

Final Answer Selection

Revised Answer

diff --git a/ubcpi/static/js/spec/ubcpi-barchar-directive_spec.js b/ubcpi/static/js/spec/ubcpi-barchar-directive_spec.js index a7e011f..5039542 100644 --- a/ubcpi/static/js/spec/ubcpi-barchar-directive_spec.js +++ b/ubcpi/static/js/spec/ubcpi-barchar-directive_spec.js @@ -77,7 +77,7 @@ describe('UBCPI', function () { it('should mark the correct answer label', function () { expect(element.find('g.axis').eq(0).find('text').eq(correct).text()) - .toBe('Option ' + (correct + 1) + '(correct)'); + .toBe('Option ' + (correct + 1) + ' (correct)'); }); it('should calculate percentage correctly', function() { diff --git a/ubcpi/static/js/src/d3-pibar.js b/ubcpi/static/js/src/d3-pibar.js index e7fc9db..c753160 100644 --- a/ubcpi/static/js/src/d3-pibar.js +++ b/ubcpi/static/js/src/d3-pibar.js @@ -72,6 +72,7 @@ d3.custom.barChart = function(scope) { svg.append("g") .attr("class", "x axis") .attr("transform", "translate(0," + height + ")") + .style("font-style", function(d) { return "italic";}) .call(xAxis); svg.append("g") @@ -81,8 +82,7 @@ d3.custom.barChart = function(scope) { .attr("transform", "rotate(-90)") .attr("y", 6) .attr("dy", ".71em") - .style("text-anchor", "end") - .text("Frequency"); + .style("text-anchor", "end"); var bars = svg.selectAll(".ubcpibar") .data(data) @@ -120,12 +120,13 @@ d3.custom.barChart = function(scope) { return "1.25em"; }) - .attr("dx", (x.rangeBand() / 2) - 15 + "px") + .attr("dx", (x.rangeBand() / 2) - 25 + "px") .text(function (d) { var percentage = (d.frequency / totalFreq) * 100; var rounded = Math.round(percentage * 10) / 10; return rounded.toFixed(1) + '%'; - }); + }) + .style("font-weight", function(d) { return "bold";}); }); } diff --git a/ubcpi/static/js/src/ubcpi-barchart-directive.js b/ubcpi/static/js/src/ubcpi-barchart-directive.js index d4d2f9c..cd707bf 100644 --- a/ubcpi/static/js/src/ubcpi-barchart-directive.js +++ b/ubcpi/static/js/src/ubcpi-barchart-directive.js @@ -22,7 +22,7 @@ angular.module('UBCPI'). for (var i = 0; i < scope.options.length; i++) { data.push({ frequency: i in stats ? stats[i] : 0, - label: 'Option ' + (i + 1) + (scope.correct == i ? '(correct)' : ''), + label: 'Option ' + (i + 1) + (scope.correct == i ? ' (correct)' : ''), class: 'ubcpibar' + (scope.correct == i ? ' correct-answer' : '') }); }