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 { ...@@ -76,16 +76,21 @@ class tx_nG6_db {
$res_tab = null; $res_tab = null;
// get all users // get all users
$users_in_group = tx_nG6_db::get_all_users_in_group($usergroup); if ($usergroup != "0") {
$project_list_final = array(); $users_in_group = tx_nG6_db::get_all_users_in_group($usergroup);
foreach($users_in_group as $list_current_user_id){ $project_list_final = array();
// get all user projects foreach($users_in_group as $list_current_user_id){
$all_user_projects = tx_nG6_db::select_all_user_projects($list_current_user_id); // get all user projects
foreach($all_user_projects as $p_val){ $all_user_projects = tx_nG6_db::select_all_user_projects($list_current_user_id);
if(!in_array($p_val['id'], $project_list_final)){ foreach($all_user_projects as $p_val){
$project_list_final[] = $p_val['id']; 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; $cumulated_size = 0;
...@@ -121,7 +126,7 @@ class tx_nG6_db { ...@@ -121,7 +126,7 @@ class tx_nG6_db {
'FROM' => 'tx_nG6_project ' '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_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 ', .' 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' => '', 'GROUPBY' => '',
'ORDERBY' => '', 'ORDERBY' => '',
'LIMIT' => '' 'LIMIT' => ''
......
...@@ -39,8 +39,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -39,8 +39,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div id="chart_options"> <div id="chart_options">
{$llang.group} {$llang.group}
<select id="group_list"> <select id="group_list">
<option value="0">{$llang.all_groups}</option>
{foreach from=$group_list key=g_id item=g_val} {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} {/foreach}
</select> </select>
&nbsp;&nbsp;|&nbsp;&nbsp; &nbsp;&nbsp;|&nbsp;&nbsp;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<label index="group">Select a user group:</label> <label index="group">Select a user group:</label>
<label index="include_analyses">Includes analyses:</label> <label index="include_analyses">Includes analyses:</label>
<label index="cumulate">Cumulate values:</label> <label index="cumulate">Cumulate values:</label>
<label index="all_groups">All</label>
</languageKey> </languageKey>
<languageKey index="fr" type="array"> <languageKey index="fr" type="array">
<label index="administration_center_title">Centre d'administration</label> <label index="administration_center_title">Centre d'administration</label>
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
<label index="group">Groupe utilisateur:</label> <label index="group">Groupe utilisateur:</label>
<label index="include_analyses">Inclure les analyses:</label> <label index="include_analyses">Inclure les analyses:</label>
<label index="cumulate">Cumuler les valeurs:</label> <label index="cumulate">Cumuler les valeurs:</label>
<label index="all_groups">Tous</label>
</languageKey> </languageKey>
</data> </data>
</T3locallang> </T3locallang>
\ No newline at end of file
Supports Markdown
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