本文整理汇总了PHP中FieldList::getUsersFieldEntryData方法的典型用法代码示例。如果您正苦于以下问题:PHP FieldList::getUsersFieldEntryData方法的具体用法?PHP FieldList::getUsersFieldEntryData怎么用?PHP FieldList::getUsersFieldEntryData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FieldList
的用法示例。
在下文中一共展示了FieldList::getUsersFieldEntryData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ReportTablePrinter
function _printTable_courses($type, $query_course_user, &$category_list, &$category_path_list, &$session_list, &$lastaccess_list, &$time_list, &$score_start, &$score_final, &$score_course, &$filter_rows, &$filter_columns, $show_classrooms_editions, $classrooms_editions_info)
{
require_once _lms_ . '/admin/modules/report/report_tableprinter.php';
if (!$type) {
$type = 'html';
}
$buffer = new ReportTablePrinter($type);
$lang =& DoceboLanguage::createInstance('report', 'framework');
$cols = $filter_columns['showed_columns'];
$output = '';
$course_types_trans = array('elearning' => Lang::t('_ELEARNING', 'standard'), 'classroom' => Lang::t('_CLASSROOM', 'standard'));
require_once _lms_ . '/lib/lib.levels.php';
$clevels = new CourseLevel();
$user_levels_trans = $clevels->getLevels();
unset($clevels);
$buffer->openTable($lang->def('_RU_CAPTION'), $lang->def('_RU_CAPTION'));
$th1 = array();
$th2 = array();
$colspanuser = 0;
$th2[] = $lang->def('_USERNAME');
$colspanuser++;
if (in_array('_TH_LASTNAME', $cols)) {
$th2[] = Lang::t('_LASTNAME', 'standard');
$colspanuser++;
}
if (in_array('_TH_FIRSTNAME', $cols)) {
$th2[] = Lang::t('_FIRSTNAME', 'standard');
$colspanuser++;
}
if (in_array('_TH_EMAIL', $cols)) {
$th2[] = Lang::t('_EMAIL', 'standard');
$colspanuser++;
}
if (in_array('_TH_REGISTER_DATE', $cols)) {
$th2[] = Lang::t('_REGISTER_DATE', 'standard');
$colspanuser++;
}
if (in_array('_TH_SUSPENDED', $cols)) {
$th2[] = Lang::t('_SUSPENDED', 'standard');
$colspanuser++;
}
require_once $GLOBALS['where_framework'] . '/lib/lib.field.php';
$aclManager = new DoceboACLManager();
$aclManager->include_suspended = TRUE;
$_users = $aclManager->getAllUsersFromSelection($filter_rows);
$fman = new FieldList();
$field_values = array();
$customcols =& $filter_columns['custom_fields'];
$num_row = 0;
foreach ($customcols as $the_idField) {
list($exists) = sql_fetch_row(sql_query('Select idField from core_field where idField=' . $the_idField['id']));
if ($exists == NULL) {
$customcols[$num_row]['selected'] = FALSE;
}
$num_row++;
}
$custom_list = array();
foreach ($customcols as $val) {
if ($val['selected']) {
$colspanuser++;
$th2[] = $val['label'];
$custom_list[] = $val['id'];
}
}
$field_values = !empty($custom_list) ? $fman->getUsersFieldEntryData($_users, $custom_list) : array();
$colspan1 = 0;
$colspan2 = 0;
$colspan3 = 1;
if (in_array('_TH_CAT', $cols)) {
$th2[] = $lang->def('_CATEGORY');
$colspan1++;
}
if (in_array('_TH_CODE', $cols)) {
$th2[] = $lang->def('_CODE');
$colspan1++;
}
$th2[] = $lang->def('_COURSE_NAME');
$colspan1++;
$th2[] = Lang::t('_COURSE_TYPE', 'course');
$colspan1++;
if (in_array('_TH_COURSEPATH', $cols)) {
$th2[] = $lang->def('_TH_COURSEPATH');
$colspan1++;
}
if (in_array('_TH_COURSESTATUS', $cols)) {
$th2[] = $lang->def('_STATUS');
$colspan1++;
}
if (in_array('_TH_COURSECREDITS', $cols)) {
$th2[] = Lang::t('_CREDITS', 'standard');
$colspan1++;
}
$colspan_classrooms_editions = 0;
if ($show_classrooms_editions) {
if (in_array('_TH_CLASSROOM_CODE', $cols)) {
$th2[] = Lang::t('_NAME', 'standard');
$colspan_classrooms_editions++;
}
if (in_array('_TH_CLASSROOM_NAME', $cols)) {
$th2[] = Lang::t('_CODE', 'standard');
//.........这里部分代码省略.........
示例2: coursereport
//.........这里部分代码省略.........
// min
if (!isset($report_details[$id_report]['min_score'])) {
$report_details[$id_report]['min_score'] = $single_report['score'];
} elseif ($single_report['score'] < $report_details[$id_report]['min_score']) {
$report_details[$id_report]['min_score'] = $single_report['score'];
}
//number of valid score
if (!isset($report_details[$id_report]['num_result'])) {
$report_details[$id_report]['num_result'] = 1;
} else {
$report_details[$id_report]['num_result']++;
}
// averange
if (!isset($report_details[$id_report]['averange'])) {
$report_details[$id_report]['averange'] = $single_report['score'];
} else {
$report_details[$id_report]['averange'] += $single_report['score'];
}
}
}
}
while (list($id_report, $single_detail) = each($report_details)) {
if (isset($single_detail['num_result'])) {
$report_details[$id_report]['averange'] /= $report_details[$id_report]['num_result'];
}
}
reset($report_details);
// XXX: Display user scores
if (!empty($students_info)) {
while (list($idst_user, $user_info) = each($students_info)) {
$user_name = $user_info[ACL_INFO_LASTNAME] . $user_info[ACL_INFO_FIRSTNAME] ? $user_info[ACL_INFO_LASTNAME] . ' ' . $user_info[ACL_INFO_FIRSTNAME] : $acl_man->relativeId($user_info[ACL_INFO_USERID]);
$cont = array($user_name);
$fman = new FieldList();
$field_entries = $fman->getUsersFieldEntryData($user_info[0], $field_selected, true);
$user = array('id' => $user_info[ACL_INFO_IDST], 'userid' => $user_info[ACL_INFO_USERID], 'firstname' => $user_info[ACL_INFO_FIRSTNAME], 'lastname' => $user_info[ACL_INFO_LASTNAME], 'email' => $user_info[ACL_INFO_EMAIL], 'register_date' => $user_info[ACL_INFO_REGISTER_DATE], 'lastenter' => $user_info[ACL_INFO_LASTENTER]);
if (is_numeric($field_selected)) {
$cont[] = $field_entries[$user_info[0]][$field_selected];
} else {
if ($field_selected == "userid") {
$pos = strrpos($user[$field_selected], "/");
if ($pos == 0) {
$cont[] = substr($user[$field_selected], 1);
}
} else {
$cont[] = $user[$field_selected];
}
}
// for every colum
$results_test = array();
$results_activity = array();
$results_scorm_test = array();
foreach ($reports as $id_report => $info_report) {
switch ($info_report['source_of']) {
case "test":
$id_test = $info_report['id_source'];
if (isset($tests_score[$id_test][$idst_user])) {
switch ($tests_score[$id_test][$idst_user]['score_status']) {
case "not_complete":
$cont[] = '-';
break;
case "not_checked":
$cont[] = '<span class="cr_not_check">' . $lang->def('_NOT_CHECKED') . '</span>';
// Count not checked
if (!isset($test_details[$id_test]['not_checked'])) {
$test_details[$id_test]['not_checked'] = 1;
} else {