id()); $Summary->Editable($EditOkay); $Summary->Display(); } /** * Print recommended resource. */ function PrintRecommendedResource(): void { global $RecommendedResourceId; $Resource = new Record($RecommendedResourceId); PrintRecommendation( $Resource, $Resource->getViewPageUrl(), User::getCurrentUser()->HasPriv(PRIV_RESOURCEADMIN), $Resource->getEditPageUrl(), $Resource->ScaledCumulativeRating() ); } /** * Print recommendation sources. */ function PrintRecommendationSources(): void { global $RecommendedResourceId; global $ResultsPerPage; # retrieve user currently logged in $User = User::getCurrentUser(); $ResourceCount = 0; # create recommender $Recommender = new Recommender(); # get list of recommendation source resources $RecSources = $Recommender->GetSourceList( $User->Get("UserId"), $RecommendedResourceId ); # for each source resource foreach ($RecSources as $SourceId => $CorrelationScore) { # if we have printed the max number of sources if ($ResourceCount > $ResultsPerPage) { # bail out continue; } $ResourceCount++; # print resource record $Resource = new Record($SourceId); PrintRecommendation( $Resource, $Resource->getViewPageUrl(), $Resource->UserCanEdit($User), $Resource->getEditPageUrl(), $Resource->ScaledCumulativeRating() ); } } # ----- MAIN ----------------------------------------------------------------- ?>

# Recommendation Sources

This resource was recommended to you:

Because you rated these resources highly: