Minor - Flint fixes

pull/2539/head
jmontoyaa 8 years ago
parent b829d45225
commit 37406beaaf
  1. 12
      main/extra/create_school_calendar.php
  2. 1
      main/extra/delete_exam.php
  3. 8
      main/extra/edit_exam.php
  4. 3
      main/extra/edit_intervention.php
  5. 1126
      main/extra/myStudents.php
  6. 37
      main/extra/my_progress_ind.php
  7. 113
      main/extra/print_myStudents.php
  8. 14
      main/extra/suivi_group_space.php
  9. 1
      main/extra/upgrade_school_calendar.php

@ -38,22 +38,22 @@ if (empty($title)) {
<?php echo get_lang('edit_save'); ?>
</th>
<tr>
<th><?php echo get_lang('title_calendar') ?></th>
<th><?php echo get_lang('period') ?></th>
<th><?php echo get_lang('action') ?></th>
<th><?php echo get_lang('title_calendar'); ?></th>
<th><?php echo get_lang('period'); ?></th>
<th><?php echo get_lang('action'); ?></th>
</tr>
<td>
<input type=texte name=title value=<?php echo "$title" ?>/>
<input type=texte name=title value=<?php echo "$title"; ?>/>
</td>
<td>
<input SIZE=25 NAME=period
value=<?php echo "$langFrom", ":", "$start_time", "$langTo", "$end_time" ?>/>
value=<?php echo "$langFrom", ":", "$start_time", "$langTo", "$end_time"; ?>/>
</td>
<?php
$date1 = strtotime($start_time); //Premiere date
$date2 = strtotime($end_time); //Deuxieme date
$nbjour = ($date2 - $date1) / 60 / 60 / 24;//Nombre de jours entre les deux
$nbjour = ($date2 - $date1) / 60 / 60 / 24; //Nombre de jours entre les deux
$nbcol = 2;
echo "<table border='1'><tr>";

@ -19,4 +19,3 @@ Database::query($sql);
header("location: myStudents.php?student=$ex_user_id");
exit;

@ -52,12 +52,10 @@ $student_idd = isset($_GET['student_id']) ? (int) $_GET['student_id'] : '';
</td>
<td><input type=text name=score_rep1 size=1 value=".$a_exam['score_rep1']."></td>
<td><input type=text name=score_rep2 size=1 value=".$a_exam['score_rep2']."></td>
";
?>
"; ?>
<td><textarea name="coment" cols="65" rows="2"><?php echo $coment; ?></textarea><br></td>
<INPUT type=hidden name=ex_idd value= <?php echo "$exe_id" ?>/>
<INPUT type=hidden name=student_id value= <?php echo "$student_idd" ?>/>
<INPUT type=hidden name=ex_idd value= <?php echo "$exe_id"; ?>/>
<INPUT type=hidden name=student_id value= <?php echo "$student_idd"; ?>/>
<td>
<input type="submit" value="Sauvegarder" name="B1">
</td>

@ -41,8 +41,7 @@ $tbl_stats_exercices = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCIS
<td>
".$a_inter['exe_date']."
</td>";
$exe_id = $a_inter['exe_id'];
?>
$exe_id = $a_inter['exe_id']; ?>
<td>
<textarea name="inter_coment" cols="65" rows="2">
<?php echo $inter_coment; ?>

File diff suppressed because it is too large Load Diff

@ -36,7 +36,7 @@ foreach ($Sessions as $enreg) {
";
$result8 = Database::query($sql8);
$course_code_id = Database::fetch_array($result8);
$c_id = $course_code_id ['id'];
$c_id = $course_code_id['id'];
$sql = "SELECT DISTINCT c_id,title, CONCAT(lastname, ' ',firstname) coach, username, date_start, date_end, db_name
FROM $tbl_course , $tbl_session_course
LEFT JOIN $tbl_user
@ -65,9 +65,9 @@ $sql2 = "SELECT c_id, user_id
$result2 = Database::query($sql2);
$Total = 0;
while ($a_courses = Database::fetch_array($result2)) {
$courses_code = $a_courses ['c_id'];
//on sort le c_id avec le code du cours
//$sql8 = "SELECT *
$courses_code = $a_courses['c_id'];
//on sort le c_id avec le code du cours
//$sql8 = "SELECT *
// FROM course
// WHERE code = '$courses_code'
// ";
@ -182,7 +182,7 @@ $diff = abs($diff);
";
$result = Database::query($sqlcontrole);
while ($ptctl = Database::fetch_array($result)) {
$pt[] = $ptctl ['diff'];
$pt[] = $ptctl['diff'];
}
//graphique de suivi
@ -223,36 +223,36 @@ $diff = abs($diff);
<tr>
<th align="left" width="412">
<?php echo get_lang('Cumulatif_agenda'); ?>:
<b><font color=#CC0000> <?php echo $jour_realise_tot ?></font></b>
<b><font color=#CC0000> <?php echo $jour_realise_tot; ?></font></b>
</th>
</tr>
<tr>
<th align="left">
<?php echo get_lang('Cumulatif'); ?> <b><font color=#CC0000> <?php echo $Total ?></font></b>
<?php echo get_lang('Cumulatif'); ?> <b><font color=#CC0000> <?php echo $Total; ?></font></b>
</th>
</tr>
<tr>
<th align="left">
<?php echo get_lang('jours_selon_horaire'); ?>:
<b><font color=#CC0000> <?php echo $jour_agenda ?><?php echo $Days ?></font></b>
<b><font color=#CC0000> <?php echo $jour_agenda; ?><?php echo $Days; ?></font></b>
</th>
</tr>
<tr>
<th align="left">
<?php echo get_lang('diff2'); ?>:
<b><font color=#CC0000> <?php echo $diff ?><?php echo $Days, $sing ?></font></b>
<b><font color=#CC0000> <?php echo $diff; ?><?php echo $Days, $sing; ?></font></b>
</th>
</tr>
</table>
<hr>
<table class='data_table'>
<tr>
<th><?php echo get_lang('level') ?> </th>
<th><?php echo get_lang('level'); ?> </th>
<th>
<?php echo get_lang('lang_date') ?>
<?php echo get_lang('lang_date'); ?>
</th>
<th>
<?php echo get_lang('interventions_commentaires') ?>
<?php echo get_lang('interventions_commentaires'); ?>
</th>
</tr>
<?php
@ -288,7 +288,7 @@ $diff = abs($diff);
//début de fin des cours prevu
$user_info = api_get_user_info();
$user_id = api_get_user_id();
//On cherche le calendrier pour ce user et le c_id de ce calendrier
//On cherche le calendrier pour ce user et le c_id de ce calendrier
$sql = "SELECT *
FROM user
WHERE user_id = '$user_id'
@ -316,7 +316,7 @@ $sql2 = "SELECT c_id, user_id
$result2 = Database::query($sql2);
while ($a_courses = Database::fetch_array($result2)) {
$courses_code = $a_courses ['c_id'];
$courses_code = $a_courses['c_id'];
//on sort le c_id avec le code du cours
$sql8 = "SELECT title, code
FROM course
@ -402,7 +402,7 @@ while ($a_courses = Database::fetch_array($result2)) {
$progress = Tracking::get_avg_student_progress(
$user_c_id, /*$c_id*/
$tracking_c_code,
array($lp_id),
[$lp_id],
$session_id
);
if ($progress === null) {
@ -417,7 +417,7 @@ while ($a_courses = Database::fetch_array($result2)) {
$total_time = Tracking::get_time_spent_in_lp(
$user_c_id, /*$c_id*/
$tracking_c_code,
array($lp_id),
[$lp_id],
$session_id
);
if (!empty($total_time)) {
@ -442,7 +442,7 @@ while ($a_courses = Database::fetch_array($result2)) {
}
$warming = '';
$today = date('Y-m-d');
if (isset($end_date_module) && $end_date_module <= $today AND $progress != '100%') {
if (isset($end_date_module) && $end_date_module <= $today and $progress != '100%') {
$warming = '<b><font color=#CC0000> '.get_lang('limite_atteinte').'</font></b>';
}
$end_date_module = $end_date_module.$warming;
@ -503,8 +503,7 @@ echo '</table>';
<td>$coment
";
$exe_idd = $a_exam['exe_id'];
?>
$exe_idd = $a_exam['exe_id']; ?>
</tr>
<?php
}

@ -9,7 +9,7 @@ if (empty($allow)) {
}
$from_myspace = false;
if (isset ($_GET['from']) && $_GET['from'] == 'myspace') {
if (isset($_GET['from']) && $_GET['from'] == 'myspace') {
$from_myspace = true;
$this_section = SECTION_TRACKING;
} else {
@ -19,112 +19,111 @@ if (isset ($_GET['from']) && $_GET['from'] == 'myspace') {
//$nameTools = get_lang('StudentDetails');
$cidReset = true;
$get_course_code = Security:: remove_XSS($_GET['course']);
if (isset ($_GET['details'])) {
if (!empty ($_GET['origin']) && $_GET['origin'] == 'user_course') {
if (isset($_GET['details'])) {
if (!empty($_GET['origin']) && $_GET['origin'] == 'user_course') {
$course_info = CourseManager:: get_course_information($get_course_code);
if (empty ($cidReq)) {
$interbreadcrumb[] = array(
if (empty($cidReq)) {
$interbreadcrumb[] = [
"url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'],
'name' => $course_info['title'],
);
];
}
$interbreadcrumb[] = array(
$interbreadcrumb[] = [
"url" => "../user/user.php?cidReq=".$get_course_code,
"name" => get_lang("Users"),
);
];
} else {
if (!empty ($_GET['origin']) && $_GET['origin'] == 'tracking_course') {
if (!empty($_GET['origin']) && $_GET['origin'] == 'tracking_course') {
$course_info = CourseManager:: get_course_information($get_course_code);
if (empty ($cidReq)) {
if (empty($cidReq)) {
//$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'], 'name' => $course_info['title']);
}
$interbreadcrumb[] = array(
"url" => "../tracking/courseLog.php?cidReq=".$get_course_code.'&studentlist=true&id_session='.(empty ($_SESSION['id_session']) ? '' : $_SESSION['id_session']),
$interbreadcrumb[] = [
"url" => "../tracking/courseLog.php?cidReq=".$get_course_code.'&studentlist=true&id_session='.(empty($_SESSION['id_session']) ? '' : $_SESSION['id_session']),
"name" => get_lang("Tracking"),
);
];
} else {
if (!empty ($_GET['origin']) && $_GET['origin'] == 'resume_session') {
$interbreadcrumb[] = array(
if (!empty($_GET['origin']) && $_GET['origin'] == 'resume_session') {
$interbreadcrumb[] = [
'url' => '../admin/index.php',
"name" => get_lang('PlatformAdmin'),
);
$interbreadcrumb[] = array(
];
$interbreadcrumb[] = [
'url' => "../admin/session_list.php",
"name" => get_lang('SessionList'),
);
$interbreadcrumb[] = array(
];
$interbreadcrumb[] = [
'url' => "../admin/resume_session.php?id_session=".Security:: remove_XSS($_GET['id_session']),
"name" => get_lang('SessionOverview'),
);
];
} else {
$interbreadcrumb[] = array(
$interbreadcrumb[] = [
"url" => "index.php",
"name" => get_lang('MySpace'),
);
if (isset ($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
$interbreadcrumb[] = array(
];
if (isset($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
$interbreadcrumb[] = [
"url" => "student.php?id_coach=".Security:: remove_XSS($_GET['id_coach']),
"name" => get_lang("CoachStudents"),
);
$interbreadcrumb[] = array(
];
$interbreadcrumb[] = [
"url" => "myStudents.php?student=".Security:: remove_XSS(
$_GET['student']
).'&id_coach='.Security:: remove_XSS($_GET['id_coach']),
"name" => get_lang("StudentDetails"),
);
];
} else {
$interbreadcrumb[] = array(
$interbreadcrumb[] = [
"url" => "student.php",
"name" => get_lang("MyStudents"),
);
$interbreadcrumb[] = array(
];
$interbreadcrumb[] = [
"url" => "myStudents.php?student=".Security:: remove_XSS($_GET['student']),
"name" => get_lang("StudentDetails"),
);
];
}
}
}
}
$nameTools = get_lang("DetailsStudentInCourse");
} else {
if (!empty ($_GET['origin']) && $_GET['origin'] == 'resume_session') {
$interbreadcrumb[] = array(
if (!empty($_GET['origin']) && $_GET['origin'] == 'resume_session') {
$interbreadcrumb[] = [
'url' => '../admin/index.php',
"name" => get_lang('PlatformAdmin'),
);
$interbreadcrumb[] = array(
];
$interbreadcrumb[] = [
'url' => "../admin/session_list.php",
"name" => get_lang('SessionList'),
);
$interbreadcrumb[] = array(
];
$interbreadcrumb[] = [
'url' => "../admin/resume_session.php?id_session=".Security:: remove_XSS($_GET['id_session']),
"name" => get_lang('SessionOverview'),
);
];
} else {
$interbreadcrumb[] = array(
$interbreadcrumb[] = [
"url" => "index.php",
"name" => get_lang('MySpace'),
);
if (isset ($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
if (isset ($_GET['id_session']) && intval($_GET['id_session']) != 0) {
$interbreadcrumb[] = array(
];
if (isset($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
if (isset($_GET['id_session']) && intval($_GET['id_session']) != 0) {
$interbreadcrumb[] = [
"url" => "student.php?id_coach=".Security:: remove_XSS(
$_GET['id_coach']
)."&id_session=".$_GET['id_session'],
"name" => get_lang("CoachStudents"),
);
];
} else {
$interbreadcrumb[] = array(
$interbreadcrumb[] = [
"url" => "student.php?id_coach=".Security:: remove_XSS($_GET['id_coach']),
"name" => get_lang("CoachStudents"),
);
];
}
} else {
$interbreadcrumb[] = array(
$interbreadcrumb[] = [
"url" => "student.php",
"name" => get_lang("MyStudents"),
);
];
}
}
}
@ -151,8 +150,7 @@ $student_id = intval($_GET['student']);
// Action behaviour
$check = Security::check_token('get');
if (!empty ($_GET['student'])) // infos about user
{
if (!empty($_GET['student'])) { // infos about user
$info_user = api_get_user_info($student_id);
}
if (api_is_drh() && !UserManager::is_user_followed_by_drh($student_id, $_user['user_id'])) {
@ -169,18 +167,18 @@ $info_user['name'] = api_get_person_name($info_user['firstname'], $info_user['la
echo $info_user['name']; ?>
</th>
<tr>
<th><?php echo get_lang('module_no') ?></th>
<th><?php echo get_lang('module_no'); ?></th>
<th>
<?php echo get_lang('result_exam') ?>
<?php echo get_lang('result_exam'); ?>
</th>
<th>
<?php echo get_lang('result_rep_1') ?>
<?php echo get_lang('result_rep_1'); ?>
</th>
<th>
<?php echo get_lang('result_rep_2') ?>
<?php echo get_lang('result_rep_2'); ?>
</th>
<th>
<?php echo get_lang('comment') ?>
<?php echo get_lang('comment'); ?>
</th>
</tr>
<?php
@ -215,8 +213,7 @@ $info_user['name'] = api_get_person_name($info_user['firstname'], $info_user['la
";
$exe_idd = $a_exam['exe_id'];
$student_id = $_GET['student'];
?>
$student_id = $_GET['student']; ?>
</tr>
<?php
}

@ -34,7 +34,7 @@ if (empty($current_group)) {
$this_section = SECTION_COURSES;
$nameTools = get_lang('suivi_de');
$interbreadcrumb[] = array('url' => 'group.php', 'name' => get_lang('Groups'));
$interbreadcrumb[] = ['url' => 'group.php', 'name' => get_lang('Groups')];
$forums_of_groups = get_forums_of_group($current_group['id']);
$forum_state_public = 0;
if (is_array($forums_of_groups)) {
@ -114,18 +114,17 @@ echo '&nbsp; <a target="_blank" href="save_diff_all.php"><img src="'.api_get_pat
).'addd.gif" border="0" />'.get_lang('save_diff_all').'</a>';
echo '</div>';
$table = new SortableTable(
'group_users',
'get_number_of_group_users',
'get_group_user_data',
(api_is_western_name_order() xor api_sort_by_first_name()) ? 2 : 1
);
//$table -> display();
//$table -> display();
$my_cidreq = isset($_GET['cidReq']) ? Security::remove_XSS($_GET['cidReq']) : '';
$my_origin = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : '';
$my_gidreq = isset($_GET['gidReq']) ? Security::remove_XSS($_GET['gidReq']) : '';
$parameters = array('cidReq' => $my_cidreq, 'origin' => $my_origin, 'gidReq' => $my_gidreq);
$parameters = ['cidReq' => $my_cidreq, 'origin' => $my_origin, 'gidReq' => $my_gidreq];
$table->set_additional_parameters($parameters);
$table->set_header(1, get_lang('OfficialCode'), false, 'align="center"');
@ -135,7 +134,6 @@ if (api_is_western_name_order()) {
} else {
$table->set_header(2, get_lang('LastName'));
$table->set_header(3, get_lang('FirstName'));
}
//the order of these calls is important
$table->set_column_filter(2, 'user_name_filter');
@ -252,8 +250,8 @@ while ($resulta = Database::fetch_array($result)) {
$result2 = Database::query($sql2);
$Total = 0;
while ($a_courses = Database::fetch_array($result2)) {
$Courses_code = $a_courses ['c_id'];
$Courses_rel_user_id = $a_courses ['user_id'];
$Courses_code = $a_courses['c_id'];
$Courses_rel_user_id = $a_courses['user_id'];
//on sort le temps passé dans chaque cours
$sql = "SELECT SUM(UNIX_TIMESTAMP(logout_course_date) - UNIX_TIMESTAMP(login_course_date)) as nb_seconds
FROM track_e_course_access
@ -412,7 +410,7 @@ echo $precision_time;
* @param array Row of the "sortable table" as it is at the time of function call - we extract the user ID from
* there
*
* @return string HTML link
* @return string HTML link
*/
function user_name_filter($name, $url_params, $row)
{

@ -11,7 +11,6 @@ if (empty($allow)) {
exit;
}
Display::display_header($nameTools, "Tracking");
foreach ($_POST as $x) {

Loading…
Cancel
Save