Skip to content

Commit beaecc5

Browse files
author
sushkov
committed
Public comments are now visible in assignment pages. Related #72
git-svn-id: https://svn.wp-plugins.org/buddypress-courseware/trunk@498793 b8457f37-d9ea-0310-8a92-e5e31aec5664
1 parent 30da0ac commit beaecc5

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

gradebook/gradebook.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,9 @@ function load_grades( $gradebook_id, $parse = false ) {
267267
}
268268

269269
/**
270-
* load_grades_by_user_id( $assignment, $user_id )
270+
* load_grade_by_user_id( $assignment, $user_id )
271271
*
272-
* Loads all the grades for a given assignment by user id
272+
* Loads all the grade for a given assignment by user id
273273
*
274274
* @param Int $assignment the ID of the assignment gradeboodk to load
275275
* @param Int $user_id, the id of the user

groups/templates/single_assignment.php

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,24 @@
1010
</li>
1111
<?php endif; ?>
1212
<?php if( isset( $user_grade ) ): ?>
13-
<li id="assignment-grade">
14-
<?php _e( 'Your Grade:', 'bpsp' ); ?>
15-
<strong>
16-
<?php if( !empty( $user_grade['format'] ) && 'percentage' == $user_grade['format'] ): ?>
17-
<?php echo $user_grade['value']; ?>%
18-
<?php else: ?>
19-
<?php echo $user_grade['value']; ?>
20-
<?php endif; ?>
21-
</strong>
22-
</li>
13+
<li id="assignment-grade">
14+
<?php _e( 'Your Grade:', 'bpsp' ); ?>
15+
<strong>
16+
<?php if( !empty( $user_grade['format'] ) && 'percentage' == $user_grade['format'] ): ?>
17+
<?php echo $user_grade['value']; ?>%
18+
<?php else: ?>
19+
<?php echo $user_grade['value']; ?>
20+
<?php endif; ?>
21+
</strong>
22+
</li>
23+
<?php if ( !empty( $user_grade['pub_comment'] ) ): ?>
24+
<li id="assignment-comment">
25+
<?php _e( 'Teacher Comment:', 'bpsp' ); ?>
26+
<strong>
27+
<?php echo $user_grade['pub_comment']; ?>
28+
</strong>
29+
</li>
30+
<?php endif; ?>
2331
<?php endif; ?>
2432
<li class="date">
2533
<?php
@@ -140,4 +148,4 @@
140148
bpsp_partial( $templates_path, '_responses', get_defined_vars() );
141149
// Load bibs
142150
bpsp_partial( $templates_path, '_bibs', get_defined_vars() );
143-
?>
151+
?>

0 commit comments

Comments
 (0)