Adding email in reports see BT#10534

1.10.x
Julio Montoya 9 years ago
parent e33fa1710f
commit 18caca0130
  1. 11
      main/inc/ajax/model.ajax.php
  2. 4
      main/inc/lib/course.lib.php
  3. 2
      main/mySpace/company_reports.php

@ -665,10 +665,19 @@ switch ($action) {
}
break;
case 'get_user_course_report':
$columns = array('course', 'user', 'time', 'certificate', 'progress_100', 'progress');
$columns = array(
'course',
'user',
'email',
'time',
'certificate',
'progress_100',
'progress',
);
$column_names = array(
get_lang('Course'),
get_lang('User'),
get_lang('Email'),
get_lang('ManHours'),
get_lang('CertificateGenerated'),
get_lang('Approved'),

@ -1254,6 +1254,7 @@ class CourseManager
if (!empty($session_id) || !empty($sessionIdList)) {
$sql = 'SELECT DISTINCT
user.user_id,
user.email,
session_course_user.status as status_session,
session_id,
user.*,
@ -1307,12 +1308,14 @@ class CourseManager
course.code,
course_rel_user.status as status_rel,
user.user_id,
user.email,
course_rel_user.is_tutor,
user.* ';
} else {
$sql = 'SELECT DISTINCT
course_rel_user.status as status_rel,
user.user_id,
user.email,
course_rel_user.is_tutor,
user.* ';
}
@ -1512,6 +1515,7 @@ class CourseManager
$sessionName = !empty($sessionId) ? ' - '.$user['session_name'] : '';
$report_info['course'] = $user['title'].$sessionName;
$report_info['user'] = api_get_person_name($user['firstname'], $user['lastname']);
$report_info['email'] = $user['email'];
$report_info['time'] = api_time_to_hms(
Tracking::get_time_spent_on_the_course(
$user['user_id'],

@ -33,6 +33,7 @@ $extra_fields = UserManager::get_extra_fields(0, 100, null, null, true, true);
$columns = array(
get_lang('Course'),
get_lang('User'),
get_lang('Email'),
get_lang('ManHours'),
get_lang('CertificateGenerated'),
get_lang('Approved'),
@ -43,6 +44,7 @@ $columns = array(
$column_model = array(
array('name'=>'course', 'index'=>'title', 'width'=>'180', 'align'=>'left', 'wrap_cell' => 'true'),
array('name'=>'user', 'index'=>'user', 'width'=>'100', 'align'=>'left','sortable'=>'false', 'wrap_cell' => 'true'),
array('name'=>'email', 'index'=>'email', 'width'=>'100', 'align'=>'left','sortable'=>'false', 'wrap_cell' => 'true'),
array('name'=>'time', 'index'=>'time', 'width'=>'50', 'align'=>'left','sortable'=>'false'),
array('name'=>'certificate', 'index'=>'certificate', 'width'=>'50', 'align'=>'left','sortable'=>'false'),
array('name'=>'progress_100', 'index'=>'progress_100', 'width'=>'50', 'align'=>'left','sortable'=>'false'),

Loading…
Cancel
Save