wiki:PerAppCredit

Version 1 (modified by davea, 10 years ago) (diff)

--

Per-app credit

By default, BOINC maintains the credit granted to teams, users, and hosts, both total and average. You can optionally maintain credit for teams and users on a per-application basis. This information is stored in DB tables credit_user and credit_team. Note: doing this will increase DB size and server load.

To maintain per-app credit, put

<credit_by_app/>

in your config.xml file.

Displaying per-app credit

To display per-app credit on your web site, you must supply functions

project_user_credit($user)
project_team_credit($team)

in your html/project/project.inc. These functions must generate table rows describing the credit granted to each app for the given user or team.

The example file boinc/html/project.sample/project.inc contains an example of how to do this. It uses helper functions to do the DB lookups and generate the HTML. The part you supplies looks like

function project_user_credit($user){
    show_app_credit_user($user, "Remote Test", array(16));
    show_app_credit_user($user, "Uppercase", array(1, 25));
}

function project_team_credit($team) {
    show_app_credit_team($team, "Remote Test", array(16));
    show_app_credit_team($team, "Uppercase", array(1, 25));
}

You supply the application names and IDs. You can combine multiple apps; in this case, credit for apps 1 and 25 are summed and displayed as 'Uppercase".