Commit 30d0c638 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent 4cb96e90
......@@ -76,16 +76,21 @@ class tx_nG6_db {
$res_tab = null;
// get all users
$users_in_group = tx_nG6_db::get_all_users_in_group($usergroup);
$project_list_final = array();
foreach($users_in_group as $list_current_user_id){
// get all user projects
$all_user_projects = tx_nG6_db::select_all_user_projects($list_current_user_id);
foreach($all_user_projects as $p_val){
if(!in_array($p_val['id'], $project_list_final)){
$project_list_final[] = $p_val['id'];
if ($usergroup != "0") {
$users_in_group = tx_nG6_db::get_all_users_in_group($usergroup);
$project_list_final = array();
foreach($users_in_group as $list_current_user_id){
// get all user projects
$all_user_projects = tx_nG6_db::select_all_user_projects($list_current_user_id);
foreach($all_user_projects as $p_val){
if(!in_array($p_val['id'], $project_list_final)){
$project_list_final[] = $p_val['id'];
}
}
}
$where = 'tx_nG6_project.uid IN ('.implode(",",$project_list_final).') AND tx_nG6_run.date BETWEEN '.$date_cursors.' AND '.$date_cursore;
} else {
$where = 'tx_nG6_run.date BETWEEN '.$date_cursors.' AND '.$date_cursore;
}
$cumulated_size = 0;
......@@ -121,7 +126,7 @@ class tx_nG6_db {
'FROM' => 'tx_nG6_project '
.' INNER JOIN tx_nG6_project_run ON tx_nG6_project.uid=tx_nG6_project_run.project_id '
.' INNER JOIN tx_nG6_run ON tx_nG6_project_run.run_id=tx_nG6_run.uid ',
'WHERE' => 'tx_nG6_project.uid IN ('.implode(",",$project_list_final).') AND tx_nG6_run.date BETWEEN '.$date_cursors.' AND '.$date_cursore,
'WHERE' => $where,
'GROUPBY' => '',
'ORDERBY' => '',
'LIMIT' => ''
......
......@@ -39,8 +39,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div id="chart_options">
{$llang.group}
<select id="group_list">
<option value="0">{$llang.all_groups}</option>
{foreach from=$group_list key=g_id item=g_val}
<option value="{$g_val.uid}">{$g_val.uid}: {$g_val.title}</option>
<option value="{$g_val.uid}">{$g_val.title}</option>
{/foreach}
</select>
&nbsp;&nbsp;|&nbsp;&nbsp;
......
......@@ -12,6 +12,7 @@
<label index="group">Select a user group:</label>
<label index="include_analyses">Includes analyses:</label>
<label index="cumulate">Cumulate values:</label>
<label index="all_groups">All</label>
</languageKey>
<languageKey index="fr" type="array">
<label index="administration_center_title">Centre d'administration</label>
......@@ -20,6 +21,7 @@
<label index="group">Groupe utilisateur:</label>
<label index="include_analyses">Inclure les analyses:</label>
<label index="cumulate">Cumuler les valeurs:</label>
<label index="all_groups">Tous</label>
</languageKey>
</data>
</T3locallang>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment