parent
ece1d3a1b3
commit
10c0575477
@ -0,0 +1,23 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
$table = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||
$ex_user_id = isset($_GET['ex_user_id']) ? (int) $_GET['ex_user_id'] : ''; |
||||
$mod_no = isset($_GET['mod_no']) ? Database::escape_string($_GET['mod_no']) : ''; |
||||
$score_ex = isset($_GET['score_ex']) ? Database::escape_string($_GET['score_ex']) : ''; |
||||
$score_rep1 = isset($_GET['score_rep1']) ? Database::escape_string($_GET['score_rep1']) : ''; |
||||
$score_rep2 = isset($_GET['score_rep2']) ? Database::escape_string($_GET['score_rep2']) : ''; |
||||
$coment = isset($_GET['coment']) ? Database::escape_string($_GET['coment']) : ''; |
||||
|
||||
$sql = "INSERT INTO $table (exe_user_id, c_id, mod_no, score_ex, score_rep1, score_rep2, coment) |
||||
VALUES ($ex_user_id, 0, '$mod_no', '$score_ex', '$score_rep1', '$score_rep2', '$coment')"; |
||||
Database::query($sql); |
||||
header("location: myStudents.php?student=$ex_user_id"); |
||||
exit; |
@ -0,0 +1,21 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
$table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||
$comment = isset($_POST['inter_coment']) ? Database::escape_string($_POST['inter_coment']) : ''; |
||||
$date = isset($_POST['date']) ? Database::escape_string($_POST['date']) : ''; |
||||
$level = isset($_POST['level']) ? Database::escape_string($_POST['level']) : ''; |
||||
$ex_user_id = isset($_POST['ex_user_id']) ? Database::escape_string($_POST['ex_user_id']) : ''; |
||||
|
||||
$sql = "INSERT INTO $table (exe_user_id,c_id,level,exe_date,inter_coment) |
||||
VALUES ($ex_user_id, 0, '$level', '$date', '$comment')"; |
||||
Database::query($sql); |
||||
header("location: myStudents.php?student=$ex_user_id"); |
||||
exit; |
@ -0,0 +1,97 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
// database changes |
||||
|
||||
exit; |
||||
|
||||
$sql = "ALTER TABLE track_e_exercises ADD COLUMN coment VARCHAR(255);"; |
||||
Database::query($sql); |
||||
|
||||
$sql = "ALTER TABLE track_e_exercises ADD COLUMN diff VARCHAR(255);"; |
||||
Database::query($sql); |
||||
|
||||
$sql = "ALTER TABLE track_e_exercises ADD COLUMN mod_no VARCHAR(255);"; |
||||
Database::query($sql); |
||||
|
||||
$sql = "ALTER TABLE track_e_exercises ADD COLUMN score_ex VARCHAR(255);"; |
||||
Database::query($sql); |
||||
|
||||
$sql = "ALTER TABLE track_e_exercises ADD COLUMN score_rep1 VARCHAR(255);"; |
||||
Database::query($sql); |
||||
|
||||
$sql = "ALTER TABLE track_e_exercises ADD COLUMN score_rep2 VARCHAR(255);"; |
||||
Database::query($sql); |
||||
|
||||
$sql = "ALTER TABLE track_e_exercises ADD COLUMN inter_coment VARCHAR(255);"; |
||||
Database::query($sql); |
||||
|
||||
$sql = "ALTER TABLE track_e_exercises ADD COLUMN level VARCHAR(255);"; |
||||
Database::query($sql); |
||||
|
||||
$sql = "CREATE TABLE IF NOT EXISTS set_module ( |
||||
`id` int(4) NOT NULL AUTO_INCREMENT, |
||||
`cours` varchar(40) NOT NULL, |
||||
`module` varchar(40) NOT NULL, |
||||
`jours` varchar(6) NOT NULL, |
||||
`cal_name` varchar(20) NOT NULL, |
||||
`cal_day_num` int(6) NOT NULL, |
||||
`cal_date` date NOT NULL, |
||||
PRIMARY KEY (`id`) |
||||
)"; |
||||
|
||||
Database::query($sql); |
||||
|
||||
/*$sql = "CREATE TABLE IF NOT EXISTS `kezprerequisites` ( |
||||
`c_id` int(11) NOT NULL, |
||||
`lp_id` int(11) NOT NULL, |
||||
`id` int(11) NOT NULL, |
||||
`prereq` int(11) DEFAULT NULL, |
||||
`disporder` bigint(20) DEFAULT NULL, |
||||
PRIMARY KEY (`c_id`,`lp_id`,`id`) |
||||
)";*/ |
||||
|
||||
$sql = "CREATE TABLE IF NOT EXISTS `c_cal_dates` ( |
||||
`c_id` int(11) NOT NULL, |
||||
`date` date NOT NULL, |
||||
`status` varchar(1) NOT NULL, |
||||
`horaire_name` varchar(190) DEFAULT NULL, |
||||
UNIQUE KEY `temp` (`c_id`,`date`,`horaire_name`), |
||||
UNIQUE KEY `indexunique` (`c_id`,`date`,`horaire_name`), |
||||
KEY `idx` (`c_id`) |
||||
)"; |
||||
|
||||
Database::query($sql); |
||||
|
||||
$sql = "CREATE TABLE IF NOT EXISTS `c_cal_horaire` ( |
||||
`id` int(11) NOT NULL AUTO_INCREMENT, |
||||
`c_id` int(11) NOT NULL, |
||||
`name` varchar(190) NOT NULL, |
||||
`num_minute` int(11) NOT NULL, |
||||
`num_hours` int(11) NOT NULL, |
||||
`learnpath_dw` varchar(256) NOT NULL, |
||||
PRIMARY KEY (`id`), |
||||
UNIQUE KEY `c_id` (`c_id`,`name`), |
||||
KEY `idx` (`c_id`) |
||||
)"; |
||||
Database::query($sql); |
||||
|
||||
$sql = "CREATE TABLE IF NOT EXISTS `c_cal_set_module` ( |
||||
`id` int(4) NOT NULL AUTO_INCREMENT, |
||||
`c_id` varchar(40) NOT NULL, |
||||
`module` varchar(40) NOT NULL, |
||||
`minutes` int(6) NOT NULL, |
||||
PRIMARY KEY (`id`) |
||||
)"; |
||||
|
||||
Database::query($sql); |
||||
|
||||
$sql = "CREATE TABLE IF NOT EXISTS `c_cal_temp` ( |
||||
`c_id` int(11) NOT NULL, |
||||
`temp` varchar(250) NOT NULL, |
||||
`user` varchar(250) NOT NULL, |
||||
KEY `idx` (`c_id`) |
||||
)"; |
||||
Database::query($sql); |
@ -0,0 +1,21 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
api_block_anonymous_users(); |
||||
|
||||
$ex_user_id = isset($_GET['student_id']) ? (int) $_GET['student_id'] : 0; |
||||
$num = isset($_GET['num']) ? (int) $_GET['num'] : 0; |
||||
|
||||
$table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||
$sql = "DELETE FROM $table WHERE exe_id = $num"; |
||||
Database::query($sql); |
||||
|
||||
header("location: myStudents.php?student=$ex_user_id"); |
||||
exit; |
@ -0,0 +1,69 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
api_block_anonymous_users(); |
||||
|
||||
Display::display_header(); |
||||
|
||||
$tbl_stats_exercices = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||
$num = isset($_GET['num']) ? (int) $_GET['num'] : ''; |
||||
$student_idd = isset($_GET['student_id']) ? (int) $_GET['student_id'] : ''; |
||||
|
||||
?> |
||||
<form action="update_exam.php" method="post" name="save_exam"> |
||||
<table class='data_table'> |
||||
<tr> |
||||
<th colspan="6"> |
||||
<?php echo get_lang('edit_save'); ?> |
||||
</th> |
||||
<tr> |
||||
<th><?php echo get_lang('module_no'); ?></th>
|
||||
<th><?php echo get_lang('result_exam'); ?></th>
|
||||
<th><?php echo get_lang('result_rep_1'); ?></th>
|
||||
<th><?php echo get_lang('result_rep_2'); ?></th>
|
||||
<th><?php echo get_lang('comment'); ?></th>
|
||||
<th><?php echo get_lang('action'); ?></th>
|
||||
</tr> |
||||
<?php |
||||
|
||||
$sqlexam = "SELECT * FROM $tbl_stats_exercices WHERE exe_id = $num"; |
||||
$resultexam = Database::query($sqlexam); |
||||
while ($a_exam = Database::fetch_array($resultexam)) { |
||||
$exe_id = $a_exam['exe_id']; |
||||
$mod_no = $a_exam['mod_no']; |
||||
$score_ex = $a_exam['score_ex']; |
||||
$score_rep1 = $a_exam['score_rep1']; |
||||
$score_rep2 = $a_exam['score_rep2']; |
||||
$coment = $a_exam['coment']; |
||||
echo " |
||||
<tr> |
||||
<td> |
||||
<input type=text name=mod_no size=1 value= ".$a_exam['mod_no']."> |
||||
</td> |
||||
<td> |
||||
<input type=text name=score_ex size=1 value=".$a_exam['score_ex']."> |
||||
</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\">$coment</textarea><br /></td> |
||||
<INPUT type=hidden name=ex_idd value=\"$exe_id\" /> |
||||
<INPUT type=hidden name=student_id value=\"$student_idd\" /> |
||||
<td> |
||||
<input type=\"submit\" value=\"".get_lang('Save')."\" name=\"B1\"> |
||||
</td> |
||||
</tr> |
||||
"; |
||||
} |
||||
?> |
||||
</table> |
||||
</form> |
||||
<?php |
||||
|
||||
Display::display_footer(); |
@ -0,0 +1,61 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
api_block_anonymous_users(); |
||||
|
||||
Display::display_header(); |
||||
$num = isset($_GET['num']) ? (int) $_GET['num'] : 0; |
||||
$student_idd = isset($_GET['student_id']) ? (int) $_GET['student_id'] : 0; |
||||
$tbl_stats_exercices = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||
|
||||
?> |
||||
<form action="update_intervention.php" method="post" name="save_intercention"> |
||||
<table class='data_table'> |
||||
<tr> |
||||
<th colspan="4"><?php echo get_lang('Edit'); ?> |
||||
<tr> |
||||
<th><?php echo get_lang('Level'); ?></th>
|
||||
<th><?php echo get_lang('Date'); ?></th>
|
||||
<th><?php echo get_lang('interventions_commentaires'); ?></th>
|
||||
<th><?php echo get_lang('Action'); ?></th>
|
||||
</tr> |
||||
<?php |
||||
$sqlinter = "SELECT * FROM $tbl_stats_exercices WHERE exe_id = $num"; |
||||
$resultinter = Database::query($sqlinter); |
||||
while ($a_inter = Database::fetch_array($resultinter)) { |
||||
$level = $a_inter['level']; |
||||
$mod_no = $a_inter['mod_no']; |
||||
$score_ex = $a_inter['score_ex']; |
||||
$inter_coment = stripslashes($a_inter['inter_coment']); |
||||
echo " |
||||
<tr> |
||||
<td> ".$a_inter['level']." |
||||
</td> |
||||
<td> |
||||
".$a_inter['exe_date']." |
||||
</td>"; |
||||
$exe_id = $a_inter['exe_id']; ?> |
||||
<td> |
||||
<textarea name="inter_coment" cols="65" rows="2"> |
||||
<?php echo $inter_coment; ?> |
||||
</textarea> |
||||
</td> |
||||
<INPUT type=hidden name=exe_id 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> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
</form> |
||||
<?php |
||||
|
||||
Display::display_footer(); |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,514 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
api_block_anonymous_users(); |
||||
|
||||
$nameTools = get_lang('MyProgress'); |
||||
$this_section = 'session_my_progress_ind'; |
||||
$_user = api_get_user_info(); |
||||
|
||||
$tbl_stats_exercices = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||
$tbl_stats_access = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS); |
||||
|
||||
Display::display_header($nameTools); |
||||
|
||||
$result = Database::query( |
||||
"SELECT DISTINCT session.id as id, name, access_start_date date_start, access_end_date date_end |
||||
FROM session_rel_course_rel_user,session |
||||
WHERE session_id=session.id AND user_id=".$_user['user_id']." |
||||
ORDER BY date_start, date_end, name"); |
||||
|
||||
$Sessions = Database::store_result($result); |
||||
$Courses = []; |
||||
|
||||
foreach ($Sessions as $enreg) { |
||||
$id_session_temp = $enreg['id']; |
||||
$sql8 = "SELECT * |
||||
FROM course |
||||
WHERE code = '$courses_code' |
||||
"; |
||||
$result8 = Database::query($sql8); |
||||
$course_code_id = Database::fetch_array($result8); |
||||
$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 |
||||
ON $tbl_session_course.id_coach = $tbl_user.user_id |
||||
INNER JOIN $tbl_session_course_user |
||||
ON $tbl_session_course_user.id_session = $tbl_session_course.id_session |
||||
AND $tbl_session_course_user.id_user = '".$_user['user_id']."' |
||||
INNER JOIN $tbl_session ON $tbl_session.id = $tbl_session_course.id_session |
||||
WHERE $tbl_session_course.c_id=$c_id |
||||
AND $tbl_session_course.id_session='$id_session_temp' |
||||
ORDER BY title"; |
||||
$result = Database::query($sql); |
||||
while ($a_session_courses = Database::fetch_array($result)) { |
||||
$a_session_courses['id_session'] = $id_session_temp; |
||||
$Courses[$a_session_courses['code']] = $a_session_courses; |
||||
} |
||||
} |
||||
|
||||
// affichage des jours complétés dans les parcours l'élève |
||||
//on recherche les cours où sont inscrit les user |
||||
$user_c_id = $_user['user_id']; |
||||
$sql2 = "SELECT c_id, user_id |
||||
FROM course_rel_user |
||||
WHERE user_id = '$user_c_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 * |
||||
// FROM course |
||||
// WHERE code = '$courses_code' |
||||
// "; |
||||
// $result8 = Database::query($sql8); |
||||
// $course_code_id = Database::fetch_array($result8) ; |
||||
$c_id = $courses_code; |
||||
//pours chaque cours dans lequel il est inscrit, on cherche les jours complétés |
||||
$Req1 = "SELECT * |
||||
FROM c_lp_view |
||||
WHERE user_id = '$user_c_id' AND c_id = '$c_id' |
||||
"; |
||||
$res = Database::query($Req1); |
||||
while ($result = Database::fetch_array($res)) { |
||||
$lp_id = $result['lp_id']; |
||||
$lp_id_view = $result['id']; |
||||
$c_id_view = $result['c_id']; |
||||
$Req2 = "SELECT id, lp_id ,title ,item_type |
||||
FROM c_lp_item |
||||
WHERE lp_id = '$lp_id' |
||||
AND title LIKE '(+)%' |
||||
AND c_id = '$c_id_view' |
||||
AND item_type = 'document' |
||||
"; |
||||
$res2 = Database::query($Req2); |
||||
while ($resulta = Database::fetch_array($res2)) { |
||||
$lp_item_id = $resulta['id']; |
||||
$Req3 = " SELECT Max(id) |
||||
FROM c_lp_item_view |
||||
WHERE |
||||
lp_item_id = '$lp_item_id' AND |
||||
lp_view_id = '$lp_id_view' AND |
||||
c_id = '$c_id_view' AND |
||||
status = 'completed' |
||||
"; |
||||
$res3 = Database::query($Req3); |
||||
while ($resul = Database::fetch_array($res3)) { |
||||
$max = $resul['0']; |
||||
$Req4 = "SELECT COUNT( id ) |
||||
FROM c_lp_item_view |
||||
WHERE |
||||
id = '$max' AND |
||||
c_id = '$c_id_view' |
||||
"; |
||||
$res4 = Database::query($Req4); |
||||
while ($resultat = Database::fetch_array($res4)) { |
||||
if ($resultat[0] == null) { |
||||
$resultat[0] = 0; |
||||
} |
||||
$Total = $Total + $resultat[0]; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
api_display_tool_title($nameTools); |
||||
|
||||
$now = date('Y-m-d'); |
||||
$tbl_personal_agenda = Database:: get_main_table(TABLE_PERSONAL_AGENDA); |
||||
|
||||
//on compte le nombre de m% dans l'agenda pour chaque module |
||||
$sqljtot = "SELECT COUNT( * ) AS TOT |
||||
FROM $tbl_personal_agenda |
||||
WHERE user = '".$_user['user_id']."' |
||||
And title like 'm%' |
||||
|
||||
"; |
||||
$resultjt = Database::query($sqljtot); |
||||
$jour_realise = 0; |
||||
while ($jtot = Database::fetch_array($resultjt)) { |
||||
$jour_realise_tot = ($jour_realise + $jtot['TOT']) / 2; |
||||
} |
||||
|
||||
//fin des jour de l'agenda |
||||
//on trouve le nombre dans l'agenda selon la date d'aujourdhui |
||||
//si rien n'est inscrit cette journée dans l'agenda, recule de -1 |
||||
$jour_agenda = ''; |
||||
$tour = -1; |
||||
while ($jour_agenda == '') { |
||||
$tour++; |
||||
$date = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - $tour, date("Y"))); |
||||
$sql4 = "SELECT title FROM $tbl_personal_agenda |
||||
WHERE user = '".$_user['user_id']."' AND |
||||
text='Pour le calendrier, ne pas effacer' AND |
||||
date like '".$date." %:%' "; |
||||
$result4 = Database::query($sql4); |
||||
$res4 = Database::fetch_array($result4); |
||||
$jour_agenda = $res4['title']; |
||||
if ($tour > 300) { |
||||
break; |
||||
} |
||||
} |
||||
$diff = $jour_agenda - $Total; |
||||
if ($diff > 0) { |
||||
$sing = get_lang('retard'); |
||||
} else { |
||||
$sing = get_lang('avance'); |
||||
} |
||||
$diff = abs($diff); |
||||
?> |
||||
<table class="data_table"> |
||||
<th rowspan="5"> |
||||
<?php |
||||
//on récupere les points de controle de l'élève |
||||
$pt[] = '0'; |
||||
$pt[] = '0'; |
||||
$sqlcontrole = "SELECT diff |
||||
FROM $tbl_stats_exercices |
||||
WHERE exe_user_id = ".$_user['user_id']." |
||||
AND diff != '' |
||||
ORDER BY exe_date ASC |
||||
"; |
||||
$result = Database::query($sqlcontrole); |
||||
while ($ptctl = Database::fetch_array($result)) { |
||||
$pt[] = $ptctl['diff']; |
||||
} |
||||
|
||||
//graphique de suivi |
||||
|
||||
/*include "../inc/teechartphp/sources/TChart.php"; |
||||
$chart = new TChart(500, 300); |
||||
$chart->getAspect()->setView3D(false); |
||||
$chart->getHeader()->setText("Graphique de suivi"); |
||||
$chart->getAxes()->getLeft()->setMinimumOffset(10); |
||||
$chart->getAxes()->getLeft()->setMaximumOffset(10); |
||||
$chart->getAxes()->getBottom()->setMinimumOffset(10); |
||||
$chart->getAxes()->getBottom()->setMaximumOffset(10); |
||||
$line1 = new Line($chart->getChart()); |
||||
$data = $pt; |
||||
$line1->addArray($data); |
||||
foreach ($chart->getSeries() as $serie) { |
||||
$pointer = $serie->getPointer(); |
||||
$pointer->setVisible(true); |
||||
$pointer->getPen()->setVisible(false); |
||||
$pointer->setHorizSize(2); |
||||
$pointer->setVertSize(2); |
||||
|
||||
$marks = $serie->getMarks(); |
||||
$marks->setVisible(true); |
||||
$marks->setArrowLength(5); |
||||
$marks->getArrow()->setVisible(false); |
||||
$marks->setTransparent(true); |
||||
} |
||||
|
||||
$x = $_user['user_id']; |
||||
$line1->getPointer()->setStyle(PointerStyle::$CIRCLE); |
||||
$chart->getLegend()->setVisible(false); |
||||
$chart->render("../garbage/$x-image.png"); |
||||
$rand = rand(); |
||||
print '<img src="../garbage/'.$x.'-image.png?rand='.$rand.'">'; |
||||
*/ |
||||
?> |
||||
<tr> |
||||
<th align="left" width="412"> |
||||
<?php echo get_lang('Cumulatif_agenda'); ?>:
|
||||
<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>
|
||||
</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>
|
||||
</th> |
||||
</tr> |
||||
<tr> |
||||
<th align="left"> |
||||
<?php echo get_lang('diff2'); ?>:
|
||||
<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('lang_date'); ?> |
||||
</th> |
||||
<th> |
||||
<?php echo get_lang('interventions_commentaires'); ?> |
||||
</th> |
||||
</tr> |
||||
<?php |
||||
|
||||
$sqlinter = "SELECT * |
||||
FROM $tbl_stats_exercices |
||||
WHERE exe_user_id = ".$_user['user_id']." |
||||
And level != 0 |
||||
Order by LEVEL ASC"; |
||||
$resultinter = Database::query($sqlinter); |
||||
$level = ''; |
||||
while ($a_inter = Database::fetch_array($resultinter)) { |
||||
$level = $a_inter['level']; |
||||
$mod_no = $a_inter['mod_no']; |
||||
$inter_coment = Security::remove_XSS($a_inter['inter_coment']); |
||||
$inter_date = substr($a_inter['exe_date'], 0, 11); |
||||
echo " |
||||
<tr> |
||||
<td> ".$a_inter['level']."</td> |
||||
<td> $inter_date </td> |
||||
<td>$inter_coment</td>"; |
||||
$exe_id = $a_inter['exe_id']; |
||||
} |
||||
if ($level == 3) { |
||||
echo '<span style="color: red; font-weight: bold;"><img src="../img/anim/pointeranim.gif"align="middle" > '; |
||||
echo $limit; |
||||
echo '</span>'; |
||||
} |
||||
?> |
||||
<p> |
||||
</table><br> |
||||
<?php |
||||
//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 |
||||
$sql = "SELECT * |
||||
FROM user |
||||
WHERE user_id = '$user_id' |
||||
"; |
||||
$result = Database::query($sql); |
||||
$horaire_id = Database::fetch_array($result); |
||||
$nom_hor = $horaire_id['official_code']; |
||||
$c_id_horaire = strstr($nom_hor, '.'); |
||||
$c_id_horaire = str_replace(".", "", "$c_id_horaire"); |
||||
// Courses |
||||
echo '<h3>'.get_lang('Course').'</h3>'; |
||||
echo '<table class="data_table">'; |
||||
echo '<tr> |
||||
<th>'.get_lang('Course').'</th> |
||||
<th>'.get_lang('Time').'</th> |
||||
<th>'.get_lang('FirstConnexion').'</th> |
||||
<th>'.get_lang('Progress').'</th> |
||||
<th>'.get_lang('fin_mod_prevue').'</th> |
||||
</tr>'; |
||||
//on recherche les cours où sont inscrit les user |
||||
$user_c_id = $_user['user_id']; |
||||
$sql2 = "SELECT c_id, user_id |
||||
FROM course_rel_user |
||||
WHERE user_id = '$user_id'"; |
||||
|
||||
$result2 = Database::query($sql2); |
||||
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 title, code |
||||
FROM course |
||||
WHERE id = '$courses_code'"; |
||||
$result8 = Database::query($sql8); |
||||
$course_code_id = Database::fetch_array($result8); |
||||
$c_id = $courses_code; |
||||
$c_title = $course_code_id['title']; |
||||
// Francois Belisle Kezber |
||||
// The Tracking Class still uses the course code rather then the course id. |
||||
$tracking_c_code = $course_code_id['code']; |
||||
// time spent on the course |
||||
$time_spent_on_course = api_time_to_hms(Tracking:: get_time_spent_on_the_course($user_id, $c_id, $session_id)); |
||||
// firts connection date |
||||
$sql2 = "SELECT STR_TO_DATE(access_date,'%Y-%m-%d') |
||||
FROM $tbl_stats_access |
||||
WHERE |
||||
access_user_id = '$user_id' AND |
||||
c_id = '$c_id' |
||||
ORDER BY access_id ASC |
||||
LIMIT 0,1"; |
||||
|
||||
//Francois Belisle Kezber |
||||
// mysql fonctions rather then Database:: |
||||
// conversion to Database:: |
||||
$rs2 = Database::query($sql2); |
||||
$num_rows = Database::num_rows($rs2); |
||||
if ($num_rows > 0) { |
||||
$rw2 = Database::fetch_array($rs2); |
||||
$first_connection_date_to_module = $rw2[0]; |
||||
} |
||||
|
||||
//pour trouver la date de fin prévue du module |
||||
$end_date_module = get_lang('hors_cal'); |
||||
//on trouve le nombre de jour pour ce module |
||||
$sql = "SELECT * FROM c_cal_set_module |
||||
where c_id = '$c_id'"; |
||||
$res = Database::query($sql); |
||||
$resulta = Database::fetch_array($res); |
||||
$nombre_heure = $resulta['minutes']; |
||||
// on trouve le nombre de minute par jour |
||||
$sql = "SELECT * FROM c_cal_horaire |
||||
where c_id = '$c_id_horaire' |
||||
AND name = '$nom_hor' |
||||
"; |
||||
|
||||
$res = Database::query($sql); |
||||
$resulta = Database::fetch_array($res); |
||||
$nombre_minutes = (int) $resulta['num_minute']; |
||||
//on calcule le nombre de jour par module |
||||
$nombre_jours_module = 0; |
||||
if (!empty($nombre_minutes)) { |
||||
$nombre_jours_module = $nombre_heure * '60' / $nombre_minutes; |
||||
} |
||||
//on arrondi |
||||
$nombre_jours_module = (int) $nombre_jours_module; |
||||
//on trouve la date de fin de chaque module AND date = date_format('$first_connection_date_to_module','%Y-%m-%d') |
||||
$sql = "SELECT * FROM c_cal_dates |
||||
WHERE |
||||
horaire_name = '$nom_hor' AND |
||||
c_id = '$c_id_horaire' AND |
||||
STR_TO_DATE(date,'%Y-%m-%d') >= STR_TO_DATE('$first_connection_date_to_module','%Y-%m-%d') |
||||
ORDER BY STR_TO_DATE(date, '%Y-%m-%d') asc |
||||
LIMIT $nombre_jours_module, 18446744073709551615 |
||||
"; |
||||
$res = Database::query($sql); |
||||
//Database::data_seek($res,$nombre_jours_module); |
||||
$row = Database::fetch_row($res); |
||||
$end_date_module = $row[1]; |
||||
//fin de trouver la date de fin prévue du module |
||||
//progression en % |
||||
$t_lp = Database:: get_course_table(TABLE_LP_MAIN); |
||||
$sql_lp = " SELECT lp.name, lp.id FROM $t_lp lp WHERE c_id = '$c_id' ORDER BY lp.display_order"; |
||||
$rs_lp = Database::query($sql_lp); |
||||
$i = 0; |
||||
while ($learnpath = Database:: fetch_array($rs_lp)) { |
||||
$lp_id = intval($learnpath['id']); |
||||
$lp_name = $learnpath['name']; |
||||
$any_result = false; |
||||
// Get progress in lp |
||||
// Francois Belisle Kezber |
||||
// Course Code passed rather then course_id |
||||
$progress = Tracking::get_avg_student_progress( |
||||
$user_c_id, /*$c_id*/ |
||||
$tracking_c_code, |
||||
[$lp_id], |
||||
$session_id |
||||
); |
||||
if ($progress === null) { |
||||
$progress = '0%'; |
||||
} else { |
||||
$any_result = true; |
||||
} |
||||
|
||||
// Get time in lp |
||||
// Francois Belisle Kezber |
||||
// Course Code passed rather then course_id |
||||
$total_time = Tracking::get_time_spent_in_lp( |
||||
$user_c_id, /*$c_id*/ |
||||
$tracking_c_code, |
||||
[$lp_id], |
||||
$session_id |
||||
); |
||||
if (!empty($total_time)) { |
||||
$any_result = true; |
||||
} |
||||
|
||||
if ($i % 2 == 0) { |
||||
$css_class = "row_even"; |
||||
} else { |
||||
$css_class = "row_odd"; |
||||
} |
||||
|
||||
$i++; |
||||
|
||||
if (is_numeric($progress)) { |
||||
$progress = $progress.'%'; |
||||
} else { |
||||
$progress = '-'; |
||||
} |
||||
$data_learnpath[/*$i*/ |
||||
$lp_id][] = $progress.'%'; |
||||
} |
||||
$warming = ''; |
||||
$today = date('Y-m-d'); |
||||
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; |
||||
echo '<tr> |
||||
<td >'.$c_title.'</td> |
||||
<td >'.$time_spent_on_course.'</td> |
||||
<td >'.$first_connection_date_to_module.'</td> |
||||
<td >'.$progress.'</td> |
||||
<td >'.$end_date_module.'</td>'; |
||||
echo '</tr>'; |
||||
} |
||||
echo '</table>'; |
||||
?> </table> |
||||
<br/><br/> |
||||
<table class='data_table'> |
||||
<tr> |
||||
<th colspan="6"> |
||||
<?php |
||||
echo get_lang('result_exam'); |
||||
//echo $_user['name']; |
||||
?> |
||||
</th> |
||||
<tr> |
||||
<th><?php echo get_lang('module'); ?></th>
|
||||
<th><?php echo get_lang('result_exam'); ?></th>
|
||||
<th><?php echo get_lang('result_rep_1'); ?></th>
|
||||
<th><?php echo get_lang('result_rep_2'); ?></th>
|
||||
<th><?php echo get_lang('comment'); ?></th>
|
||||
</tr> |
||||
<?php |
||||
|
||||
$sqlexam = "SELECT * |
||||
FROM $tbl_stats_exercices |
||||
WHERE exe_user_id = '".$_user['user_id']."' |
||||
AND c_id = '0' AND mod_no != '0' |
||||
ORDER BY mod_no ASC"; |
||||
$resultexam = Database::query($sqlexam); |
||||
while ($a_exam = Database::fetch_array($resultexam)) { |
||||
$ex_id = $a_exam['ex_id']; |
||||
$mod_no = $a_exam['mod_no']; |
||||
$score_ex = $a_exam['score_ex']; |
||||
$score_rep1 = $a_exam['score_rep1']; |
||||
$score_rep2 = $a_exam['score_rep2']; |
||||
$coment = stripslashes($a_exam['coment']); |
||||
echo " |
||||
<tr> |
||||
<td><center> ".$a_exam['mod_no']." |
||||
</td> |
||||
<td><center> |
||||
".$a_exam['score_ex']." |
||||
</td> |
||||
<td><center> |
||||
".$a_exam['score_rep1']." |
||||
</td><center> |
||||
<td><center> |
||||
".$a_exam['score_rep2']." |
||||
</td> |
||||
<td>$coment |
||||
|
||||
"; |
||||
$exe_idd = $a_exam['exe_id']; ?> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php |
||||
|
||||
Display::display_footer(); |
@ -0,0 +1,222 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
$from_myspace = false; |
||||
if (isset($_GET['from']) && $_GET['from'] == 'myspace') { |
||||
$from_myspace = true; |
||||
$this_section = SECTION_TRACKING; |
||||
} else { |
||||
$this_section = SECTION_COURSES; |
||||
} |
||||
|
||||
//$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') { |
||||
$course_info = CourseManager:: get_course_information($get_course_code); |
||||
if (empty($cidReq)) { |
||||
$interbreadcrumb[] = [ |
||||
"url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'], |
||||
'name' => $course_info['title'], |
||||
]; |
||||
} |
||||
$interbreadcrumb[] = [ |
||||
"url" => "../user/user.php?cidReq=".$get_course_code, |
||||
"name" => get_lang("Users"), |
||||
]; |
||||
} else { |
||||
if (!empty($_GET['origin']) && $_GET['origin'] == 'tracking_course') { |
||||
$course_info = CourseManager:: get_course_information($get_course_code); |
||||
if (empty($cidReq)) { |
||||
//$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'], 'name' => $course_info['title']); |
||||
} |
||||
$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[] = [ |
||||
'url' => '../admin/index.php', |
||||
"name" => get_lang('PlatformAdmin'), |
||||
]; |
||||
$interbreadcrumb[] = [ |
||||
'url' => "../admin/session_list.php", |
||||
"name" => get_lang('SessionList'), |
||||
]; |
||||
$interbreadcrumb[] = [ |
||||
'url' => "../admin/resume_session.php?id_session=".Security:: remove_XSS($_GET['id_session']), |
||||
"name" => get_lang('SessionOverview'), |
||||
]; |
||||
} else { |
||||
$interbreadcrumb[] = [ |
||||
"url" => "index.php", |
||||
"name" => get_lang('MySpace'), |
||||
]; |
||||
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[] = [ |
||||
"url" => "myStudents.php?student=".Security:: remove_XSS( |
||||
$_GET['student'] |
||||
).'&id_coach='.Security:: remove_XSS($_GET['id_coach']), |
||||
"name" => get_lang("StudentDetails"), |
||||
]; |
||||
} else { |
||||
$interbreadcrumb[] = [ |
||||
"url" => "student.php", |
||||
"name" => get_lang("MyStudents"), |
||||
]; |
||||
$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[] = [ |
||||
'url' => '../admin/index.php', |
||||
"name" => get_lang('PlatformAdmin'), |
||||
]; |
||||
$interbreadcrumb[] = [ |
||||
'url' => "../admin/session_list.php", |
||||
"name" => get_lang('SessionList'), |
||||
]; |
||||
$interbreadcrumb[] = [ |
||||
'url' => "../admin/resume_session.php?id_session=".Security:: remove_XSS($_GET['id_session']), |
||||
"name" => get_lang('SessionOverview'), |
||||
]; |
||||
} else { |
||||
$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[] = [ |
||||
"url" => "student.php?id_coach=".Security:: remove_XSS( |
||||
$_GET['id_coach'] |
||||
)."&id_session=".$_GET['id_session'], |
||||
"name" => get_lang("CoachStudents"), |
||||
]; |
||||
} else { |
||||
$interbreadcrumb[] = [ |
||||
"url" => "student.php?id_coach=".Security:: remove_XSS($_GET['id_coach']), |
||||
"name" => get_lang("CoachStudents"), |
||||
]; |
||||
} |
||||
} else { |
||||
$interbreadcrumb[] = [ |
||||
"url" => "student.php", |
||||
"name" => get_lang("MyStudents"), |
||||
]; |
||||
} |
||||
} |
||||
} |
||||
|
||||
api_block_anonymous_users(); |
||||
|
||||
if (!api_is_allowed_to_edit() && !api_is_coach() && !api_is_drh() && !api_is_course_tutor( |
||||
) && $_user['status'] != SESSIONADMIN && !api_is_platform_admin(true)) { |
||||
api_not_allowed(true); |
||||
} |
||||
|
||||
Display:: display_header($nameTools); |
||||
$tbl_stats_exercices = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||
|
||||
if (isset($_GET['user_id']) && $_GET['user_id'] != '') { |
||||
$user_id = intval($_GET['user_id']); |
||||
} else { |
||||
$user_id = $_user['user_id']; |
||||
} |
||||
|
||||
$session_id = isset($_GET['id_session']) ? intval($_GET['id_session']) : 0; |
||||
$student_id = (int) $_GET['student']; |
||||
|
||||
// Action behaviour |
||||
$check = Security::check_token('get'); |
||||
|
||||
if (!empty($student_id)) { // 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'])) { |
||||
api_not_allowed(); |
||||
} |
||||
|
||||
$info_user['name'] = api_get_person_name($info_user['firstname'], $info_user['lastname']); |
||||
|
||||
?> |
||||
<table class='data_table'> |
||||
<tr> |
||||
<th colspan="6"> |
||||
<?php echo get_lang('result_exam_title'); |
||||
echo $info_user['name']; ?> |
||||
</th> |
||||
<tr> |
||||
<th><?php echo get_lang('module_no'); ?></th>
|
||||
<th> |
||||
<?php echo get_lang('result_exam'); ?> |
||||
</th> |
||||
<th> |
||||
<?php echo get_lang('result_rep_1'); ?> |
||||
</th> |
||||
<th> |
||||
<?php echo get_lang('result_rep_2'); ?> |
||||
</th> |
||||
<th> |
||||
<?php echo get_lang('comment'); ?> |
||||
</th> |
||||
</tr> |
||||
<?php |
||||
$sqlexam = "SELECT * |
||||
FROM $tbl_stats_exercices |
||||
WHERE exe_user_id = $student_id |
||||
AND c_id = 0 AND mod_no != '0' |
||||
ORDER BY mod_no ASC"; |
||||
$resultexam = Database::query($sqlexam); |
||||
while ($a_exam = Database::fetch_array($resultexam)) { |
||||
//$ex_id = $a_exam['ex_id']; |
||||
$mod_no = $a_exam['mod_no']; |
||||
$score_ex = $a_exam['score_ex']; |
||||
$score_rep1 = $a_exam['score_rep1']; |
||||
$score_rep2 = $a_exam['score_rep2']; |
||||
$coment = stripslashes($a_exam['coment']); |
||||
echo " |
||||
<tr> |
||||
<td> ".$a_exam['mod_no']." |
||||
</td> |
||||
<td> |
||||
".$a_exam['score_ex']." |
||||
</td> |
||||
<td> |
||||
".$a_exam['score_rep1']." |
||||
</td> |
||||
<td> |
||||
".$a_exam['score_rep2']." |
||||
</td> |
||||
<td> |
||||
$coment |
||||
</td> |
||||
</tr> |
||||
"; |
||||
$exe_idd = $a_exam['exe_id']; |
||||
} |
||||
?> |
||||
</table> |
||||
</form> |
||||
<strong><?php echo get_lang('imprime_sommaire'); ?> </strong>
|
||||
<a href="#" onclick="window.print()"><img align="absbottom" src="../img/printmgr.gif" border="0"></a> |
@ -0,0 +1,67 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
// not used?? |
||||
exit; |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
Display::display_header($nameTools, "Tracking"); |
||||
|
||||
foreach ($_POST as $index => $valeur) { |
||||
$$index = Database::escape_string(trim($valeur)); |
||||
} |
||||
|
||||
?> |
||||
<form action="upgrade_school_calendar.php" method="post" name="upgrade_cal"> |
||||
<th colspan="6"> |
||||
<?php echo get_lang('edit_save'); ?> |
||||
</th> |
||||
<tr> |
||||
</th> |
||||
</tr> |
||||
<?php |
||||
|
||||
echo "<table border='1'><tr>"; |
||||
|
||||
if ($i % $nbcol == 0) { |
||||
$sqlexam = "SELECT * FROM set_module |
||||
WHERE cal_name = '$d_title'"; |
||||
} |
||||
|
||||
$resultexam = Database::query($sqlexam); |
||||
while ($a_exam = Database::fetch_array($resultexam)) { |
||||
$name = $a_exam['cal_name']; |
||||
$id = $a_exam['id']; |
||||
$num = $a_exam['cal_day_num']; |
||||
$c_date = $a_exam['cal_date']; |
||||
echo " |
||||
<td><input type=text name=d_cal_date size=8 value=".$c_date."></td> |
||||
<td><input type=text name=d_number size=5 value=".$num."></td> |
||||
<td><input type=text name=d_title size=8 value=".$name."></td> |
||||
<td><input name=d_id size=8 value=".$id."></td>"; |
||||
if ($i % $nbcol == ($nbcol - 1)) { |
||||
echo "</tr>"; |
||||
} |
||||
} |
||||
|
||||
$nb = count($d_number); |
||||
$nbcol = 2; |
||||
?> |
||||
</td> |
||||
</tr> |
||||
<input type=hidden name=aaa value=<?= serialize(Database::fetch_array($resultexam)); ?>/>
|
||||
<input type="submit" value="Sauvegarder" name="B1"> |
||||
<?php |
||||
echo $id, $tableau; |
||||
?> |
||||
</form> |
||||
</table> |
||||
<?php |
||||
|
||||
Display::display_footer(); |
@ -0,0 +1,28 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
$tbl_stats_exercices = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||
|
||||
$ex_idd = isset($_POST['exe_id']) ? (int) $_POST['exe_id'] : ''; |
||||
$ex_user_id = isset($_POST['ex_user_id']) ? (int) $_POST['ex_user_id'] : ''; |
||||
$mod_no = isset($_POST['mod_no']) ? Database::escape_string($_POST['mod_no']) : ''; |
||||
$score_ex = isset($_POST['score_ex']) ? Database::escape_string($_POST['score_ex']) : ''; |
||||
$score_rep1 = isset($_POST['score_rep1']) ? Database::escape_string($_POST['score_rep1']) : ''; |
||||
$score_rep2 = isset($_POST['score_rep2']) ? Database::escape_string($_POST['score_rep2']) : ''; |
||||
$coment = isset($_POST['coment']) ? Database::escape_string($_POST['coment']) : ''; |
||||
$student_id = isset($_POST['student_id']) ? Database::escape_string($_POST['student_id']) : ''; |
||||
|
||||
$sql = "UPDATE $tbl_stats_exercices SET |
||||
mod_no='$mod_no', score_ex='$score_ex', score_rep1='$score_rep1', score_rep2='$score_rep2', coment='$coment' |
||||
WHERE exe_id = '$ex_idd' |
||||
"; |
||||
Database::query($sql); |
||||
header("location:../extra/myStudents.php?student=$student_id"); |
||||
exit; |
@ -0,0 +1,18 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
$table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||
$ex_id = isset($_POST['exe_id']) ? (int) $_POST['exe_id'] : ''; |
||||
$student_id = isset($_POST['student_id']) ? (int) $_POST['student_id'] : ''; |
||||
$inter_coment = isset($_POST['inter_coment']) ? Database::escape_string($_POST['inter_coment']) : ''; |
||||
$sql = "UPDATE $table SET inter_coment='$inter_coment' WHERE exe_id = $ex_id"; |
||||
Database::query($sql); |
||||
header("location:../extra/myStudents.php?student=$student_id"); |
||||
exit; |
@ -0,0 +1,33 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
// not used?? |
||||
exit; |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
Display::display_header($nameTools, "Tracking"); |
||||
|
||||
foreach ($_POST as $x) { |
||||
echo "$x <br />"; |
||||
} |
||||
|
||||
foreach ($_POST as $index => $valeur) { |
||||
$$index = Database::escape_string(trim($valeur)); |
||||
} |
||||
|
||||
?> |
||||
<?php echo get_lang('edit_save'); ?> |
||||
<?php |
||||
$d_id = (int) $d_id; |
||||
$d_number = (int) $d_number; |
||||
$sql4 = "UPDATE set_module SET cal_day_num = $d_number WHERE id = $d_id "; |
||||
Database::query($sql4); |
||||
print_r(unserialize(Security::remove_XSS($_POST['aaa']))); |
||||
|
||||
Display::display_footer(); |
@ -0,0 +1,456 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once '../inc/global.inc.php'; |
||||
require_once 'userInfoLib.php'; |
||||
|
||||
$allow = api_get_configuration_value('extra'); |
||||
if (empty($allow)) { |
||||
exit; |
||||
} |
||||
|
||||
$TABLECALHORAIRE = Database :: get_course_table(cal_horaire); |
||||
$htmlHeadXtra[] = '<script> |
||||
function show_image(image,width,height) { |
||||
width = parseInt(width) + 20; |
||||
height = parseInt(height) + 20; |
||||
window_x = window.open(image,\'windowX\',\'width=\'+ width + \', height=\'+ height + \'\'); |
||||
} |
||||
</script>'; |
||||
|
||||
$editMainUserInfo = Security::remove_XSS($_REQUEST['editMainUserInfo']); |
||||
$uInfo = $editMainUserInfo; |
||||
$this_section = SECTION_COURSES; |
||||
|
||||
$nameTools = get_lang('Users'); |
||||
api_protect_course_script(true); |
||||
$tool_info = api_get_tool_information_by_name(TOOL_USER); |
||||
|
||||
if (api_is_anonymous()) { |
||||
api_not_allowed(true); |
||||
} |
||||
|
||||
//prepare variables used in userInfoLib.php functions |
||||
$TBL_USERINFO_DEF = Database:: get_course_table(TABLE_USER_INFO_DEF); |
||||
$TBL_USERINFO_CONTENT = Database:: get_course_table(TABLE_USER_INFO_CONTENT); |
||||
|
||||
if ($tool_info['visibility'] == 1) { |
||||
$interbreadcrumb[] = ['url' => 'user.php', 'name' => get_lang('Users')]; |
||||
} |
||||
|
||||
if ($origin != 'learnpath') { //so we are not in learnpath tool |
||||
Display :: display_header($nameTools, "User"); |
||||
$origin = Security::remove_XSS($_GET['origin']); |
||||
} else { |
||||
?> <link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CODE_PATH); ?>css/default.css" /> <?php |
||||
} |
||||
|
||||
$currentCourse = api_get_course_id(); |
||||
$current_session_id = api_get_session_id(); |
||||
/* |
||||
* data found in settings are : |
||||
* $uid |
||||
* $isAdmin |
||||
* $isAdminOfCourse |
||||
* $_configuration['main_database'] |
||||
* $currentCourseID |
||||
*/ |
||||
|
||||
$userIdViewed = Security::remove_XSS($_REQUEST['uInfo']); |
||||
|
||||
/** |
||||
* Connection layer between Chamilo and the current script. |
||||
*/ |
||||
$courseCode = api_get_course_id(); |
||||
$tbl_coursUser = Database :: get_main_table(TABLE_MAIN_COURSE_USER); |
||||
$userIdViewer = api_get_user_id(); // id fo the user currently online |
||||
$allowedToEditContent = ($userIdViewer == $userIdViewed) || $is_platformAdmin; |
||||
$allowedToEditDef = api_is_allowed_to_edit(null, true); |
||||
$is_allowedToTrack = api_is_allowed_to_edit(null, true); |
||||
$displayMode = "viewContentList"; |
||||
$removeDef = Security::remove_XSS($_GET['removeDef']); |
||||
$editDef = Security::remove_XSS($_GET['editDef']); |
||||
$moveUpDef = Security::remove_XSS($_GET['moveUpDef']); |
||||
$moveDownDef = Security::remove_XSS($_GET['moveDownDef']); |
||||
|
||||
if ($allowedToEditDef) { |
||||
if (!empty($_POST['submitDef'])) { |
||||
if (!empty($_POST['id'])) { |
||||
edit_cat_def($_POST['id'], $_POST['title'], $_POST['comment'], $_POST['nbline']); |
||||
} else { |
||||
create_cat_def($_POST['title'], $_POST['comment'], $_POST['nbline']); |
||||
} |
||||
$displayMode = "viewDefList"; |
||||
} elseif (!empty($_GET['removeDef'])) { |
||||
remove_cat_def($_GET['removeDef'], true); |
||||
$displayMode = "viewDefList"; |
||||
} elseif (!empty($_GET['editDef'])) { |
||||
$displayMode = "viewDefEdit"; |
||||
} elseif (!empty($_POST['addDef'])) { |
||||
$displayMode = "viewDefEdit"; |
||||
} elseif (!empty($_GET['moveUpDef'])) { |
||||
move_cat_rank($_GET['moveUpDef'], "up"); |
||||
$displayMode = "viewDefList"; |
||||
} elseif (!empty($_GET['moveDownDef'])) { |
||||
move_cat_rank($_GET['moveDownDef'], "down"); |
||||
$displayMode = "viewDefList"; |
||||
} elseif (!empty($_POST['viewDefList'])) { |
||||
$displayMode = "viewDefList"; |
||||
} elseif (!empty($_GET['editMainUserInfo'])) { |
||||
$userIdViewed = strval(intval($_GET['editMainUserInfo'])); |
||||
$displayMode = "viewMainInfoEdit"; |
||||
} elseif (!empty($_REQUEST['submitMainUserInfo'])) { |
||||
$userIdViewed = strval(intval($_REQUEST['submitMainUserInfo'])); |
||||
if ($current_session_id) { |
||||
} else { |
||||
if (!empty($_POST['promoteCourseAdmin']) && $_POST['promoteCourseAdmin']) { |
||||
$userProperties['status'] = 1; |
||||
} else { |
||||
$userProperties['status'] = 5; |
||||
} |
||||
if (!empty($_POST['promoteTutor']) && $_POST['promoteTutor']) { |
||||
$userProperties['tutor'] = 1; |
||||
} else { |
||||
$userProperties['tutor'] = 0; |
||||
} |
||||
$userhoraire_name = $_POST['hor_name']; |
||||
$course_id = $_course['real_id']; |
||||
update_user_course_properties($userIdViewed, $courseCode, $userProperties, $userhoraire_name, $course_id); |
||||
} |
||||
$displayMode = "viewContentList"; |
||||
} |
||||
} |
||||
|
||||
if ($allowedToEditContent) { |
||||
if (isset($_POST['submitContent'])) { |
||||
if ($_POST['cntId']) { |
||||
// submit a content change |
||||
edit_cat_content($_POST['catId'], $userIdViewed, $_POST['content'], $_SERVER['REMOTE_ADDR']); |
||||
} else { |
||||
// submit a totally new content |
||||
fill_new_cat_content($_POST['catId'], $userIdViewed, $_POST['content'], $_SERVER['REMOTE_ADDR']); |
||||
} |
||||
$displayMode = "viewContentList"; |
||||
} elseif (!empty($_GET['editContent'])) { |
||||
$displayMode = "viewContentEdit"; |
||||
$userIdViewed = $userIdViewed; |
||||
} |
||||
} |
||||
if (api_is_allowed_to_edit(null, true)) { |
||||
echo '<div class="actions">'; |
||||
if ($origin == 'users') { |
||||
echo '<a href="user.php?'.api_get_cidreq().'&origin='.$origin.'">'. |
||||
Display::return_icon('back.png', get_lang('BackUser'), '', ICON_SIZE_MEDIUM).'</a>'; |
||||
} else { |
||||
echo '<a href="javascript:history.back(1)">'. |
||||
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
||||
} |
||||
|
||||
if (!is_numeric($_GET['editMainUserInfo'])) { |
||||
if (api_get_setting('allow_user_course_subscription_by_course_admin') == 'true') { |
||||
echo '<a href="userInfo.php?'.api_get_cidreq( |
||||
).'&origin='.$origin.'&editMainUserInfo='.$userIdViewed.'">'. |
||||
Display::return_icon('edit.png', get_lang('EditUser'), '', ICON_SIZE_MEDIUM).get_lang( |
||||
'EditUser' |
||||
).'</a>'; |
||||
} |
||||
} else { |
||||
if (api_get_setting('allow_user_course_subscription_by_course_admin') == 'true') { |
||||
echo '<a href="userInfo.php?'.api_get_cidreq().'&origin='.$origin.'&uInfo='.$userIdViewed.'">'. |
||||
Display::return_icon( |
||||
'user.png', |
||||
get_lang('ViewUser'), |
||||
'', |
||||
ICON_SIZE_MEDIUM |
||||
).get_lang('ViewUser').'</a>'; |
||||
} |
||||
} |
||||
echo '<a href="../mySpace/myStudents.php?'.api_get_cidreq().'&origin=user_course&student='.$userIdViewed.'&details=true&course='.$_course['id'].'">'.Display::return_icon('stats.png', get_lang('UserStatistics'), '', ICON_SIZE_MEDIUM).get_lang('UserStatistics').'</a>'; |
||||
echo '</div>'; |
||||
} else { |
||||
if ($tool_info['visibility'] == 1) { |
||||
echo '<div class="actions">'; |
||||
if ($origin == 'users') { |
||||
echo '<a href="user.php?'.api_get_cidreq().'&origin='.$origin.'">'. |
||||
Display::return_icon( |
||||
'back.png', |
||||
get_lang('BackUser'), |
||||
'', |
||||
ICON_SIZE_MEDIUM |
||||
).'</a>'; |
||||
} else { |
||||
echo '<a href="javascript:history.back(1)">'.Display::return_icon( |
||||
'back.png', |
||||
get_lang('Back'), |
||||
'', |
||||
ICON_SIZE_MEDIUM |
||||
).'</a>'; |
||||
} |
||||
echo '</div>'; |
||||
} |
||||
} |
||||
|
||||
// get information about user id viewed |
||||
$user_info_viewed = api_get_user_info($userIdViewed); |
||||
$is_session_course_coach = UserManager::is_session_course_coach( |
||||
$userIdViewed, |
||||
$_course['sysCode'], |
||||
$current_session_id |
||||
); |
||||
|
||||
if ($displayMode == "viewDefEdit") { |
||||
/* CATEGORIES DEFINITIONS : EDIT */ |
||||
$catToEdit = get_cat_def($_GET['editDef']); |
||||
$edit_heading_form = new FormValidator('edit_heading_form'); |
||||
$edit_heading_form->addElement('hidden', 'id'); |
||||
$edit_heading_form->add_textfield('title', get_lang('Title')); |
||||
$edit_heading_form->addElement('textarea', 'comment', get_lang('Comment'), ['cols' => 60, 'rows' => 4]); |
||||
$possible_line_nrs[1] = '1 '.get_lang('Line'); |
||||
$possible_line_nrs[3] = '3 '.get_lang('Lines'); |
||||
$possible_line_nrs[5] = '5 '.get_lang('Lines'); |
||||
$possible_line_nrs[10] = '10 '.get_lang('Lines'); |
||||
$possible_line_nrs[15] = '15 '.get_lang('Lines'); |
||||
$edit_heading_form->addElement('select', 'nbline', get_lang('LineNumber'), $possible_line_nrs); |
||||
$edit_heading_form->addElement('submit', 'submitDef', get_lang('Ok')); |
||||
$edit_heading_form->setDefaults($catToEdit); |
||||
$edit_heading_form->display(); |
||||
} elseif ($displayMode == "viewDefList") { |
||||
$catList = get_cat_def_list(); |
||||
if ($catList) { |
||||
foreach ($catList as $thisCat) { |
||||
// displays Title and comments |
||||
echo "<p>", "<b>".htmlize($thisCat['title'])."</b><br>\n", "<i>".htmlize($thisCat['comment'])."</i>\n", "</p>"; |
||||
// displays lines |
||||
echo "<blockquote>\n", "<font color=\"gray\">\n"; |
||||
for ($i = 1; $i <= $thisCat['nbline']; $i++) { |
||||
echo "<br>__________________________________________\n"; |
||||
} |
||||
echo "</font>\n", "</blockquote>\n"; |
||||
// displays commands |
||||
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&removeDef=", $thisCat['catId'], "\">", "<img src=\"../img/delete.gif\" border=\"0\" alt=\"".get_lang('Remove')."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset))."')) return false;\">", "</a>", "<a href=\"".api_get_self()."?".api_get_cidreq()."&editDef=", $thisCat['catId'], "\">", "<img src=\"../img/edit.gif\" border=\"0\" alt=\"".get_lang('Edit')."\" />", "</a>", "<a href=\"".api_get_self()."?".api_get_cidreq()."&moveUpDef=", $thisCat['catId'], "\">", "<img src=\"../img/up.gif\" border=\"0\" alt=\"".get_lang('MoveUp')."\">", "</a>", "<a href=\"".api_get_self()."?".api_get_cidreq()."&moveDownDef=", $thisCat['catId'], "\">", "<img src=\"../img/down.gif\" border=\"0\" alt=\"".get_lang('MoveDown')."\">", "</a>\n"; |
||||
} // end for each |
||||
} // end if ($catList) |
||||
|
||||
echo "<center>\n", |
||||
"<form method=\"post\" action=\"".api_get_self()."\">", |
||||
"<input type=\"submit\" name=\"addDef\" class=\"plus\" value=\"".get_lang('AddNewHeading')."\" />", |
||||
"</form>\n", |
||||
"<center>\n"; |
||||
} elseif ($displayMode == 'viewContentEdit') { |
||||
/* CATEGORIES CONTENTS : EDIT */ |
||||
$catToEdit = get_cat_content($userIdViewed, $_GET['editContent']); |
||||
$content_heading_form = new FormValidator('content_heading_form'); |
||||
$content_heading_form->addElement('hidden', 'cntId'); |
||||
$content_heading_form->addElement('hidden', 'catId'); |
||||
$content_heading_form->addElement('hidden', 'uInfo'); |
||||
$content_heading_form->addElement('static', null, $catToEdit['title'], htmlize($catToEdit['comment'])); |
||||
if ($catToEdit['nbline'] == 1) { |
||||
$content_heading_form->addElement('text', 'content', null, ['size' => 80]); |
||||
} else { |
||||
$content_heading_form->addElement( |
||||
'textarea', |
||||
'content', |
||||
null, |
||||
['cols' => 60, 'rows' => $catToEdit['nbline']] |
||||
); |
||||
} |
||||
$content_heading_form->addElement('submit', 'submitContent', get_lang('Ok')); |
||||
$defaults = $catToEdit; |
||||
$defaults['cntId'] = $catToEdit['contentId']; |
||||
$defaults['uInfo'] = $userIdViewed; |
||||
$content_heading_form->setDefaults($defaults); |
||||
$content_heading_form->display(); |
||||
} elseif ($displayMode == "viewMainInfoEdit") { |
||||
$mainUserInfo = api_get_user_info($userIdViewed); |
||||
if ($mainUserInfo) { |
||||
($mainUserInfo['status'] == COURSEMANAGER) ? $courseAdminChecked = "checked" : $courseAdminChecked = ""; |
||||
$image_array = UserManager::get_user_picture_path_by_id($userIdViewed, 'web', false, true); |
||||
// get the path,width and height from original picture |
||||
$big_image = $image_array['dir'].'big_'.$image_array['file']; |
||||
$big_image_size = api_getimagesize($big_image); |
||||
$big_image_width = $big_image_size['width']; |
||||
$big_image_height = $big_image_size['height']; |
||||
$url_big_image = $big_image.'?rnd='.time(); |
||||
|
||||
if ($image_array['file'] == 'unknown.jpg') { |
||||
echo '<img src="'.$image_array['dir'].$image_array['file'].'" border="1">'; |
||||
} else { |
||||
echo '<input type="image" src="'.$image_array['dir'].$image_array['file'].'" onclick="return show_image(\''.$url_big_image.'\',\''.$big_image_width.'\',\''.$big_image_height.'\');"/>'; |
||||
} |
||||
|
||||
echo "<form action=\"".api_get_self()."\" method=\"post\">\n", |
||||
"<input type=\"hidden\" name=\"submitMainUserInfo\" value=\"$userIdViewed\" />\n", |
||||
"<table width=\"80%\" border=\"0\">", |
||||
"<tr align=\"center\" bgcolor=\"#E6E6E6\">\n", |
||||
"<td align=\"left\">", get_lang('Name'), "</td>\n", |
||||
"<td width=\"100px\" align=\"left\">", get_lang('Schedule'), "</td>\n"; |
||||
echo "</tr>\n", |
||||
"<tr align=\"center\">", |
||||
"<td align=\"left\"><b>", htmlize(api_get_person_name($mainUserInfo['firstName'], $mainUserInfo['lastName'])), "</b></td>\n", |
||||
"<td align=\"left\"><b>", $mainUserInfo['official_code'], "</td>"; |
||||
//récupérer horaire de l'élève |
||||
$course_id = $_course['real_id']; ?> |
||||
<SELECT NAME='hor_name'> |
||||
<OPTION VALUE='<?php echo $mainUserInfo['official_code']; ?>'><?php echo get_lang('select_calendar_student'); ?></OPTION>
|
||||
<?php |
||||
$sql = "SELECT distinct name FROM $TABLECALHORAIRE |
||||
where c_id = $course_id "; |
||||
$result2 = Database::query($sql); |
||||
while ($row = Database::fetch_array($result2)) { |
||||
$horaire_name = $row["name"]; ?> |
||||
<OPTION VALUE='<?php echo $horaire_name; ?>'><?php echo "$horaire_name "; ?></OPTION>
|
||||
<?php |
||||
} ?> |
||||
</SELECT> |
||||
<?php |
||||
echo'<p></p> '; |
||||
if (!($is_courseAdmin && $_user['user_id'] == $userIdViewed)) { |
||||
} else { |
||||
echo "<td>", get_lang('CourseManager'), "</td>\n"; |
||||
} |
||||
echo "<td><button class=\"save\" type=\"submit\" name=\"submit\">".get_lang('SaveChanges')."</button></td>\n", "</tr>", "</table>", "</form>\n"; |
||||
if (api_get_setting('show_email_addresses') == 'true') { |
||||
echo "<p>".Display:: encrypted_mailto_link($mainUserInfo['email'], $mainUserInfo['email'])."</p>"; |
||||
} |
||||
|
||||
if (api_get_setting('extended_profile') == 'true') { |
||||
if (!empty($mainUserInfo['competences'])) { |
||||
echo '<div style="margin-top:10px;" class="actions-message"><strong>'.get_lang('MyCompetences').'</strong></div><div>'.$mainUserInfo['competences'].'</div>'; |
||||
} |
||||
if (!empty($mainUserInfo['diplomas'])) { |
||||
echo '<div style="margin-top:10px;" class="actions-message"><strong>'.get_lang('MyDiplomas').'</strong></div><div>'.$mainUserInfo['diplomas'].'</div>'; |
||||
} |
||||
if (!empty($mainUserInfo['teach'])) { |
||||
echo '<div style="margin-top:10px;" class="actions-message"><strong>'.get_lang('MyTeach').'</strong></div><div>'.$mainUserInfo['teach'].'</div>'; |
||||
} |
||||
if (!empty($mainUserInfo['openarea'])) { |
||||
echo '<div style="margin-top:10px;" class="actions-message"><strong>'.get_lang('MyPersonalOpenArea').'</strong></div><div>'.$mainUserInfo['openarea'].'</div>'; |
||||
} |
||||
if (!empty($mainUserInfo['competences'])) { |
||||
echo '<div style="margin-top:10px;" class="actions-message"><strong>'.get_lang('MyProductions').'</strong></div><div>'.UserManager::build_production_list($mainUserInfo['user_id']).'</div>'; |
||||
} |
||||
} |
||||
} else { |
||||
Display :: display_normal_message(get_lang('ThisStudentIsSubscribeThroughASession')); |
||||
} |
||||
} elseif ($displayMode == "viewContentList") { |
||||
// default display |
||||
$virtual_course_code = $_GET["virtual_course"]; |
||||
if (isset($virtual_course_code)) { |
||||
$courseCode = $virtual_course_code; |
||||
$allowedToEditDef = false; |
||||
} |
||||
$mainUserInfo = api_get_user_info($userIdViewed); |
||||
if ($mainUserInfo) { |
||||
$image_array = UserManager::get_user_picture_path_by_id($userIdViewed, 'web', false, true); |
||||
// get the path,width and height from original picture |
||||
$big_image = $image_array['dir'].'big_'.$image_array['file']; |
||||
$big_image_size = api_getimagesize($big_image); |
||||
$big_image_width = $big_image_size['width']; |
||||
$big_image_height = $big_image_size['height']; |
||||
$url_big_image = $big_image.'?rnd='.time(); |
||||
|
||||
if ($image_array['file'] == 'unknown.jpg') { |
||||
echo '<img src="'.$image_array['dir'].$image_array['file'].'" border="1">'; |
||||
} else { |
||||
echo '<input type="image" src="'.$image_array['dir'].$image_array['file'].'" onclick="return show_image(\''.$url_big_image.'\',\''.$big_image_width.'\',\''.$big_image_height.'\');"/>'; |
||||
} |
||||
|
||||
// is the user online? |
||||
$online = ''; |
||||
if (user_is_online($userIdViewed)) { |
||||
$online = Display::return_icon('online.gif', get_lang('OnLine'), ['style' => 'with="8"; height="8"']); |
||||
} |
||||
|
||||
// DISPLAY TABLE HEADING |
||||
if ($origin == 'learnpath') { |
||||
$allowedToEditDef = false; |
||||
$is_allowedToTrack = false; |
||||
} |
||||
|
||||
echo "<table width=\"80%\" border=\"0\">", |
||||
"<tr align=\"center\" bgcolor=\"#E6E6E6\">\n", |
||||
"<td align=\"left\">".get_lang('Name')."</td>\n", |
||||
"<td width=\"20%\" align=\"left\">".get_lang('Description')."</td>\n", |
||||
"<td width=\"100px\" align=\"left\">", get_lang('OfficialCode'), "</td>\n"; |
||||
|
||||
echo "</tr>\n", |
||||
"<tr align=\"center\">\n", |
||||
"<td align=\"left\"><b>".$online.' '.htmlize(api_get_person_name($mainUserInfo['firstName'], $mainUserInfo['lastName']))."</b></td>\n", |
||||
"<td align=\"left\"><b>", $mainUserInfo['official_code'], "</td>"; |
||||
// DISPLAY TABLE CONTENT |
||||
if ($current_session_id) { |
||||
if ($user_info_viewed['status'] == COURSEMANAGER) { |
||||
echo "<td> - </td>\n"; |
||||
} |
||||
} else { |
||||
if ($user_info_viewed['status'] == STUDENT) { |
||||
echo "<td> - </td>\n"; |
||||
} else { |
||||
echo "<td> - </td>\n"; |
||||
} |
||||
} |
||||
|
||||
echo "</tr></table>"; |
||||
if (api_get_setting("show_email_addresses") == "true") { |
||||
echo "<p>".Display::encrypted_mailto_link($mainUserInfo['email'], $mainUserInfo['email'])."</p>"; |
||||
} |
||||
|
||||
if (api_get_setting('extended_profile') == 'true') { |
||||
if (!empty($mainUserInfo['competences'])) { |
||||
echo '<div style="margin-top:10px;" class="actions-message"><strong>'.get_lang('MyCompetences').'</strong></div><div>'.$mainUserInfo['competences'].'</div>'; |
||||
} |
||||
if (!empty($mainUserInfo['diplomas'])) { |
||||
echo '<div style="margin-top:10px;" class="actions-message"><strong>'.get_lang('MyDiplomas').'</strong></div><div>'.$mainUserInfo['diplomas'].'</div>'; |
||||
} |
||||
if (!empty($mainUserInfo['teach'])) { |
||||
echo '<div style="margin-top:10px;" class="actions-message"><strong>'.get_lang('MyTeach').'</strong></div><div>'.$mainUserInfo['teach'].'</div>'; |
||||
} |
||||
if (!empty($mainUserInfo['openarea'])) { |
||||
echo '<div style="margin-top:10px;" class="actions-message"><strong>'.get_lang('MyPersonalOpenArea').'</strong></div><div>'.$mainUserInfo['openarea'].'</div>'; |
||||
} |
||||
if (!empty($mainUserInfo['competences'])) { |
||||
echo '<div style="margin-top:10px;" class="actions-message"><strong>'.get_lang('MyProductions').'</strong></div><div>'.UserManager::build_production_list($mainUserInfo['user_id']).'</div>'; |
||||
} |
||||
} |
||||
} else { |
||||
Display::return_message(get_lang('ThisStudentIsSubscribeThroughASession'), 'normal'); |
||||
} |
||||
|
||||
if (api_get_setting('allow_user_headings') == 'true' && $allowedToEditDef) { |
||||
// only course administrators see this line |
||||
echo "<div align=right>", |
||||
"<form method=\"post\" action=\"".api_get_self()."\">", |
||||
get_lang('CourseAdministratorOnly')," : ", |
||||
"<input type=\"submit\" class=\"save\" name=\"viewDefList\" value=\"".get_lang('DefineHeadings')."\" />", |
||||
"</form>", |
||||
"<hr noshade size=\"1\" style=\"color:#99CCFF\">", |
||||
"</div>\n"; |
||||
} |
||||
|
||||
$catList = get_course_user_info($userIdViewed); |
||||
if ($catList) { |
||||
foreach ($catList as $thisCat) { |
||||
// Category title |
||||
echo "<p><b>", $thisCat['title'], "</b></p>\n"; |
||||
// Category content |
||||
echo "<blockquote>\n"; |
||||
if ($thisCat['content']) { |
||||
echo htmlize($thisCat['content'])."\n"; |
||||
} else { |
||||
echo "...."; |
||||
} |
||||
// Edit command |
||||
if ($allowedToEditContent) { |
||||
echo "<br /><br />\n", |
||||
"<a href=\"".api_get_self()."?".api_get_cidreq( |
||||
)."&editContent=", $thisCat['catId'], "&uInfo=", $userIdViewed, "\">", |
||||
"<img src=\"../img/edit.gif\" border=\"0\" alt=\"edit\">", |
||||
"</a>\n"; |
||||
} |
||||
echo "</blockquote>\n"; |
||||
} |
||||
} |
||||
} |
||||
|
||||
Display::display_footer(); |
@ -0,0 +1,24 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once __DIR__.'/../inc/global.inc.php'; |
||||
|
||||
api_block_anonymous_users(); |
||||
|
||||
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'rtc/RecordRTC.js"></script>'; |
||||
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'wami-recorder/recorder.js"></script>'; |
||||
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'wami-recorder/gui.js"></script>'; |
||||
$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'swfobject/swfobject.js"></script>'; |
||||
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'swfobject/swfobject.js"></script>'; |
||||
$htmlHeadXtra[] = api_get_js('record_audio/record_audio.js'); |
||||
|
||||
$tpl = new Template(get_lang('ComposeMessage'), false, false, false, true); |
||||
$record = $tpl->get_template('message/record_audio.tpl'); |
||||
|
||||
$tpl->assign('user_id', api_get_user_id()); |
||||
$tpl->assign('audio_title', api_get_unique_id()); |
||||
$tpl->assign('reload_page', 0); |
||||
$tpl->assign('content', $tpl->fetch($record)); |
||||
$tpl->display_no_layout_template(); |
||||
|
||||
exit; |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue