Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added journal_grades() so journals show up in the Grades page

  • Loading branch information...
commit 629e9373529a5d6fca794331e623b838fad8cbc9 1 parent 09a4ce3
moodler authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 mod/journal/lib.php
View
16 mod/journal/lib.php
@@ -161,6 +161,22 @@ function journal_print_recent_activity(&$logs, $isteacher=false) {
return $content;
}
+function journal_grades($journalid) {
+/// Must return an array of grades, indexed by user, and a max grade.
+ global $JOURNAL_RATING;
+
+ $return->grades = get_records_sql_menu("SELECT user,rating FROM journal_entries WHERE journal = '$journalid'");
+ foreach ($return->grades as $key => $value) {
+ if ($value) {
+ $return->grades[$key] = $JOURNAL_RATING[$value];
+ } else {
+ $return->grades[$key] = "-";
+ }
+ }
+ $return->maxgrade = "";
+ return $return;
+}
+
// OTHER JOURNAL FUNCTIONS ///////////////////////////////////////////////////////////////////
Please sign in to comment.
Something went wrong with that request. Please try again.