Adding icons in reporting

skala
Julio Montoya 15 years ago
parent a2f3cedb74
commit 33972b05ed
  1. 69
      main/css/base.css
  2. 2
      main/mySpace/index.php
  3. 31
      main/mySpace/lp_tracking.php
  4. 10
      main/mySpace/myStudents.php
  5. 10
      main/newscorm/learnpath.class.php
  6. 38
      main/newscorm/lp_stats.php
  7. 5
      main/tracking/courseLog.php

@ -264,9 +264,7 @@ input.maininput:focus {
float:left;
}
.course-link-desc span {
}
/* Attendance */
.attendance-users-table td {
height:66px;
@ -276,6 +274,7 @@ input.maininput:focus {
height:66px;
}
/* Agenda */
.rounded_div_agenda {
background: none repeat scroll 0 0 #FFFFFF;
@ -331,29 +330,15 @@ a.tag {
white-space: nowrap;
}
/* New button style experimental */
button {
border:1px solid #ccc;
-opera-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 8px;
-opera-shadow: 2px 2px 1px rgba(0, 0, 0, 0.5);
-webkit-shadow: 2px 2px 1px rgba(0, 0, 0, 0.5);
box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.5);
font-weight:bold;
font-size: 105%;
#agenda_list th {
background-color: #F2F2F2;
}
button:hover {
color:#000;
border-style: inset;
background-color:#eee;
border:1px solid #ccc;
#agenda_list .days_week {
height: 100px;
}
/* Makes the course elements more readable */
.userportal-course-item{
padding:15px;
@ -363,11 +348,9 @@ button:hover {
padding: 6px 0px 6px 5px ;
}
/* New LP add item */
/* LP tool*/
div.lp_resource {
/*background:#FAFAFA;
border:1px solid #ccc; */
padding:5px 10px;
width:450px;
@ -378,11 +361,8 @@ div.lp_resource {
}
.lp_resource_element, .lp_resource_element_no_link {
/*background: -moz-linear-gradient(center top , #FEFEFE, #EEEEEE) repeat scroll 0 0 #EEEEEE;
background: -webkit-linear-gradient(center top , #FEFEFE, #EEEEEE) repeat scroll 0 0 #EEEEEE;*/
background-image:-moz-linear-gradient(top,#fefefe,#eee);
background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fdfdfd),color-stop(1,#eee));
background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fdfdfd),color-stop(1,#eee));
border: 1px solid #CCCCCC;
color: #444444;
cursor: pointer;
@ -412,12 +392,6 @@ table.lp_build td.tree {
min-height:380px;
}
/* Calendar */
#agenda_list .days_week {
height: 100px;
}
/* Breadcrumb */
.bread {
@ -493,6 +467,31 @@ table.lp_build td.tree {
float:right;
}
/* New button style experimental */
button {
border:1px solid #ccc;
-opera-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 8px;
-opera-shadow: 2px 2px 1px rgba(0, 0, 0, 0.5);
-webkit-shadow: 2px 2px 1px rgba(0, 0, 0, 0.5);
box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.5);
font-weight:bold;
font-size: 105%;
}
button:hover {
color:#000;
border-style: inset;
background-color:#eee;
border:1px solid #ccc;
}
/* Nice buttons v2 */
.a_button {
display: inline-block;
zoom: 1; /* zoom and *display = ie7 hack for display:inline-block */

@ -158,7 +158,7 @@ if (api_is_allowed_to_create_course() && $_GET['display'] != 'yourstudents') {
} else {
if (!empty($session_id)) {
$session_name = api_get_session_name($session_id);
$title = get_lang('Session').' '.$session_name;
$title = Display::return_icon('session.png', get_lang('Session'), array(), 22).' '.$session_name;
}
$menu_items[] = '<a href="'.api_get_self().'?view=teacher">'.get_lang('TeacherInterface').'</a>';
}

@ -7,8 +7,6 @@
*/
$language_file = array ('registration', 'index', 'tracking', 'exercice', 'scorm', 'learnpath');
//$cidReset = true;
require_once '../inc/global.inc.php';
$from_myspace = false;
@ -19,12 +17,12 @@ if (isset($_GET['from']) && $_GET['from'] == 'myspace') {
} else {
$this_section = SECTION_COURSES;
}
include_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
include_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
include_once api_get_path(LIBRARY_PATH).'course.lib.php';
include_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
include_once api_get_path(SYS_CODE_PATH).'newscorm/learnpath.class.php';
include_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathItem.class.php';
require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpath.class.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathItem.class.php';
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
$export_csv = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
@ -55,7 +53,7 @@ if (!empty($course_exits)) {
api_not_allowed();
}
$_course['dbNameGlu'] = $_configuration['table_prefix'] . $_course['db_name'] . $_configuration['db_glue'];
//$_course['dbNameGlu'] = $_configuration['table_prefix'] . $_course['db_name'] . $_configuration['db_glue'];
if (!empty($_GET['origin']) && $_GET['origin'] == 'user_course') {
$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$_course['directory'], 'name' => $_course['title']);
@ -71,6 +69,7 @@ if (!empty($_GET['origin']) && $_GET['origin'] == 'user_course') {
}
$interbreadcrumb[] = array("url" => "myStudents.php?student=".Security::remove_XSS($_GET['student_id'])."&course=".$cidReq."&details=true&origin=".Security::remove_XSS($_GET['origin']) , "name" => get_lang("DetailsStudentInCourse"));
$nameTools = get_lang('LearningPathDetails');
$htmlHeadXtra[] = '
@ -97,8 +96,6 @@ $lp_id = intval($_GET['lp_id']);
$sql = 'SELECT name FROM '.Database::get_course_table(TABLE_LP_MAIN, $_course['db_name']).' WHERE id='.$lp_id;
$rs = Database::query($sql);
$lp_title = Database::result($rs, 0, 0);
echo '<div class ="actions">';
echo '<a href="javascript:window.back();">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
echo '<a href="javascript: void(0);" onclick="javascript: window.print();">
@ -110,18 +107,20 @@ echo '</div>';
echo '<div class="clear"></div>';
$session_name = api_get_session_name(api_get_session_id());
$table_title = ($session_name? get_lang('Session').' : '.$session_name.' | ':'').get_lang('Course').' : '.$_course['title'].' | '.$name;
$table_title = ($session_name? Display::return_icon('session.png', get_lang('Session'), array(), 22).' '.$session_name.' ':' ').
Display::return_icon('course.png', get_lang('Course'), array(), 22).' '.$_course['title'].' '.
Display::return_icon('user.png', get_lang('User'), array(), 22).' '.$name;
echo '<h2>'.$table_title.'</h2>';
echo '<h3>'.get_lang('ToolLearnpath').' : '.$lp_title.'</h3>';
echo '<h3>'.Display::return_icon('learnpath.png', get_lang('ToolLearnpath'), array(), 22).' '.$lp_title.'</h3>';
$list = learnpath :: get_flat_ordered_items_list($lp_id);
$list = learnpath :: get_flat_ordered_items_list($lp_id, 0, $_course['db_name']);
$origin = 'tracking';
if ($export_csv) {
include_once api_get_path(SYS_CODE_PATH).'newscorm/lp_stats.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/lp_stats.php';
//Export :: export_table_csv($csv_content, 'reporting_student');
} else {
ob_start();
include_once api_get_path(SYS_CODE_PATH).'newscorm/lp_stats.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/lp_stats.php';
$tracking_content = ob_get_contents();
ob_end_clean();
echo api_utf8_decode($tracking_content, $charset);

@ -383,11 +383,13 @@ if (!empty ($_GET['student'])) {
//$table_title = ($session_name? get_lang('Session').' : '.ucfirst($session_name).' | ':'').get_lang('Course').' : '.$info_course['title'].($coachs_name?'&nbsp;|&nbsp;'.get_lang('Tutor').' : '.stripslashes($coachs_name):'');
//Hiding coach name
//$table_title = ($session_name? get_lang('Session').' : '.ucfirst($session_name).' | ':'').get_lang('Course').' : '.$info_course['title'].' | '.api_get_person_name($info_user['lastname'], $info_user['firstname']);
//$table_title = ($session_name? get_lang('Session').' : '.ucfirst($session_name).' | ':'').get_lang('Course').' : '.$info_course['title'].' | '.api_get_person_name($info_user['firstname'], $info_user['lastname']);
$info_course = CourseManager :: get_course_information($get_course_code);
$session_name = api_get_session_name($session_id);
$table_title = ($session_name? get_lang('Session').' : '.$session_name.' | ':'').($info_course ?get_lang('Course').' : '.$info_course['title'].' | ':'').api_get_person_name($info_user['lastname'], $info_user['firstname']);
$table_title = ($session_name? Display::return_icon('session.png', get_lang('Session'), array(), 22).' '.$session_name.' ':'').
$table_title .= ($info_course ? Display::return_icon('course.png', get_lang('Course'), array(), 22).' '.$info_course['title'].' ':'');
$table_title .= Display::return_icon('user.png', get_lang('User'), array(), 22).api_get_person_name($info_user['firstname'], $info_user['lastname']);
echo '<h2>'.$table_title.'</h2>';
@ -407,7 +409,7 @@ if (!empty ($_GET['student'])) {
$big_image_height = $big_image_size[1];
$url_big_image = $big_image . '?rnd=' . time();
$img_attributes = 'src="' . $image_file . '?rand=' . time() . '" ' .
'alt="' . api_get_person_name($info_user['lastname'], $info_user['firstname']) . '" ' .
'alt="' . api_get_person_name($info_user['firstname'], $info_user['lastname']) . '" ' .
'style="float:' . ($text_dir == 'rtl' ? 'left' : 'right') . '; padding:5px;" ';
if ($image_array['file'] == 'unknown.jpg') {
@ -426,7 +428,7 @@ if (!empty ($_GET['student'])) {
<td>
<?php
echo get_lang('Name') . ' : ';
echo $info_user['name'];
echo api_get_person_name($info_user['firstname'], $info_user['lastname']);
?>
</td>
</tr>

@ -2398,11 +2398,12 @@ class learnpath {
* @param integer Item View ID
* @return integer Number of interactions
*/
public function get_interactions_count_from_db($lp_iv_id = 0) {
public function get_interactions_count_from_db($lp_iv_id = 0, $course_code = null) {
if (empty ($lp_iv_id)) {
return -1;
}
$table = Database :: get_course_table(TABLE_LP_IV_INTERACTION);
$course_info = api_get_course_info($course_code);
$table = Database :: get_course_table(TABLE_LP_IV_INTERACTION, $course_info['db_name']);
$sql = "SELECT count(*) FROM $table WHERE lp_iv_id = $lp_iv_id";
$res = Database::query($sql);
$row = Database :: fetch_array($res);
@ -2458,11 +2459,12 @@ class learnpath {
* @param integer Item View ID
* @return integer Number of objectives
*/
public function get_objectives_count_from_db($lp_iv_id = 0) {
public function get_objectives_count_from_db($lp_iv_id = 0, $course_code = null) {
if (empty ($lp_iv_id)) {
return -1;
}
$table = Database :: get_course_table(TABLE_LP_IV_OBJECTIVE);
$course_info = api_get_course_info($course_code);
$table = Database :: get_course_table(TABLE_LP_IV_OBJECTIVE, $course_info['db_name']);
$sql = "SELECT count(*) FROM $table WHERE lp_iv_id = $lp_iv_id";
$res = Database::query($sql);
$row = Database :: fetch_array($res);

@ -16,21 +16,18 @@ require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once '../exercice/exercise.lib.php';
if (empty($_SESSION['_course']['id']) && isset($_GET['course'])) {
$course_code = Security::remove_XSS($_GET['course']);
$course_id = api_get_course_id();
if (empty($course_id ) && isset($_GET['course'])) {
$course_code = Security::remove_XSS($_GET['course']);
} else {
$course_code = $_SESSION['_course']['id'];
$course_code = $course_id;
}
if (isset($_GET['student_id'])) {
$student_id = intval($_GET['student_id']);
}
$session_id = api_get_session_id();
$session_id = api_get_session_id();
$session_condition = api_get_session_condition($session_id);
//The two following variables have to be declared by the includer script
//$lp_id = $_SESSION['oLP']->get_id();
//$list = $_SESSION['oLP']->get_flat_ordered_items_list($lp_id);
//$user_id = $_user['user_id'];
//When origin is not set that means that the lp_stats are viewed from the "man running" icon
if (!isset($origin))
@ -84,12 +81,16 @@ $output .= '<tr><td>&nbsp;</td></tr><tr><td><table border="0" class="data_table"
// Going through the items using the $items[] array instead of the database order ensures
// we get them in the same order as in the imsmanifest file, which is rather random when using
// the database table.
$TBL_LP_ITEM = Database :: get_course_table(TABLE_LP_ITEM);
$TBL_LP_ITEM_VIEW = Database :: get_course_table(TABLE_LP_ITEM_VIEW);
$TBL_LP_VIEW = Database :: get_course_table(TABLE_LP_VIEW);
$tbl_stats_exercices = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES);
$tbl_stats_attempts= Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$tbl_quiz_questions= Database :: get_course_table(TABLE_QUIZ_QUESTION);
$course_info = api_get_course_info($course_code);
$TBL_LP_ITEM = Database :: get_course_table(TABLE_LP_ITEM, $course_info['db_name']);
$TBL_LP_ITEM_VIEW = Database :: get_course_table(TABLE_LP_ITEM_VIEW, $course_info['db_name']);
$TBL_LP_VIEW = Database :: get_course_table(TABLE_LP_VIEW, $course_info['db_name']);
$tbl_quiz_questions = Database :: get_course_table(TABLE_QUIZ_QUESTION, $course_info['db_name']);
$TBL_QUIZ = Database :: get_course_table(TABLE_QUIZ_TEST, $course_info['db_name']);
$tbl_stats_exercices = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES);
$tbl_stats_attempts = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$sql = "SELECT max(view_count) FROM $TBL_LP_VIEW WHERE lp_id = $lp_id AND user_id = '" . $user_id . "' $session_condition";
$res = Database::query($sql);
$view = '';
@ -133,7 +134,7 @@ if (isset($_GET['lp_id']) && isset($_GET['my_lp_id'])) {
}
}
$TBL_QUIZ = Database :: get_course_table(TABLE_QUIZ_TEST);
if (is_array($list) && count($list) > 0) {
foreach ($list as $my_item_id) {
@ -389,8 +390,8 @@ if (is_array($list) && count($list) > 0) {
// Check if there are interactions below.
$extend_attempt_link = '';
$extend_this_attempt = 0;
$inter_num = learnpath :: get_interactions_count_from_db($row['iv_id']);
$objec_num = learnpath :: get_objectives_count_from_db($row['iv_id']);
$inter_num = learnpath::get_interactions_count_from_db($row['iv_id']);
$objec_num = learnpath::get_objectives_count_from_db($row['iv_id']);
if (($inter_num > 0 || $objec_num > 0) && !$extend_all) {
if (!empty ($_GET['extend_attempt_id']) && $_GET['extend_attempt_id'] == $row['iv_id']) {
// The extend button for this attempt has been clicked.
@ -486,9 +487,7 @@ if (is_array($list) && count($list) > 0) {
}
}
$time_for_total = $subtotal_time;
//$subtotal_time.' - ';
$time = learnpathItem :: get_scorm_time('js', $subtotal_time);
//var_dump($time );
if (empty ($title)) {
$title = rl_get_resource_name(api_get_course_id(), $lp_id, $row['myid']);
}
@ -696,7 +695,6 @@ if (is_array($list) && count($list) > 0) {
}
}
}
//var_dump($a_my_id);
//NOT Extend all "left green cross"
if (!empty($a_my_id)) {
$my_studen_id = 0;

@ -450,9 +450,10 @@ if ($_GET['studentlist'] == 'false') {
$course_name = get_lang('Course').' '.$course_info['name'];
if (api_get_session_id()) {
echo '<h2>'.get_lang('Session').' '.api_get_session_name(api_get_session_id()).' | '.$course_name.'</h2>';
echo '<h2>'.Display::return_icon('session.png', get_lang('Session'), array(), 22).' '.api_get_session_name(api_get_session_id()).' '.
Display::return_icon('course.png', get_lang('Course'), array(), 22).' '.$course_name.'</h2>';
} else {
echo '<h2>'.get_lang('Course').' '.$course_info['name'].'</h2>';
echo '<h2>'.Display::return_icon('course.png', get_lang('Course'), array(), 22).' '.$course_info['name'].'</h2>';
}
$extra_field_select = TrackingCourseLog::display_additional_profile_fields();

Loading…
Cancel
Save