/** * Print a detailed representation of what a user has done with * a given particular instance of this module, for user activity reports. * * @global object * @param object $course * @param object $user * @param object $mod * @param object $glossary */ function glossary_user_complete($course, $user, $mod, $glossary) { global $CFG, $OUTPUT; require_once("$CFG->libdir/gradelib.php"); $grades = grade_get_grades($course->id, 'mod', 'glossary', $glossary->id, $user->id); if (!empty($grades->items[0]->grades)) { $grade = reset($grades->items[0]->grades); echo $OUTPUT->container(get_string('grade').': '.$grade->str_long_grade); if ($grade->str_feedback) { echo $OUTPUT->container(get_string('feedback').': '.$grade->str_feedback); } } if ($entries = glossary_get_user_entries($glossary->id, $user->id)) { echo '<table width="95%" border="0"><tr><td>'; foreach ($entries as $entry) { $cm = get_coursemodule_from_instance("glossary", $glossary->id, $course->id); glossary_print_entry($course, $cm, $glossary, $entry,"","",0); echo '<p>'; } echo '</td></tr></table>'; } }
function glossary_user_complete($course, $user, $mod, $glossary) { /// Print a detailed representation of what a user has done with /// a given particular instance of this module, for user activity reports. global $CFG; if ($entries = glossary_get_user_entries($glossary->id, $user->id)) { echo '<table width="95%" border="0"><tr><td>'; foreach ($entries as $entry) { $cm = get_coursemodule_from_instance("glossary", $glossary->id, $course->id); glossary_print_entry($course, $cm, $glossary, $entry, "", "", 0); echo '<p>'; } echo '</td></tr></table>'; } }
function glossary_user_complete($course, $user, $mod, $glossary) { /// Print a detailed representation of what a user has done with /// a given particular instance of this module, for user activity reports. global $CFG; require_once "{$CFG->libdir}/gradelib.php"; $grades = grade_get_grades($course->id, 'mod', 'glossary', $glossary->id, $user->id); if (!empty($grades->items[0]->grades)) { $grade = reset($grades->items[0]->grades); echo '<p>' . get_string('grade') . ': ' . $grade->str_long_grade . '</p>'; if ($grade->str_feedback) { echo '<p>' . get_string('feedback') . ': ' . $grade->str_feedback . '</p>'; } } if ($entries = glossary_get_user_entries($glossary->id, $user->id)) { echo '<table width="95%" border="0"><tr><td>'; foreach ($entries as $entry) { $cm = get_coursemodule_from_instance("glossary", $glossary->id, $course->id); glossary_print_entry($course, $cm, $glossary, $entry, "", "", 0); echo '<p>'; } echo '</td></tr></table>'; } }
/** * Print a detailed representation of what a user has done with * a given particular instance of this module, for user activity reports. * * @global object * @param object $course * @param object $user * @param object $mod * @param object $glossary */ function glossary_user_complete($course, $user, $mod, $glossary) { global $CFG; if ($entries = glossary_get_user_entries($glossary->id, $user->id)) { echo '<table width="95%" border="0"><tr><td>'; foreach ($entries as $entry) { $cm = get_coursemodule_from_instance("glossary", $glossary->id, $course->id); glossary_print_entry($course, $cm, $glossary, $entry, "", "", 0); echo '<p>'; } echo '</td></tr></table>'; } }