Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ta-activity-stats' of https://github.com/finnergizer/Ma…
- Loading branch information
Showing
21 changed files
with
253 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
<p class="grader_distribution"><%= I18n.t(:grader_distribution ) %></p> | ||
|
||
<% if assignment.tas.empty? %> | ||
<%= link_to I18n.t(:assign_graders), | ||
<p class="grader_distribution"><%= t(:grader_distribution) %>:</p> | ||
<%= link_to t(:assign_graders), | ||
assignment_graders_path(assignment) %> | ||
<% else %> | ||
<ul> | ||
<% assignment.tas.each do |ta| %> | ||
<li><%= "#{ta.first_name} #{ta.last_name}" %> | ||
(<%= t('browse_submissions.how_many_marked', | ||
num_marked: ta.get_num_marked(assignment), | ||
num_assigned: ta.get_num_assigned(assignment)) %>) | ||
</li> | ||
<% end %> | ||
</ul> | ||
<p class="grader_distribution"><%= t(:grader_distribution) %> | ||
(<%= link_to t('graders.all_graders'), { controller: 'graders', | ||
action: 'grader_summary', | ||
assignment_id: assignment.id } | ||
%>):</p> | ||
<div id="grader-right"> | ||
<ul> | ||
<% assignment.tas.each do |ta| %> | ||
<li> | ||
<%= link_to "#{ta.first_name} #{ta.last_name}", | ||
{ controller: 'tas', action: 'refresh_graph', id: ta.id, | ||
assignment: assignment.id }, | ||
remote: true %> | ||
(<%= t('browse_submissions.how_many_marked_short', | ||
num_marked: assignment.get_num_marked(ta.id), | ||
num_assigned: assignment.get_num_assigned(ta.id)) %>) | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
document.getElementById('assignment_summaries').innerHTML = | ||
"<%= escape_javascript(render partial: 'assignment_summary', | ||
locals: { assignment: @assignment }).html_safe %>"; | ||
locals: { assignment: @assignment, ta: @current_ta}).html_safe %>"; | ||
|
||
jQuery('#assignment_<%= @assignment.id %>_graph').html( | ||
"<%= escape_javascript(render partial: 'grade_distribution_graph', | ||
locals: { assignment: @assignment }) %>"); | ||
|
||
jQuery('#assignment_<%= @assignment.id %>_ta_graph').html( | ||
"<%= escape_javascript(render partial: 'graders/ta_grade_distribution_graph', | ||
locals: { assignment: @assignment, ta: @current_ta }) %>"); | ||
|
||
jQuery('a[data-id]').removeClass('link_disabled'); | ||
|
||
jQuery('a[data-id="<%= @assignment.short_identifier %>"]').addClass('link_disabled'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<% unless ta.nil? %> | ||
<h3><%= ta.first_name + ' ' + ta.last_name%></h3> | ||
<div> | ||
(<%= t('browse_submissions.how_many_marked', | ||
num_marked: assignment.get_num_marked(ta.id), | ||
num_assigned: assignment.get_num_assigned(ta.id)) %>) | ||
</div> | ||
<canvas id='a<%= assignment.id %>_ta_<%= ta.id %>' width='400' height='350'></canvas> | ||
<script> | ||
//<![CDATA[ | ||
// Set up graph | ||
var ctx = document.getElementById('a<%= assignment.id %>_ta_<%= ta.id %>').getContext('2d'); | ||
|
||
// Set up data | ||
var data = { | ||
labels: ['0% - 5%', '6% - 10%', '11% - 15%', '16% - 20%', '21% - 25%', '26% - 30%', '31% - 35%', '36% - 40%', '41% - 45%', '46% - 50%', '51% - 55%', '56% - 60%', '61% - 65%', '66% - 70%', '71% - 75%', '76% - 80%', '81% - 85%', '86% - 90%', '91% - 95%', '96% - 100%'], | ||
datasets: [{ | ||
fillColor: 'rgba(151,187,205,0.5)', | ||
strokeColor: 'rgba(151,187,205,1)', | ||
data: <%= ta.grade_distribution_array(assignment,20) %> | ||
}] | ||
}; | ||
|
||
var options = { | ||
scaleLineWidth: 2, | ||
barStrokeWidth: 1, | ||
barValueSpacing: 2, | ||
scaleLabel: ' <%%=value%>' | ||
}; | ||
|
||
// Draw it | ||
new Chart(ctx).Bar(data, options); | ||
//]]> | ||
</script> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<% content_for :head do %> | ||
<%= javascript_include_tag 'Chart' %> | ||
<% end %> | ||
|
||
<div class='title_bar'> | ||
<h1> | ||
<%= t(:assignment_link, | ||
short_id: @assignment.short_identifier, | ||
description: @assignment.description) %> - | ||
<%= t(:grader_distribution) %> | ||
</h1> | ||
</div> | ||
<div class='wrapper'> | ||
<div id='section'> | ||
<div class='grader-summary-content'> | ||
<% @assignment.tas.each do |ta| %> | ||
<div class='grader-summary-graph'> | ||
<div id='assignment_<%= @assignment.id %>_ta_<% ta.id %>_graph'> | ||
<%= render partial: 'graders/ta_grade_distribution_graph', | ||
locals: { assignment: @assignment, ta: ta } %> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
jQuery('#assignment_<%= @assignment.id %>_ta_graph').html( | ||
"<%= escape_javascript(render partial: 'graders/ta_grade_distribution_graph', | ||
locals: { assignment: @assignment, | ||
ta: @current_ta }) %>"); |
Oops, something went wrong.