commit
4a3aa7bf7a
@ -1,82 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
// TODO: Is this file needed anymore? |
||||
|
||||
/** |
||||
* MODIFY COURSE INFO |
||||
* Modify course settings like: |
||||
* 1. Course title |
||||
* 2. Department |
||||
* 3. Course description URL in the university web |
||||
* Course code cannot be modified, because it gives the name for the |
||||
* course database and course web directory. Professor cannot be |
||||
* changed either as it determines who is allowed to modify the course. |
||||
* |
||||
* @author Thomas Depraetere |
||||
* @author Hugues Peeters |
||||
* @author Christophe Gesche |
||||
* |
||||
* @package chamilo.course_info |
||||
*/ |
||||
/** |
||||
* Code |
||||
*/ |
||||
|
||||
/* INIT SECTION */ |
||||
|
||||
// Language file that needs to be included |
||||
$language_file = 'postpone'; |
||||
|
||||
//$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Admin')); |
||||
$htmlHeadXtra[] = " |
||||
<style type=\"text/css\"> |
||||
<!-- |
||||
.month {font-weight : bold;color : #FFFFFF;background-color : #4171B5;padding-left : 15px;padding-right : 15px;} |
||||
.content {position: relative; left: 25px;} |
||||
--> |
||||
</style> |
||||
<STYLE media=\"print\" type=\"text/css\"> |
||||
TD {border-bottom: thin dashed Gray;} |
||||
</STYLE>"; |
||||
|
||||
require '../inc/global.inc.php'; |
||||
$this_section = SECTION_COURSES; |
||||
|
||||
Display::display_header($nameTools, 'Settings'); |
||||
|
||||
//include api_get_path(CONFIGURATION_PATH).'postpone.conf.php'; |
||||
|
||||
$nameTools = get_lang('Postpone'); |
||||
$TABLECOURSE = Database::get_main_table(TABLE_MAIN_COURSE); |
||||
$is_allowedToEdit = $is_courseAdmin; |
||||
$currentCourseID = $_course['sysCode']; |
||||
$currentCourseRepository = $_course['path']; |
||||
|
||||
|
||||
$sqlCourseExtention = "SELECT last_visit, last_edit, creation_date, expiration_date FROM ".$TABLECOURSE." WHERE code = '".$_cid."'"; |
||||
$resultCourseExtention = Database::query($sqlCourseExtention); |
||||
$currentCourseExtentionData = Database::fetch_array($resultCourseExtention); |
||||
$currentCourseLastVisit = $currentCourseExtentionData['last_visit']; |
||||
$currentCourseLastEdit = $currentCourseExtentionData['last_edit']; |
||||
$currentCourseCreationDate = $currentCourseExtentionData['creation_date']; |
||||
$currentCourseExpirationDate = $currentCourseExtentionData['expiration_date']; |
||||
// HERE YOU CAN EDIT YOUR RULES TO EXTEND THE LIFE OF COURSE |
||||
|
||||
// $newCourseExpirationDate = now() + $extendDelay |
||||
|
||||
|
||||
|
||||
?> |
||||
<h3> |
||||
<?php echo $nameTools ?> |
||||
</h3> |
||||
|
||||
This script would be called by |
||||
professor, |
||||
or administrator, |
||||
or other script |
||||
to give more time to a course before expiration. |
||||
|
||||
<?php |
||||
Display::display_footer(); |
@ -1,52 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
/** |
||||
* Create a backup. |
||||
* |
||||
* @author Bart Mollet <bart.mollet@hogent.be> |
||||
* @package chamilo.backup |
||||
*/ |
||||
/** |
||||
* Code |
||||
*/ |
||||
|
||||
// Including the global initialization file |
||||
require_once '../inc/global.inc.php'; |
||||
$current_course_tool = TOOL_COURSE_MAINTENANCE; |
||||
|
||||
api_protect_course_script(true); |
||||
api_block_anonymous_users(); |
||||
|
||||
// Check access rights (only teachers allowed) |
||||
if (!api_is_allowed_to_edit()) { |
||||
api_not_allowed(true); |
||||
} |
||||
|
||||
// Section for the tabs |
||||
$this_section = SECTION_COURSES; |
||||
|
||||
// Breadcrumbs |
||||
$interbreadcrumb[] = array('url' => '../course_info/maintenance.php', 'name' => get_lang('Maintenance')); |
||||
|
||||
// Displaying the header |
||||
$nameTools = get_lang('Backup'); |
||||
Display::display_header($nameTools); |
||||
|
||||
// Display the tool title |
||||
echo Display::page_header($nameTools); |
||||
|
||||
/* MAIN CODE */ |
||||
|
||||
?> |
||||
<ul> |
||||
<li><a href="create_backup.php"><?php echo get_lang('CreateBackup') ?></a><br/>
|
||||
<?php echo get_lang('CreateBackupInfo'); ?> |
||||
</li> |
||||
<li><a href="import_backup.php"><?php echo get_lang('ImportBackup') ?></a><br/>
|
||||
<?php echo get_lang('ImportBackupInfo'); ?> |
||||
</li> |
||||
</ul> |
||||
<?php |
||||
|
||||
// Display the footer |
||||
Display::display_footer(); |
@ -1,117 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
/** |
||||
* Old reporting file - probably not used anymore |
||||
* @package chamilo.reporting |
||||
*/ |
||||
/** |
||||
* Code |
||||
*/ |
||||
// TODO: Is this file used? |
||||
|
||||
$nameTools = 'Reussite'; |
||||
$cidReset = true; |
||||
|
||||
require '../inc/global.inc.php'; |
||||
|
||||
$this_section = "session_my_space"; |
||||
|
||||
api_block_anonymous_users(); |
||||
$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); |
||||
Display :: display_header($nameTools); |
||||
|
||||
// Database Table Definitions |
||||
$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); |
||||
$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); |
||||
$tbl_session_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); |
||||
$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
||||
$tbl_track_exercice = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||
|
||||
/* |
||||
=============================================================================== |
||||
MAIN CODE |
||||
=============================================================================== |
||||
*/ |
||||
if (!empty($_GET['session'])) { |
||||
$sql_session = "SELECT name,id |
||||
FROM $tbl_session |
||||
ORDER BY name ASC"; |
||||
$result_session = Database::query($sql_session); |
||||
|
||||
echo "<a href='".api_get_self()."'>".get_lang('MoyCourse')."</a>"; |
||||
echo "<br /><br />"; |
||||
|
||||
if (Database::num_rows($result_session) > 0) { |
||||
echo '<table class="data_table"><tr><th>'.get_lang('Session').'</th><th>'.get_lang('MoyenneTest').'</th><th>'.get_lang('MoyenneExamen').'</th></tr>'; |
||||
while ($session = Database::fetch_array($result_session)) { |
||||
$sql_course = "SELECT title, code, course.id |
||||
FROM $tbl_course as course |
||||
INNER JOIN $tbl_session_course AS rel_course |
||||
ON course.id = rel_course.c_id |
||||
AND rel_course.session_id = ".$session['id']." |
||||
ORDER BY title ASC"; |
||||
|
||||
$result_course = Database::query($sql_course); |
||||
$total_result = 0; |
||||
$total_weighting = 0; |
||||
while ($course = Database::fetch_array($result_course)) { |
||||
$sql_moy_test = "SELECT exe_result,exe_weighting |
||||
FROM $tbl_track_exercice |
||||
WHERE c_id = ".$course['id']; |
||||
$result_moy_test = Database::query($sql_moy_test); |
||||
$result = 0; |
||||
$weighting = 0; |
||||
while ($moy_test = Database::fetch_array($result_moy_test)) { |
||||
$result = $result + $moy_test['exe_result']; |
||||
$weighting = $weighting + $moy_test['exe_weighting']; |
||||
} |
||||
$total_result = $total_result + $result; |
||||
$total_weighting = $total_weighting + $weighting; |
||||
} |
||||
if ($total_weighting != 0) { |
||||
$moyenne_test = round(($total_result * 100) / $total_weighting); |
||||
} else { |
||||
$moyenne_test = null; |
||||
} |
||||
|
||||
echo '<tr><td>'.$session['name'].'</td><td>'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td><td> </td></tr>'; |
||||
} |
||||
echo '</table>'; |
||||
} else { |
||||
echo get_lang('NoSession'); |
||||
} |
||||
} else { |
||||
$sql_course = "SELECT title, code, id |
||||
FROM $tbl_course as course |
||||
ORDER BY title ASC"; |
||||
|
||||
$result_course = Database::query($sql_course); |
||||
|
||||
echo "<a href='".api_get_self()."?session=true'>".get_lang('MoySession')."</a>"; |
||||
echo "<br /><br />"; |
||||
if (Database::num_rows($result_course) > 0) { |
||||
echo '<table class="data_table"><tr><th>'.get_lang('Course').'</th><th>'.get_lang('MoyenneTest').'</th><th>'.get_lang('MoyenneExamen').'</th></tr>'; |
||||
while ($course= Database::fetch_array($result_course)) { |
||||
$sql_moy_test = "SELECT exe_result,exe_weighting |
||||
FROM $tbl_track_exercice |
||||
WHERE c_id = ".$course['id']; |
||||
$result_moy_test = Database::query($sql_moy_test); |
||||
$result = 0; |
||||
$weighting = 0; |
||||
while ($moy_test = Database::fetch_array($result_moy_test)) { |
||||
$result = $result + $moy_test['exe_result']; |
||||
$weighting = $weighting + $moy_test['exe_weighting']; |
||||
} |
||||
if ($weighting != 0) { |
||||
$moyenne_test = round(($result * 100) / $weighting); |
||||
} else { |
||||
$moyenne_test = null; |
||||
} |
||||
echo '<tr><td>'.$course['title'].'</td><td>'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td><td> </td></tr>'; |
||||
} |
||||
echo '</table>'; |
||||
} else { |
||||
echo get_lang('NoCourse'); |
||||
} |
||||
} |
||||
Display :: display_footer(); |
@ -1,245 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
/** |
||||
* @author Thomas Depraetere |
||||
* @author Hugues Peeters |
||||
* @author Christophe Gesche |
||||
* @author Sebastien Piraux |
||||
* |
||||
* @package chamilo.tracking |
||||
*/ |
||||
|
||||
/** |
||||
* Code |
||||
*/ |
||||
// TODO: Is this file deprecated? |
||||
|
||||
/* |
||||
* INIT SECTION |
||||
*/ |
||||
include '../inc/global.inc.php'; |
||||
|
||||
$interbreadcrumb[]= array ("url"=>"../auth/profile.php", "name"=> get_lang('ModifyProfile')); |
||||
$nameTools = get_lang('ToolName'); |
||||
|
||||
$htmlHeadXtra[] = "<style type=\"text/css\"> |
||||
/*<![CDATA[*/ |
||||
.secLine {background-color : #E6E6E6;} |
||||
.content {padding-left : 15px; padding-right : 15px;} |
||||
.specialLink{color : #0000FF;} |
||||
/*]]>*/ |
||||
</style> |
||||
<style media='print' type='text/css'> |
||||
/*<![CDATA[*/ |
||||
td {border-bottom: thin dashed gray;} |
||||
/*]]>*/ |
||||
</style>"; |
||||
|
||||
//Remove all characters different than 0 and 1 from $view parameter |
||||
$view = preg_replace('/[^01]/','',$_REQUEST['view']); |
||||
|
||||
$TABLECOURSUSER = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
||||
$TABLETRACK_ACCESS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS); |
||||
$TABLETRACK_LINKS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LINKS); |
||||
$TABLETRACK_DOWNLOADS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_DOWNLOADS); |
||||
$TABLETRACK_LOGIN = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN); |
||||
$TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||
|
||||
|
||||
$limitOfDisplayedLogins = 25; // number of logins to display |
||||
|
||||
Display::display_header($nameTools,"Tracking"); |
||||
api_display_tool_title($nameTools); |
||||
|
||||
// MAIN SECTION |
||||
|
||||
// show all : view must be equal to the sum of all view values (1024+512+...+64) |
||||
// show none : 0 |
||||
|
||||
echo " |
||||
<table width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\"> |
||||
<tr> |
||||
<td class='minilink'> |
||||
[<a href='".api_get_self()."?view=1111111'>".get_lang('ShowAll')."</a>] |
||||
[<a href='".api_get_self()."?view=0000000'>".get_lang('ShowNone')."</a>] |
||||
</td> |
||||
</tr> |
||||
"; |
||||
if (empty($view)) { |
||||
$view ="0000000"; |
||||
} |
||||
|
||||
/*************************************************************************** |
||||
* |
||||
* Logins |
||||
* |
||||
***************************************************************************/ |
||||
$tempView = $view; |
||||
if ($tempView[0] == '1') { |
||||
$tempView[0] = '0'; |
||||
echo " |
||||
<tr> |
||||
<td valign='top'> |
||||
<font color='#0000FF'>- </font> |
||||
<b>".get_lang('Logins')."</b> |
||||
|
||||
[<a href='".api_get_self()."?view=".$tempView."'>".get_lang('Close')."</a>] |
||||
</td> |
||||
</tr>"; |
||||
$sql = "SELECT login_date |
||||
FROM ".$TABLETRACK_LOGIN." |
||||
WHERE login_user_id = '".$_user['user_id']."' |
||||
ORDER BY login_date DESC |
||||
LIMIT ".$limitOfDisplayedLogins.""; |
||||
echo "<tr><td style='padding-left : 40px;' valign='top'>".get_lang('LoginsExplaination')."<br/>"; |
||||
$results = StatsUtils::getManyResults1Col($sql); |
||||
echo " |
||||
<table width='100%' cellpadding='2' cellspacing='1' border='0' align='center'>"; |
||||
if (is_array($results)) { |
||||
while (list($key, $value) = each($results)) { |
||||
$beautifulDate = api_convert_and_format_date($value, null, date_default_timezone_get()); |
||||
echo " |
||||
<tr> |
||||
<td class='secLine'> |
||||
".$beautifulDate." |
||||
</td> |
||||
</tr>"; |
||||
|
||||
if (!isset($previousDate)) { |
||||
$previousDate = api_get_utc_datetime(); |
||||
} |
||||
|
||||
$sql = "SELECT access_tool, count(access_tool), c_id |
||||
FROM $TABLETRACK_ACCESS |
||||
WHERE |
||||
access_user_id = " . $_user['user_id'] . " AND |
||||
access_date > '".$value."' AND |
||||
access_date < '".$previousDate."' |
||||
GROUP BY access_tool, c_id |
||||
ORDER BY c_id ASC"; |
||||
|
||||
$results2 = StatsUtils::getManyResults3Col($sql); |
||||
|
||||
if (is_array($results2)) { |
||||
echo " |
||||
<tr> |
||||
<td colspan='2'> |
||||
<table width='50%' cellpadding='0' cellspacing='0' border='0' >"; |
||||
|
||||
$previousCourse = "???"; |
||||
for ($j = 0; $j < count($results2); $j++) { |
||||
// if course is different, write the name of the course |
||||
if ($results2[$j][2] != $previousCourse) { |
||||
echo "<tr> |
||||
<td colspan='2' width='100%' style='padding-left : 40px;'> |
||||
".$results2[$j][2]." |
||||
</td> |
||||
</tr>"; |
||||
} |
||||
// if count != de 0 then display toolname et number of visits, else its a course visit |
||||
if ($results2[$j][1] != 0) { |
||||
echo "<tr>"; |
||||
echo "<td width='70%' style='padding-left : 60px;'>".get_lang(ucfirst($results2[$j][0]))."</td>"; |
||||
echo "<td width='30%' align='right'>".$results2[$j][1]." ".get_lang('Visits')."</td>"; |
||||
echo "</tr>"; |
||||
} |
||||
$previousCourse = $results2[$j][2]; |
||||
} |
||||
echo "</table>"; |
||||
echo "</td></tr>"; |
||||
} |
||||
$previousDate = $value; |
||||
} |
||||
|
||||
} else { |
||||
echo "<tr>"; |
||||
echo "<td colspan='2' bgcolor='#eeeeee' align='center' >".get_lang('NoResult')."</td>"; |
||||
echo"</tr>"; |
||||
} |
||||
echo "</table>"; |
||||
echo "</td></tr>"; |
||||
} else { |
||||
$tempView[0] = '1'; |
||||
echo " |
||||
<tr> |
||||
<td valign='top'> |
||||
+<font color='#0000FF'> </font><a href='".api_get_self()."?view=".$tempView."' class='specialLink'>".get_lang('Logins')."</a> |
||||
</td> |
||||
</tr> |
||||
"; |
||||
} |
||||
|
||||
|
||||
/*************************************************************************** |
||||
* |
||||
* Exercices |
||||
* |
||||
***************************************************************************/ |
||||
/* |
||||
$tempView = $view; |
||||
if($view[1] == '1') |
||||
{ |
||||
$tempView[1] = '0'; |
||||
echo " |
||||
<tr> |
||||
<td valign='top'> |
||||
<font color='#0000FF'>- </font><b>".get_lang('ExercicesResults')."</b> [<a href='".api_get_self()."?view=".$tempView."'>".get_lang('Close')."</a>] |
||||
</td> |
||||
</tr> |
||||
"; |
||||
echo " Ceci est amen etre dplac vers la page de garde des exercices "; |
||||
$sql = "SELECT ce.title, te.exe_result , te.exe_weighting, te.exe_date |
||||
FROM $TABLECOURSE_EXERCICES AS ce , $TABLETRACK_EXERCICES AS te |
||||
WHERE te.exe_user_id = '".$_user['user_id']."' |
||||
AND te.exe_exo_id = ce.id |
||||
ORDER BY te.c_id ASC, ce.title ASC, te.exe_date ASC"; |
||||
|
||||
echo "<tr><td style='padding-left : 40px;padding-right : 40px;'>"; |
||||
$results = getManyResultsXCol($sql,4); |
||||
echo "<table cellpadding='2' cellspacing='1' border='0' align='center'>"; |
||||
echo "<tr> |
||||
<td class='secLine' width='60%'> |
||||
".get_lang('ExercicesTitleExerciceColumn')." |
||||
</td> |
||||
<td class='secLine' width='20%'> |
||||
".get_lang('Date')." |
||||
</td> |
||||
<td class='secLine' width='20%'> |
||||
".get_lang('ExercicesTitleScoreColumn')." |
||||
</td> |
||||
</tr>"; |
||||
if (is_array($results)) { |
||||
for ($i = 0; $i < sizeof($results); $i++) { |
||||
if ( $results[$i][1] < ($results[$i][2]/2) ) |
||||
$scoreColor = "red"; |
||||
elseif( $results[$i][1] > ($results[$i][2]/100*60) ) |
||||
$scoreColor = "green"; |
||||
else |
||||
$scoreColor = "#FF8C00"; |
||||
echo "<tr>"; |
||||
echo "<td class='content'>".$results[$i][0]."</td>"; |
||||
echo "<td class='content'>".$results[$i][3]."</td>"; |
||||
echo "<td valign='top' align='right' class='content'><font color=$scoreColor>".$results[$i][1]." / ".$results[$i][2]."</font></td>"; |
||||
echo"</tr>"; |
||||
} |
||||
} else { |
||||
echo "<tr>"; |
||||
echo "<td colspan='2' align='center'>".get_lang('NoResult')."</td>"; |
||||
echo"</tr>"; |
||||
} |
||||
echo "</table>"; |
||||
echo "</td></tr>"; |
||||
|
||||
} else { |
||||
$tempView[1] = '1'; |
||||
echo " |
||||
<tr> |
||||
<td valign='top'> |
||||
<font color='#0000FF'>+ </font><a href='".api_get_self()."?view=".$tempView."' class='specialLink'>".get_lang('ExercicesResults')."</a> |
||||
</td> |
||||
</tr> |
||||
"; |
||||
} |
||||
*/ |
||||
echo "</table>"; |
||||
Display::display_footer(); |
Loading…
Reference in new issue