function glossary_print_ratings_mean($entryid, $scale) { /// Print the multiple ratings on a entry given to the current user by others. /// Scale is an array of ratings static $strrate; $mean = glossary_get_ratings_mean($entryid, $scale); if ($mean !== "") { if (empty($strratings)) { $strratings = get_string("ratings", "glossary"); } echo "{$strratings}: "; link_to_popup_window("/mod/glossary/report.php?id={$entryid}", "ratings", $mean, 400, 600); } }
/** * Print the multiple ratings on a entry given to the current user by others. * Scale is an array of ratings * * @param int $entryid * @param array $scale */ function glossary_print_ratings_mean($entryid, $scale) { global $OUTPUT; static $strrate; $mean = glossary_get_ratings_mean($entryid, $scale); if ($mean !== "") { if (empty($strratings)) { $strratings = get_string("ratings", "glossary"); } echo "{$strratings}: "; $link = html_link::make("/mod/glossary/report.php?id={$entryid}", $mean); $link->add_action(new popup_action('click', $link->url, "ratings")); echo $OUTPUT->link($link); } }