Skip to content

Commit

Permalink
Public comments are now visible in assignment pages. Related #72
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.wp-plugins.org/buddypress-courseware/trunk@498793 b8457f37-d9ea-0310-8a92-e5e31aec5664
  • Loading branch information
sushkov committed Feb 1, 2012
1 parent 30da0ac commit beaecc5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
4 changes: 2 additions & 2 deletions gradebook/gradebook.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ function load_grades( $gradebook_id, $parse = false ) {
}

/**
* load_grades_by_user_id( $assignment, $user_id )
* load_grade_by_user_id( $assignment, $user_id )
*
* Loads all the grades for a given assignment by user id
* Loads all the grade for a given assignment by user id
*
* @param Int $assignment the ID of the assignment gradeboodk to load
* @param Int $user_id, the id of the user
Expand Down
30 changes: 19 additions & 11 deletions groups/templates/single_assignment.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,24 @@
</li>
<?php endif; ?>
<?php if( isset( $user_grade ) ): ?>
<li id="assignment-grade">
<?php _e( 'Your Grade:', 'bpsp' ); ?>
<strong>
<?php if( !empty( $user_grade['format'] ) && 'percentage' == $user_grade['format'] ): ?>
<?php echo $user_grade['value']; ?>%
<?php else: ?>
<?php echo $user_grade['value']; ?>
<?php endif; ?>
</strong>
</li>
<li id="assignment-grade">
<?php _e( 'Your Grade:', 'bpsp' ); ?>
<strong>
<?php if( !empty( $user_grade['format'] ) && 'percentage' == $user_grade['format'] ): ?>
<?php echo $user_grade['value']; ?>%
<?php else: ?>
<?php echo $user_grade['value']; ?>
<?php endif; ?>
</strong>
</li>
<?php if ( !empty( $user_grade['pub_comment'] ) ): ?>
<li id="assignment-comment">
<?php _e( 'Teacher Comment:', 'bpsp' ); ?>
<strong>
<?php echo $user_grade['pub_comment']; ?>
</strong>
</li>
<?php endif; ?>
<?php endif; ?>
<li class="date">
<?php
Expand Down Expand Up @@ -140,4 +148,4 @@
bpsp_partial( $templates_path, '_responses', get_defined_vars() );
// Load bibs
bpsp_partial( $templates_path, '_bibs', get_defined_vars() );
?>
?>

0 comments on commit beaecc5

Please sign in to comment.