Feature #2785 admin sessions (lack classes)

skala
Juan Carlos Raña 14 years ago
parent 055d99851d
commit b880c341d4
  1. 2
      main/admin/add_sessions_to_promotion.php
  2. 5
      main/admin/career_dashboard.php
  3. 4
      main/admin/careers.php
  4. 14
      main/admin/course_category.php
  5. 4
      main/admin/course_list.php
  6. 2
      main/admin/index.php
  7. 6
      main/admin/promotions.php
  8. 929
      main/admin/session_add.php
  9. 6
      main/admin/session_category_list.php
  10. 9
      main/admin/session_export.php
  11. 9
      main/admin/session_import.php
  12. 12
      main/admin/session_list.php
  13. 6
      main/admin/user_move_stats.php
  14. 12
      main/admin/usergroups.php
  15. 6
      main/coursecopy/copy_course_session.php
  16. BIN
      main/img/icons/22/career.png
  17. BIN
      main/img/icons/22/courses_to_session.png
  18. BIN
      main/img/icons/22/promotion.png
  19. BIN
      main/img/icons/22/session.png
  20. BIN
      main/img/icons/22/session_to_category.png
  21. BIN
      main/img/icons/22/session_to_promotion.png
  22. BIN
      main/img/icons/22/user_subscribe_session.png
  23. BIN
      main/img/icons/32/career.png
  24. BIN
      main/img/icons/32/course_request_pending.png
  25. BIN
      main/img/icons/32/courses_to_session.png
  26. BIN
      main/img/icons/32/new_career.png
  27. BIN
      main/img/icons/32/new_course.png
  28. BIN
      main/img/icons/32/new_promotion.png
  29. BIN
      main/img/icons/32/new_session.png
  30. BIN
      main/img/icons/32/promotion.png
  31. BIN
      main/img/icons/32/session_to_category.png
  32. BIN
      main/img/icons/32/session_to_promotion.png
  33. 12
      main/img/icons/48/_sum.txt
  34. BIN
      main/img/icons/48/career.png
  35. BIN
      main/img/icons/48/course_request_pending.png
  36. BIN
      main/img/icons/48/courses_to_session.png
  37. BIN
      main/img/icons/48/new_career.png
  38. BIN
      main/img/icons/48/new_course.png
  39. BIN
      main/img/icons/48/new_promotion.png
  40. BIN
      main/img/icons/48/new_session.png
  41. BIN
      main/img/icons/48/promotion.png
  42. BIN
      main/img/icons/48/session_to_category.png
  43. BIN
      main/img/icons/48/session_to_promotion.png
  44. 4
      main/inc/lib/career.lib.php
  45. 6
      main/inc/lib/promotion.lib.php
  46. 5
      main/inc/lib/usergroup.lib.php

@ -183,7 +183,7 @@ if ($add_type == 'multiple') {
}
echo '<div class="actions">';
echo '<a href="promotions.php">'.Display::return_icon('back.png',get_lang('Back')).get_lang('Back').'</a>';
echo '<a href="promotions.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
echo '</div>';
echo '<div class="row"><div class="form_header">'.$tool_name.' '.$promotion_data['name'].'</div></div><br/>'; ?>

@ -32,8 +32,9 @@ Display :: display_header($nameTools);
// action links
echo '<div class="actions" style="margin-bottom:20px">';
echo '<a href="careers.php">'.Display::return_icon('filenew.gif',get_lang('Add')).get_lang('Careers').'</a>';
echo '<a href="promotions.php">'.Display::return_icon('filenew.gif',get_lang('Add')).get_lang('Promotions').'</a>';
echo '<a href="../admin/index.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'','32').'</a>';
echo '<a href="careers.php">'.Display::return_icon('career.png',get_lang('Careers'),'','32').'</a>';
echo '<a href="promotions.php">'.Display::return_icon('promotion.png',get_lang('Promotions'),'','32').'</a>';
echo '</div>';

@ -104,7 +104,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'add') {
$career->display();
} else {
echo '<div class="actions">';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png').' '.get_lang('Back').'</a>';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
echo '</div>';
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');
@ -133,7 +133,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'add') {
$career->display();
} else {
echo '<div class="actions">';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png').' '.get_lang('Back').'</a>';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
echo '</div>';
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');

@ -139,7 +139,7 @@ if($action == 'add' || $action == 'edit')
{
?>
<div class="actions">
<a href="<?php echo api_get_self(); ?>?category=<?php echo Security::remove_XSS($category); ?>"><?php echo Display::return_icon('folder_up.gif').get_lang("Back"); if(!empty($category)) echo ' ('.Security::remove_XSS($category).')'; ?></a>
<a href="<?php echo api_get_self(); ?>?category=<?php echo Security::remove_XSS($category); ?>"><?php echo Display::return_icon('folder_up.png',get_lang("Back"),'','32'); if(!empty($category)) echo ' ('.Security::remove_XSS($category).')'; ?></a>
</div>
@ -230,12 +230,20 @@ if(!empty($category) && empty($action))
$parent_id['parent_id']?$link=' ('.$parent_id['parent_id'].')':$link='';
?>
<a href="<?php echo api_get_self(); ?>?category=<?php echo $parent_id['parent_id']; ?>"><?php echo Display::return_icon('folder_up.gif').get_lang("Back"); if(!empty($parent_id)) echo $link ?></a>
<a href="<?php echo api_get_self(); ?>?category=<?php echo $parent_id['parent_id']; ?>"><?php echo Display::return_icon('folder_up.png',get_lang("Back"),'','32'); if(!empty($parent_id)) echo $link ?></a>
<?php
}
?>
<a href="<?php echo api_get_self(); ?>?category=<?php echo Security::remove_XSS($category); ?>&amp;action=add"><?php echo Display::return_icon('folder_new.gif').get_lang("AddACategory"); if(!empty($category)) echo ' '.get_lang('Into').' '.Security::remove_XSS($category); ?></a>
<?php
if(!empty($category)){
$CategoryInto=' '.get_lang('Into').' '.Security::remove_XSS($category);
}
else{
$CategoryInto='';
}
?>
<a href="<?php echo api_get_self(); ?>?category=<?php echo Security::remove_XSS($category); ?>&amp;action=add"><?php echo Display::return_icon('new_folder.png',get_lang("AddACategory").$CategoryInto,'','32'); ?></a>
</div>
<ul>

@ -238,9 +238,9 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
$form->addElement('static', 'search_advanced_link', null, '<a href="course_list.php?search=advanced">'.get_lang('AdvancedSearch').'</a>');
echo '<div style="float: right; margin-top: 5px; margin-right: 5px;">';
if (api_get_setting('course_validation') != 'true') {
echo '<a href="course_add.php">'.Display::return_icon('course_add.gif', get_lang('AddCourse')).get_lang('AddCourse').'</a>';
echo '<a href="course_add.php">'.Display::return_icon('new_course.png', get_lang('AddCourse'),'','32').'</a>';
} else {
echo '<a href="course_request_review.php">'.Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests')).'&nbsp;'.get_lang('ReviewCourseRequests').'</a>';
echo '<a href="course_request_review.php">'.Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests'),'','32').'</a>';
}
echo '</div>';

@ -194,7 +194,7 @@ if (api_get_setting('use_session_mode') == 'true') { ?>
<li><a href="user_move_stats.php"><?php echo get_lang('MoveUserStats'); ?></a></li>
<?php }
echo Display::tag('li',Display::url(get_lang('CareersAndPromotions'), 'career_dashboard.php'));
echo Display::tag('li',Display::url(get_lang('Groups'), 'usergroups.php'));
echo Display::tag('li',Display::url(get_lang('Classes'), 'usergroups.php'));
?>
</ul>
</div>

@ -64,7 +64,7 @@ $extra_params['autowidth'] = 'true'; //use the width of the parent
$extra_params['height'] = 'auto'; //use the width of the parent
//With this function we can add actions to the jgrid
$action_links = 'function action_formatter (cellvalue, options, rowObject) {
return \'<a href="add_sessions_to_promotion.php?id=\'+options.rowId+\'"><img title="'.get_lang('AddSession').'" width="22px" src="../img/session_add.png"></a> '.
return \'<a href="add_sessions_to_promotion.php?id=\'+options.rowId+\'"><img title="'.get_lang('SubscribeSessionsToPromotions').'" width="22px" src="../img/icons/22/session_to_promotion.png"></a> '.
'<a href="?action=edit&id=\'+options.rowId+\'"><img width="20px" src="../img/edit.png" title="'.get_lang('Edit').'"></a> '.
'<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=copy&id=\'+options.rowId+\'"><img title="'.get_lang('Copy').'" src="../img/copy.gif" alt="'.get_lang('Copy').'"></a> '.
'<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'"><img title="'.get_lang('Delete').'" src="../img/delete.png"></a> \';
@ -118,7 +118,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'add') {
$promotion->display();
} else {
echo '<div class="actions">';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png').' '.get_lang('Back').'</a>';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
echo '</div>';
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');
@ -147,7 +147,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'add') {
$promotion->display();
} else {
echo '<div class="actions">';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png').' '.get_lang('Back').'</a>';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png',get_lang('Back'),'','32').' '.'</a>';
echo '</div>';
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');

@ -1,462 +1,471 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
* @todo use formvalidator for the form
*/
// name of the language file that needs to be included
$language_file='admin';
$cidReset=true;
// including the global Chamilo file
require_once '../inc/global.inc.php';
// including additional libraries
require_once api_get_path(LIBRARY_PATH).'sessionmanager.lib.php';
require_once '../inc/lib/xajax/xajax.inc.php';
$xajax = new xajax();
//$xajax->debugOn();
$xajax -> registerFunction ('search_coachs');
// setting the section (for the tabs)
$this_section=SECTION_PLATFORM_ADMIN;
api_protect_admin_script(true);
$formSent=0;
$errorMsg='';
$interbreadcrumb[]=array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
$interbreadcrumb[]=array('url' => 'session_list.php','name' => get_lang('SessionList'));
// Database Table Definitions
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
function search_coachs($needle) {
global $tbl_user;
$xajax_response = new XajaxResponse();
$return = '';
if(!empty($needle)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_system_encoding();
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';
// search users where username or firstname or lastname begins likes $needle
$sql = 'SELECT username, lastname, firstname FROM '.$tbl_user.' user
WHERE (username LIKE "'.$needle.'%"
OR firstname LIKE "'.$needle.'%"
OR lastname LIKE "'.$needle.'%")
AND status=1'.
$order_clause.
' LIMIT 10';
global $_configuration;
if ($_configuration['multiple_access_urls']) {
$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1){
$sql = 'SELECT username, lastname, firstname FROM '.$tbl_user.' user
INNER JOIN '.$tbl_user_rel_access_url.' url_user ON (url_user.user_id=user.user_id)
WHERE access_url_id = '.$access_url_id.' AND (username LIKE "'.$needle.'%"
OR firstname LIKE "'.$needle.'%"
OR lastname LIKE "'.$needle.'%")
AND status=1'.
$order_clause.
' LIMIT 10';
}
}
$rs = Database::query($sql);
while ($user = Database :: fetch_array($rs)) {
$return .= '<a href="javascript: void(0);" onclick="javascript: fill_coach_field(\''.$user['username'].'\')">'.api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')</a><br />';
}
}
$xajax_response -> addAssign('ajax_list_coachs','innerHTML', api_utf8_encode($return));
return $xajax_response;
}
$xajax -> processRequests();
$htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/');
$htmlHeadXtra[] = '
<script type="text/javascript">
function fill_coach_field (username) {
document.getElementById("coach_username").value = username;
document.getElementById("ajax_list_coachs").innerHTML = "";
}
</script>';
if ($_POST['formSent']) {
$formSent = 1;
$name = $_POST['name'];
$year_start = $_POST['year_start'];
$month_start = $_POST['month_start'];
$day_start = $_POST['day_start'];
$year_end = $_POST['year_end'];
$month_end = $_POST['month_end'];
$day_end = $_POST['day_end'];
$nb_days_acess_before = $_POST['nb_days_acess_before'];
$nb_days_acess_after = $_POST['nb_days_acess_after'];
//$nolimit = $_POST['nolimit'];
$coach_username = $_POST['coach_username'];
$id_session_category = $_POST['session_category'];
$id_visibility = $_POST['session_visibility'];
$end_limit = $_POST['end_limit'];
$start_limit = $_POST['start_limit'];
if (empty($end_limit) && empty($start_limit)) {
$nolimit = 1;
} else {
$nolimit = null;
}
$return = SessionManager::create_session($name,$year_start,$month_start,$day_start,$year_end,$month_end,$day_end,$nb_days_acess_before,$nb_days_acess_after,$nolimit,$coach_username, $id_session_category,$id_visibility, $start_limit, $end_limit);
global $_configuration;
require_once (api_get_path(LIBRARY_PATH).'urlmanager.lib.php');
if ($_configuration['multiple_access_urls']) {
$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$access_url_id = api_get_current_access_url_id();
UrlManager::add_session_to_url($return,$access_url_id);
} else {
// we are filling by default the access_url_rel_session table
UrlManager::add_session_to_url($return,1);
}
if ($return == strval(intval($return))) {
// integer => no error on session creation
header('Location: add_courses_to_session.php?id_session='.$return.'&add=true&msg=');
exit();
}
}
$nb_days_acess_before = 0;
$nb_days_acess_after = 0;
$thisYear=date('Y');
$thisMonth=date('m');
$thisDay=date('d');
$tool_name = get_lang('AddSession');
//display the header
Display::display_header($tool_name);
// display the tool title
// api_display_tool_title($tool_name);
if (!empty($return)) {
Display::display_error_message($return,false);
}
?>
<form method="post" name="form" action="<?php echo api_get_self(); ?>" style="margin:0px;">
<input type="hidden" name="formSent" value="1">
<div class="row"><div class="form_header"><?php echo $tool_name; ?></div></div>
<table border="0" cellpadding="5" cellspacing="0" width="650">
<tr>
<td width="40%"><?php echo get_lang('SessionName') ?>&nbsp;&nbsp;</td>
<td width="60%"><input type="text" name="name" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); ?>"></td>
</tr>
<tr>
<td width="40%"><?php echo get_lang('CoachName') ?>&nbsp;&nbsp;</td>
<td width="60%">
<?php
$sql = 'SELECT COUNT(1) FROM '.$tbl_user.' WHERE status=1';
$rs = Database::query($sql);
$count_users = Database::result($rs, 0, 0);
if (intval($count_users)<50) {
$order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';
$sql="SELECT user_id,lastname,firstname,username FROM $tbl_user WHERE status='1'".$order_clause;
global $_configuration;
if ($_configuration['multiple_access_urls']) {
$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1){
$sql = 'SELECT username, lastname, firstname FROM '.$tbl_user.' user
INNER JOIN '.$tbl_user_rel_access_url.' url_user ON (url_user.user_id=user.user_id)
WHERE access_url_id = '.$access_url_id.' AND status=1'.$order_clause;
}
}
$result=Database::query($sql);
$Coaches=Database::store_result($result);
?>
<select name="coach_username" value="true" style="width:250px;">
<option value="0"><?php get_lang('None'); ?></option>
<?php foreach($Coaches as $enreg): ?>
<option value="<?php echo $enreg['username']; ?>" <?php if($sent && $enreg['user_id'] == $id_coach) echo 'selected="selected"'; ?>><?php echo api_get_person_name($enreg['firstname'], $enreg['lastname']).' ('.$enreg['username'].')'; ?></option>
<?php endforeach; ?>
</select>
<?php
echo Display::return_icon('synthese_view.gif',get_lang('ActivityCoach'));
} else {
?>
<input type="text" name="coach_username" id="coach_username" onkeyup="xajax_search_coachs(document.getElementById('coach_username').value)" /><div id="ajax_list_coachs"></div>
<?php
}
?>
</td>
</tr>
<?php
$id_session_category = '';
$tbl_session_category = Database::get_main_table(TABLE_MAIN_SESSION_CATEGORY);
$sql = 'SELECT id, name FROM '.$tbl_session_category.' ORDER BY name ASC';
$result = Database::query($sql);
$Categories = Database::store_result($result);
?>
<tr>
<td width="40%"><?php echo get_lang('SessionCategory') ?></td>
<td width="60%">
<select name="session_category" value="true" style="width:250px;">
<option value="0"><?php get_lang('None'); ?></option>
<?php foreach($Categories as $Rows): ?>
<option value="<?php echo $Rows['id']; ?>" <?php if($Rows['id'] == $id_session_category) echo 'selected="selected"'; ?>><?php echo $Rows['name']; ?></option>
<?php endforeach; ?>
</select>
</td>
</tr>
<tr>
<td>
&nbsp;
</td>
<td>
<a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('DefineSessionOptions') ?></a>
<div style="display: <?php if($formSent && ($nb_days_acess_before!=0 || $nb_days_acess_after!=0)) echo 'block'; else echo 'none'; ?>;" id="options">
<br />
<input type="text" name="nb_days_acess_before" value="<?php echo $nb_days_acess_before; ?>" style="width: 30px;">&nbsp;<?php echo get_lang('DaysBefore') ?><br /><br />
<input type="text" name="nb_days_acess_after" value="<?php echo $nb_days_acess_after; ?>" style="width: 30px;">&nbsp;<?php echo get_lang('DaysAfter') ?>
<br />
</div>
</td>
</tr>
<td width="40%"></td>
<td width="60%">
<input id="start_limit" type="checkbox" name="start_limit" onchange="disable_starttime(this)" <?php if ($year_start=="0000") echo "checked"; ?>/>
<label for="start_limit">
<?php echo get_lang('DateStartSession');?>
</label>
<div id="start_date" style="display:none">
<br />
<select name="day_start">
<option value="1">01</option>
<option value="2" <?php if((!$formSent && $thisDay == 2) || ($formSent && $day_start == 2)) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if((!$formSent && $thisDay == 3) || ($formSent && $day_start == 3)) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if((!$formSent && $thisDay == 4) || ($formSent && $day_start == 4)) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if((!$formSent && $thisDay == 5) || ($formSent && $day_start == 5)) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if((!$formSent && $thisDay == 6) || ($formSent && $day_start == 6)) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if((!$formSent && $thisDay == 7) || ($formSent && $day_start == 7)) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if((!$formSent && $thisDay == 8) || ($formSent && $day_start == 8)) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if((!$formSent && $thisDay == 9) || ($formSent && $day_start == 9)) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if((!$formSent && $thisDay == 10) || ($formSent && $day_start == 10)) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if((!$formSent && $thisDay == 11) || ($formSent && $day_start == 11)) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if((!$formSent && $thisDay == 12) || ($formSent && $day_start == 12)) echo 'selected="selected"'; ?> >12</option>
<option value="13" <?php if((!$formSent && $thisDay == 13) || ($formSent && $day_start == 13)) echo 'selected="selected"'; ?> >13</option>
<option value="14" <?php if((!$formSent && $thisDay == 14) || ($formSent && $day_start == 14)) echo 'selected="selected"'; ?> >14</option>
<option value="15" <?php if((!$formSent && $thisDay == 15) || ($formSent && $day_start == 15)) echo 'selected="selected"'; ?> >15</option>
<option value="16" <?php if((!$formSent && $thisDay == 16) || ($formSent && $day_start == 16)) echo 'selected="selected"'; ?> >16</option>
<option value="17" <?php if((!$formSent && $thisDay == 17) || ($formSent && $day_start == 17)) echo 'selected="selected"'; ?> >17</option>
<option value="18" <?php if((!$formSent && $thisDay == 18) || ($formSent && $day_start == 18)) echo 'selected="selected"'; ?> >18</option>
<option value="19" <?php if((!$formSent && $thisDay == 19) || ($formSent && $day_start == 19)) echo 'selected="selected"'; ?> >19</option>
<option value="20" <?php if((!$formSent && $thisDay == 20) || ($formSent && $day_start == 20)) echo 'selected="selected"'; ?> >20</option>
<option value="21" <?php if((!$formSent && $thisDay == 21) || ($formSent && $day_start == 21)) echo 'selected="selected"'; ?> >21</option>
<option value="22" <?php if((!$formSent && $thisDay == 22) || ($formSent && $day_start == 22)) echo 'selected="selected"'; ?> >22</option>
<option value="23" <?php if((!$formSent && $thisDay == 23) || ($formSent && $day_start == 23)) echo 'selected="selected"'; ?> >23</option>
<option value="24" <?php if((!$formSent && $thisDay == 24) || ($formSent && $day_start == 24)) echo 'selected="selected"'; ?> >24</option>
<option value="25" <?php if((!$formSent && $thisDay == 25) || ($formSent && $day_start == 25)) echo 'selected="selected"'; ?> >25</option>
<option value="26" <?php if((!$formSent && $thisDay == 26) || ($formSent && $day_start == 26)) echo 'selected="selected"'; ?> >26</option>
<option value="27" <?php if((!$formSent && $thisDay == 27) || ($formSent && $day_start == 27)) echo 'selected="selected"'; ?> >27</option>
<option value="28" <?php if((!$formSent && $thisDay == 28) || ($formSent && $day_start == 28)) echo 'selected="selected"'; ?> >28</option>
<option value="29" <?php if((!$formSent && $thisDay == 29) || ($formSent && $day_start == 29)) echo 'selected="selected"'; ?> >29</option>
<option value="30" <?php if((!$formSent && $thisDay == 30) || ($formSent && $day_start == 30)) echo 'selected="selected"'; ?> >30</option>
<option value="31" <?php if((!$formSent && $thisDay == 31) || ($formSent && $day_start == 31)) echo 'selected="selected"'; ?> >31</option>
</select>
/
<select name="month_start">
<option value="1">01</option>
<option value="2" <?php if((!$formSent && $thisMonth == 2) || ($formSent && $month_start == 2)) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if((!$formSent && $thisMonth == 3) || ($formSent && $month_start == 3)) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if((!$formSent && $thisMonth == 4) || ($formSent && $month_start == 4)) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if((!$formSent && $thisMonth == 5) || ($formSent && $month_start == 5)) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if((!$formSent && $thisMonth == 6) || ($formSent && $month_start == 6)) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if((!$formSent && $thisMonth == 7) || ($formSent && $month_start == 7)) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if((!$formSent && $thisMonth == 8) || ($formSent && $month_start == 8)) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if((!$formSent && $thisMonth == 9) || ($formSent && $month_start == 9)) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if((!$formSent && $thisMonth == 10) || ($formSent && $month_start == 10)) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if((!$formSent && $thisMonth == 11) || ($formSent && $month_start == 11)) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if((!$formSent && $thisMonth == 12) || ($formSent && $month_start == 12)) echo 'selected="selected"'; ?> >12</option>
</select>
/
<select name="year_start">
<?php
for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) {
?>
<option value="<?php echo $i; ?>" <?php if((!$formSent && $thisYear == $i) || ($formSent && $year_start == $i)) echo 'selected="selected"'; ?> ><?php echo $i; ?></option>
<?php
}
?>
</select>
</div>
</td>
</tr>
<tr>
<td width="40%">&nbsp;&nbsp;</td>
<td width="60%">
<input id="end_limit" type="checkbox" name="end_limit" onchange="disable_endtime(this)" <?php if ($year_end=="0000") echo "checked"; ?>/>
<label for="end_limit">
<?php echo get_lang('DateEndSession') ?>
</label>
<div id="end_date" style="display:none">
<br />
<select name="day_end">
<option value="1">01</option>
<option value="2" <?php if((!$formSent && $thisDay == 2) || ($formSent && $day_end == 2)) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if((!$formSent && $thisDay == 3) || ($formSent && $day_end == 3)) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if((!$formSent && $thisDay == 4) || ($formSent && $day_end == 4)) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if((!$formSent && $thisDay == 5) || ($formSent && $day_end == 5)) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if((!$formSent && $thisDay == 6) || ($formSent && $day_end == 6)) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if((!$formSent && $thisDay == 7) || ($formSent && $day_end == 7)) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if((!$formSent && $thisDay == 8) || ($formSent && $day_end == 8)) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if((!$formSent && $thisDay == 9) || ($formSent && $day_end == 9)) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if((!$formSent && $thisDay == 10) || ($formSent && $day_end == 10)) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if((!$formSent && $thisDay == 11) || ($formSent && $day_end == 11)) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if((!$formSent && $thisDay == 12) || ($formSent && $day_end == 12)) echo 'selected="selected"'; ?> >12</option>
<option value="13" <?php if((!$formSent && $thisDay == 13) || ($formSent && $day_end == 13)) echo 'selected="selected"'; ?> >13</option>
<option value="14" <?php if((!$formSent && $thisDay == 14) || ($formSent && $day_end == 14)) echo 'selected="selected"'; ?> >14</option>
<option value="15" <?php if((!$formSent && $thisDay == 15) || ($formSent && $day_end == 15)) echo 'selected="selected"'; ?> >15</option>
<option value="16" <?php if((!$formSent && $thisDay == 16) || ($formSent && $day_end == 16)) echo 'selected="selected"'; ?> >16</option>
<option value="17" <?php if((!$formSent && $thisDay == 17) || ($formSent && $day_end == 17)) echo 'selected="selected"'; ?> >17</option>
<option value="18" <?php if((!$formSent && $thisDay == 18) || ($formSent && $day_end == 18)) echo 'selected="selected"'; ?> >18</option>
<option value="19" <?php if((!$formSent && $thisDay == 19) || ($formSent && $day_end == 19)) echo 'selected="selected"'; ?> >19</option>
<option value="20" <?php if((!$formSent && $thisDay == 20) || ($formSent && $day_end == 20)) echo 'selected="selected"'; ?> >20</option>
<option value="21" <?php if((!$formSent && $thisDay == 21) || ($formSent && $day_end == 21)) echo 'selected="selected"'; ?> >21</option>
<option value="22" <?php if((!$formSent && $thisDay == 22) || ($formSent && $day_end == 22)) echo 'selected="selected"'; ?> >22</option>
<option value="23" <?php if((!$formSent && $thisDay == 23) || ($formSent && $day_end == 23)) echo 'selected="selected"'; ?> >23</option>
<option value="24" <?php if((!$formSent && $thisDay == 24) || ($formSent && $day_end == 24)) echo 'selected="selected"'; ?> >24</option>
<option value="25" <?php if((!$formSent && $thisDay == 25) || ($formSent && $day_end == 25)) echo 'selected="selected"'; ?> >25</option>
<option value="26" <?php if((!$formSent && $thisDay == 26) || ($formSent && $day_end == 26)) echo 'selected="selected"'; ?> >26</option>
<option value="27" <?php if((!$formSent && $thisDay == 27) || ($formSent && $day_end == 27)) echo 'selected="selected"'; ?> >27</option>
<option value="28" <?php if((!$formSent && $thisDay == 28) || ($formSent && $day_end == 28)) echo 'selected="selected"'; ?> >28</option>
<option value="29" <?php if((!$formSent && $thisDay == 29) || ($formSent && $day_end == 29)) echo 'selected="selected"'; ?> >29</option>
<option value="30" <?php if((!$formSent && $thisDay == 30) || ($formSent && $day_end == 30)) echo 'selected="selected"'; ?> >30</option>
<option value="31" <?php if((!$formSent && $thisDay == 31) || ($formSent && $day_end == 31)) echo 'selected="selected"'; ?> >31</option>
</select>
/
<select name="month_end">
<option value="1">01</option>
<option value="2" <?php if((!$formSent && $thisMonth == 2) || ($formSent && $month_end == 2)) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if((!$formSent && $thisMonth == 3) || ($formSent && $month_end == 3)) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if((!$formSent && $thisMonth == 4) || ($formSent && $month_end == 4)) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if((!$formSent && $thisMonth == 5) || ($formSent && $month_end == 5)) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if((!$formSent && $thisMonth == 6) || ($formSent && $month_end == 6)) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if((!$formSent && $thisMonth == 7) || ($formSent && $month_end == 7)) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if((!$formSent && $thisMonth == 8) || ($formSent && $month_end == 8)) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if((!$formSent && $thisMonth == 9) || ($formSent && $month_end == 9)) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if((!$formSent && $thisMonth == 10) || ($formSent && $month_end == 10)) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if((!$formSent && $thisMonth == 11) || ($formSent && $month_end == 11)) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if((!$formSent && $thisMonth == 12) || ($formSent && $month_end == 12)) echo 'selected="selected"'; ?> >12</option>
</select>
/
<select name="year_end">
<?php
for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) {
?>
<option value="<?php echo $i; ?>" <?php if((!$formSent && ($thisYear+1) == $i) || ($formSent && $year_end == $i)) echo 'selected="selected"'; ?> ><?php echo $i; ?></option>
<?php
}
?>
</select>
<br /> <br />
<?php echo get_lang('SessionVisibility') ?>
<select name="session_visibility" style="width:250px;">
<?php
$visibility_list = array(SESSION_VISIBLE_READ_ONLY=>get_lang('SessionReadOnly'), SESSION_VISIBLE=>get_lang('SessionAccessible'), SESSION_INVISIBLE=>api_ucfirst(get_lang('SessionNotAccessible')));
foreach($visibility_list as $key=>$item): ?>
<option value="<?php echo $key; ?>" <?php if($item == $visibility_id) echo 'selected="selected"'; ?>><?php echo $item; ?></option>
<?php endforeach; ?>
</select>
</div>
</td>
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
* @todo use formvalidator for the form
*/
// name of the language file that needs to be included
$language_file='admin';
$cidReset=true;
// including the global Chamilo file
require_once '../inc/global.inc.php';
// including additional libraries
require_once api_get_path(LIBRARY_PATH).'sessionmanager.lib.php';
require_once '../inc/lib/xajax/xajax.inc.php';
$xajax = new xajax();
//$xajax->debugOn();
$xajax -> registerFunction ('search_coachs');
// setting the section (for the tabs)
$this_section=SECTION_PLATFORM_ADMIN;
api_protect_admin_script(true);
$formSent=0;
$errorMsg='';
$interbreadcrumb[]=array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
$interbreadcrumb[]=array('url' => 'session_list.php','name' => get_lang('SessionList'));
// Database Table Definitions
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
function search_coachs($needle) {
global $tbl_user;
$xajax_response = new XajaxResponse();
$return = '';
if(!empty($needle)) {
// xajax send utf8 datas... datas in db can be non-utf8 datas
$charset = api_get_system_encoding();
$needle = api_convert_encoding($needle, $charset, 'utf-8');
$order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';
// search users where username or firstname or lastname begins likes $needle
$sql = 'SELECT username, lastname, firstname FROM '.$tbl_user.' user
WHERE (username LIKE "'.$needle.'%"
OR firstname LIKE "'.$needle.'%"
OR lastname LIKE "'.$needle.'%")
AND status=1'.
$order_clause.
' LIMIT 10';
global $_configuration;
if ($_configuration['multiple_access_urls']) {
$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1){
$sql = 'SELECT username, lastname, firstname FROM '.$tbl_user.' user
INNER JOIN '.$tbl_user_rel_access_url.' url_user ON (url_user.user_id=user.user_id)
WHERE access_url_id = '.$access_url_id.' AND (username LIKE "'.$needle.'%"
OR firstname LIKE "'.$needle.'%"
OR lastname LIKE "'.$needle.'%")
AND status=1'.
$order_clause.
' LIMIT 10';
}
}
$rs = Database::query($sql);
while ($user = Database :: fetch_array($rs)) {
$return .= '<a href="javascript: void(0);" onclick="javascript: fill_coach_field(\''.$user['username'].'\')">'.api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')</a><br />';
}
}
$xajax_response -> addAssign('ajax_list_coachs','innerHTML', api_utf8_encode($return));
return $xajax_response;
}
$xajax -> processRequests();
$htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/');
$htmlHeadXtra[] = '
<script type="text/javascript">
function fill_coach_field (username) {
document.getElementById("coach_username").value = username;
document.getElementById("ajax_list_coachs").innerHTML = "";
}
</script>';
if ($_POST['formSent']) {
$formSent = 1;
$name = $_POST['name'];
$year_start = $_POST['year_start'];
$month_start = $_POST['month_start'];
$day_start = $_POST['day_start'];
$year_end = $_POST['year_end'];
$month_end = $_POST['month_end'];
$day_end = $_POST['day_end'];
$nb_days_acess_before = $_POST['nb_days_acess_before'];
$nb_days_acess_after = $_POST['nb_days_acess_after'];
//$nolimit = $_POST['nolimit'];
$coach_username = $_POST['coach_username'];
$id_session_category = $_POST['session_category'];
$id_visibility = $_POST['session_visibility'];
$end_limit = $_POST['end_limit'];
$start_limit = $_POST['start_limit'];
if (empty($end_limit) && empty($start_limit)) {
$nolimit = 1;
} else {
$nolimit = null;
}
$return = SessionManager::create_session($name,$year_start,$month_start,$day_start,$year_end,$month_end,$day_end,$nb_days_acess_before,$nb_days_acess_after,$nolimit,$coach_username, $id_session_category,$id_visibility, $start_limit, $end_limit);
global $_configuration;
require_once (api_get_path(LIBRARY_PATH).'urlmanager.lib.php');
if ($_configuration['multiple_access_urls']) {
$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$access_url_id = api_get_current_access_url_id();
UrlManager::add_session_to_url($return,$access_url_id);
} else {
// we are filling by default the access_url_rel_session table
UrlManager::add_session_to_url($return,1);
}
if ($return == strval(intval($return))) {
// integer => no error on session creation
header('Location: add_courses_to_session.php?id_session='.$return.'&add=true&msg=');
exit();
}
}
$nb_days_acess_before = 0;
$nb_days_acess_after = 0;
$thisYear=date('Y');
$thisMonth=date('m');
$thisDay=date('d');
$tool_name = get_lang('AddSession');
//display the header
Display::display_header($tool_name);
// display the tool title
// api_display_tool_title($tool_name);
if (!empty($return)) {
Display::display_error_message($return,false);
}
?>
<form method="post" name="form" action="<?php echo api_get_self(); ?>" style="margin:0px;">
<input type="hidden" name="formSent" value="1">
<?php
echo '<div class="actions">';
echo '<a href="../admin/index.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'','32').'</a>';
echo '</div>';
//echo '<div class=row><div class="form_header">';
//echo $tool_name;
//echo '</div></div>';
?>
<table border="0" cellpadding="5" cellspacing="0" width="650">
<tr>
<td width="40%"><?php echo get_lang('SessionName') ?>&nbsp;&nbsp;</td>
<td width="60%"><input type="text" name="name" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); ?>"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><button class="save" type="submit" value="<?php echo get_lang('NextStep') ?>"><?php echo get_lang('NextStep') ?></button>
</td>
</tr>
</table>
</form>
<script type="text/javascript">
function setDisable(select){
document.form.day_start.disabled = (select.checked) ? true : false;
document.form.month_start.disabled = (select.checked) ? true : false;
document.form.year_start.disabled = (select.checked) ? true : false;
document.form.day_end.disabled = (select.checked) ? true : false;
document.form.month_end.disabled = (select.checked) ? true : false;
document.form.year_end.disabled = (select.checked) ? true : false;
document.form.session_visibility.disabled = (select.checked) ? true : false;
document.form.session_visibility.selectedIndex = 0;
document.form.start_limit.disabled = (select.checked) ? true : false;
document.form.start_limit.checked = false;
document.form.end_limit.disabled = (select.checked) ? true : false;
document.form.end_limit.checked = false;
var end_div = document.getElementById('end_date');
end_div.style.display = 'none';
var start_div = document.getElementById('start_date');
start_div.style.display = 'none';
}
function disable_endtime(select) {
var end_div = document.getElementById('end_date');
if (end_div.style.display == 'none')
end_div.style.display = 'block';
else
end_div.style.display = 'none';
}
function disable_starttime(select) {
var start_div = document.getElementById('start_date');
if (start_div.style.display == 'none')
start_div.style.display = 'block';
else
start_div.style.display = 'none';
}
</script>
<?php
<tr>
<td width="40%"><?php echo get_lang('CoachName') ?>&nbsp;&nbsp;</td>
<td width="60%">
<?php
$sql = 'SELECT COUNT(1) FROM '.$tbl_user.' WHERE status=1';
$rs = Database::query($sql);
$count_users = Database::result($rs, 0, 0);
if (intval($count_users)<50) {
$order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';
$sql="SELECT user_id,lastname,firstname,username FROM $tbl_user WHERE status='1'".$order_clause;
global $_configuration;
if ($_configuration['multiple_access_urls']) {
$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1){
$sql = 'SELECT username, lastname, firstname FROM '.$tbl_user.' user
INNER JOIN '.$tbl_user_rel_access_url.' url_user ON (url_user.user_id=user.user_id)
WHERE access_url_id = '.$access_url_id.' AND status=1'.$order_clause;
}
}
$result=Database::query($sql);
$Coaches=Database::store_result($result);
?>
<select name="coach_username" value="true" style="width:250px;">
<option value="0"><?php get_lang('None'); ?></option>
<?php foreach($Coaches as $enreg): ?>
<option value="<?php echo $enreg['username']; ?>" <?php if($sent && $enreg['user_id'] == $id_coach) echo 'selected="selected"'; ?>><?php echo api_get_person_name($enreg['firstname'], $enreg['lastname']).' ('.$enreg['username'].')'; ?></option>
<?php endforeach; ?>
</select>
<?php
echo Display::return_icon('synthese_view.gif',get_lang('ActivityCoach'));
} else {
?>
<input type="text" name="coach_username" id="coach_username" onkeyup="xajax_search_coachs(document.getElementById('coach_username').value)" /><div id="ajax_list_coachs"></div>
<?php
}
?>
</td>
</tr>
<?php
$id_session_category = '';
$tbl_session_category = Database::get_main_table(TABLE_MAIN_SESSION_CATEGORY);
$sql = 'SELECT id, name FROM '.$tbl_session_category.' ORDER BY name ASC';
$result = Database::query($sql);
$Categories = Database::store_result($result);
?>
<tr>
<td width="40%"><?php echo get_lang('SessionCategory') ?></td>
<td width="60%">
<select name="session_category" value="true" style="width:250px;">
<option value="0"><?php get_lang('None'); ?></option>
<?php foreach($Categories as $Rows): ?>
<option value="<?php echo $Rows['id']; ?>" <?php if($Rows['id'] == $id_session_category) echo 'selected="selected"'; ?>><?php echo $Rows['name']; ?></option>
<?php endforeach; ?>
</select>
</td>
</tr>
<tr>
<td>&nbsp;
</td>
<td>
<a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('DefineSessionOptions') ?></a>
<div style="display: <?php if($formSent && ($nb_days_acess_before!=0 || $nb_days_acess_after!=0)) echo 'block'; else echo 'none'; ?>;" id="options">
<br />
<input type="text" name="nb_days_acess_before" value="<?php echo $nb_days_acess_before; ?>" style="width: 30px;">&nbsp;<?php echo get_lang('DaysBefore') ?><br /><br />
<input type="text" name="nb_days_acess_after" value="<?php echo $nb_days_acess_after; ?>" style="width: 30px;">&nbsp;<?php echo get_lang('DaysAfter') ?>
<br />
</div>
</td>
</tr>
<td width="40%"></td>
<td width="60%">
<input id="start_limit" type="checkbox" name="start_limit" onchange="disable_starttime(this)" <?php if ($year_start=="0000") echo "checked"; ?>/>
<label for="start_limit">
<?php echo get_lang('DateStartSession');?>
</label>
<div id="start_date" style="display:none">
<br />
<select name="day_start">
<option value="1">01</option>
<option value="2" <?php if((!$formSent && $thisDay == 2) || ($formSent && $day_start == 2)) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if((!$formSent && $thisDay == 3) || ($formSent && $day_start == 3)) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if((!$formSent && $thisDay == 4) || ($formSent && $day_start == 4)) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if((!$formSent && $thisDay == 5) || ($formSent && $day_start == 5)) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if((!$formSent && $thisDay == 6) || ($formSent && $day_start == 6)) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if((!$formSent && $thisDay == 7) || ($formSent && $day_start == 7)) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if((!$formSent && $thisDay == 8) || ($formSent && $day_start == 8)) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if((!$formSent && $thisDay == 9) || ($formSent && $day_start == 9)) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if((!$formSent && $thisDay == 10) || ($formSent && $day_start == 10)) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if((!$formSent && $thisDay == 11) || ($formSent && $day_start == 11)) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if((!$formSent && $thisDay == 12) || ($formSent && $day_start == 12)) echo 'selected="selected"'; ?> >12</option>
<option value="13" <?php if((!$formSent && $thisDay == 13) || ($formSent && $day_start == 13)) echo 'selected="selected"'; ?> >13</option>
<option value="14" <?php if((!$formSent && $thisDay == 14) || ($formSent && $day_start == 14)) echo 'selected="selected"'; ?> >14</option>
<option value="15" <?php if((!$formSent && $thisDay == 15) || ($formSent && $day_start == 15)) echo 'selected="selected"'; ?> >15</option>
<option value="16" <?php if((!$formSent && $thisDay == 16) || ($formSent && $day_start == 16)) echo 'selected="selected"'; ?> >16</option>
<option value="17" <?php if((!$formSent && $thisDay == 17) || ($formSent && $day_start == 17)) echo 'selected="selected"'; ?> >17</option>
<option value="18" <?php if((!$formSent && $thisDay == 18) || ($formSent && $day_start == 18)) echo 'selected="selected"'; ?> >18</option>
<option value="19" <?php if((!$formSent && $thisDay == 19) || ($formSent && $day_start == 19)) echo 'selected="selected"'; ?> >19</option>
<option value="20" <?php if((!$formSent && $thisDay == 20) || ($formSent && $day_start == 20)) echo 'selected="selected"'; ?> >20</option>
<option value="21" <?php if((!$formSent && $thisDay == 21) || ($formSent && $day_start == 21)) echo 'selected="selected"'; ?> >21</option>
<option value="22" <?php if((!$formSent && $thisDay == 22) || ($formSent && $day_start == 22)) echo 'selected="selected"'; ?> >22</option>
<option value="23" <?php if((!$formSent && $thisDay == 23) || ($formSent && $day_start == 23)) echo 'selected="selected"'; ?> >23</option>
<option value="24" <?php if((!$formSent && $thisDay == 24) || ($formSent && $day_start == 24)) echo 'selected="selected"'; ?> >24</option>
<option value="25" <?php if((!$formSent && $thisDay == 25) || ($formSent && $day_start == 25)) echo 'selected="selected"'; ?> >25</option>
<option value="26" <?php if((!$formSent && $thisDay == 26) || ($formSent && $day_start == 26)) echo 'selected="selected"'; ?> >26</option>
<option value="27" <?php if((!$formSent && $thisDay == 27) || ($formSent && $day_start == 27)) echo 'selected="selected"'; ?> >27</option>
<option value="28" <?php if((!$formSent && $thisDay == 28) || ($formSent && $day_start == 28)) echo 'selected="selected"'; ?> >28</option>
<option value="29" <?php if((!$formSent && $thisDay == 29) || ($formSent && $day_start == 29)) echo 'selected="selected"'; ?> >29</option>
<option value="30" <?php if((!$formSent && $thisDay == 30) || ($formSent && $day_start == 30)) echo 'selected="selected"'; ?> >30</option>
<option value="31" <?php if((!$formSent && $thisDay == 31) || ($formSent && $day_start == 31)) echo 'selected="selected"'; ?> >31</option>
</select>
/
<select name="month_start">
<option value="1">01</option>
<option value="2" <?php if((!$formSent && $thisMonth == 2) || ($formSent && $month_start == 2)) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if((!$formSent && $thisMonth == 3) || ($formSent && $month_start == 3)) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if((!$formSent && $thisMonth == 4) || ($formSent && $month_start == 4)) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if((!$formSent && $thisMonth == 5) || ($formSent && $month_start == 5)) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if((!$formSent && $thisMonth == 6) || ($formSent && $month_start == 6)) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if((!$formSent && $thisMonth == 7) || ($formSent && $month_start == 7)) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if((!$formSent && $thisMonth == 8) || ($formSent && $month_start == 8)) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if((!$formSent && $thisMonth == 9) || ($formSent && $month_start == 9)) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if((!$formSent && $thisMonth == 10) || ($formSent && $month_start == 10)) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if((!$formSent && $thisMonth == 11) || ($formSent && $month_start == 11)) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if((!$formSent && $thisMonth == 12) || ($formSent && $month_start == 12)) echo 'selected="selected"'; ?> >12</option>
</select>
/
<select name="year_start">
<?php
for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) {
?>
<option value="<?php echo $i; ?>" <?php if((!$formSent && $thisYear == $i) || ($formSent && $year_start == $i)) echo 'selected="selected"'; ?> ><?php echo $i; ?></option>
<?php
}
?>
</select>
</div>
</td>
</tr>
<tr>
<td width="40%">&nbsp;&nbsp;</td>
<td width="60%">
<input id="end_limit" type="checkbox" name="end_limit" onchange="disable_endtime(this)" <?php if ($year_end=="0000") echo "checked"; ?>/>
<label for="end_limit">
<?php echo get_lang('DateEndSession') ?>
</label>
<div id="end_date" style="display:none">
<br />
<select name="day_end">
<option value="1">01</option>
<option value="2" <?php if((!$formSent && $thisDay == 2) || ($formSent && $day_end == 2)) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if((!$formSent && $thisDay == 3) || ($formSent && $day_end == 3)) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if((!$formSent && $thisDay == 4) || ($formSent && $day_end == 4)) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if((!$formSent && $thisDay == 5) || ($formSent && $day_end == 5)) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if((!$formSent && $thisDay == 6) || ($formSent && $day_end == 6)) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if((!$formSent && $thisDay == 7) || ($formSent && $day_end == 7)) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if((!$formSent && $thisDay == 8) || ($formSent && $day_end == 8)) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if((!$formSent && $thisDay == 9) || ($formSent && $day_end == 9)) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if((!$formSent && $thisDay == 10) || ($formSent && $day_end == 10)) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if((!$formSent && $thisDay == 11) || ($formSent && $day_end == 11)) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if((!$formSent && $thisDay == 12) || ($formSent && $day_end == 12)) echo 'selected="selected"'; ?> >12</option>
<option value="13" <?php if((!$formSent && $thisDay == 13) || ($formSent && $day_end == 13)) echo 'selected="selected"'; ?> >13</option>
<option value="14" <?php if((!$formSent && $thisDay == 14) || ($formSent && $day_end == 14)) echo 'selected="selected"'; ?> >14</option>
<option value="15" <?php if((!$formSent && $thisDay == 15) || ($formSent && $day_end == 15)) echo 'selected="selected"'; ?> >15</option>
<option value="16" <?php if((!$formSent && $thisDay == 16) || ($formSent && $day_end == 16)) echo 'selected="selected"'; ?> >16</option>
<option value="17" <?php if((!$formSent && $thisDay == 17) || ($formSent && $day_end == 17)) echo 'selected="selected"'; ?> >17</option>
<option value="18" <?php if((!$formSent && $thisDay == 18) || ($formSent && $day_end == 18)) echo 'selected="selected"'; ?> >18</option>
<option value="19" <?php if((!$formSent && $thisDay == 19) || ($formSent && $day_end == 19)) echo 'selected="selected"'; ?> >19</option>
<option value="20" <?php if((!$formSent && $thisDay == 20) || ($formSent && $day_end == 20)) echo 'selected="selected"'; ?> >20</option>
<option value="21" <?php if((!$formSent && $thisDay == 21) || ($formSent && $day_end == 21)) echo 'selected="selected"'; ?> >21</option>
<option value="22" <?php if((!$formSent && $thisDay == 22) || ($formSent && $day_end == 22)) echo 'selected="selected"'; ?> >22</option>
<option value="23" <?php if((!$formSent && $thisDay == 23) || ($formSent && $day_end == 23)) echo 'selected="selected"'; ?> >23</option>
<option value="24" <?php if((!$formSent && $thisDay == 24) || ($formSent && $day_end == 24)) echo 'selected="selected"'; ?> >24</option>
<option value="25" <?php if((!$formSent && $thisDay == 25) || ($formSent && $day_end == 25)) echo 'selected="selected"'; ?> >25</option>
<option value="26" <?php if((!$formSent && $thisDay == 26) || ($formSent && $day_end == 26)) echo 'selected="selected"'; ?> >26</option>
<option value="27" <?php if((!$formSent && $thisDay == 27) || ($formSent && $day_end == 27)) echo 'selected="selected"'; ?> >27</option>
<option value="28" <?php if((!$formSent && $thisDay == 28) || ($formSent && $day_end == 28)) echo 'selected="selected"'; ?> >28</option>
<option value="29" <?php if((!$formSent && $thisDay == 29) || ($formSent && $day_end == 29)) echo 'selected="selected"'; ?> >29</option>
<option value="30" <?php if((!$formSent && $thisDay == 30) || ($formSent && $day_end == 30)) echo 'selected="selected"'; ?> >30</option>
<option value="31" <?php if((!$formSent && $thisDay == 31) || ($formSent && $day_end == 31)) echo 'selected="selected"'; ?> >31</option>
</select>
/
<select name="month_end">
<option value="1">01</option>
<option value="2" <?php if((!$formSent && $thisMonth == 2) || ($formSent && $month_end == 2)) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if((!$formSent && $thisMonth == 3) || ($formSent && $month_end == 3)) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if((!$formSent && $thisMonth == 4) || ($formSent && $month_end == 4)) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if((!$formSent && $thisMonth == 5) || ($formSent && $month_end == 5)) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if((!$formSent && $thisMonth == 6) || ($formSent && $month_end == 6)) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if((!$formSent && $thisMonth == 7) || ($formSent && $month_end == 7)) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if((!$formSent && $thisMonth == 8) || ($formSent && $month_end == 8)) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if((!$formSent && $thisMonth == 9) || ($formSent && $month_end == 9)) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if((!$formSent && $thisMonth == 10) || ($formSent && $month_end == 10)) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if((!$formSent && $thisMonth == 11) || ($formSent && $month_end == 11)) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if((!$formSent && $thisMonth == 12) || ($formSent && $month_end == 12)) echo 'selected="selected"'; ?> >12</option>
</select>
/
<select name="year_end">
<?php
for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) {
?>
<option value="<?php echo $i; ?>" <?php if((!$formSent && ($thisYear+1) == $i) || ($formSent && $year_end == $i)) echo 'selected="selected"'; ?> ><?php echo $i; ?></option>
<?php
}
?>
</select>
<br /> <br />
<?php echo get_lang('SessionVisibility') ?>
<select name="session_visibility" style="width:250px;">
<?php
$visibility_list = array(SESSION_VISIBLE_READ_ONLY=>get_lang('SessionReadOnly'), SESSION_VISIBLE=>get_lang('SessionAccessible'), SESSION_INVISIBLE=>api_ucfirst(get_lang('SessionNotAccessible')));
foreach($visibility_list as $key=>$item): ?>
<option value="<?php echo $key; ?>" <?php if($item == $visibility_id) echo 'selected="selected"'; ?>><?php echo $item; ?></option>
<?php endforeach; ?>
</select>
</div>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><button class="save" type="submit" value="<?php echo get_lang('NextStep') ?>"><?php echo get_lang('NextStep') ?></button>
</td>
</tr>
</table>
</form>
<script type="text/javascript">
function setDisable(select){
document.form.day_start.disabled = (select.checked) ? true : false;
document.form.month_start.disabled = (select.checked) ? true : false;
document.form.year_start.disabled = (select.checked) ? true : false;
document.form.day_end.disabled = (select.checked) ? true : false;
document.form.month_end.disabled = (select.checked) ? true : false;
document.form.year_end.disabled = (select.checked) ? true : false;
document.form.session_visibility.disabled = (select.checked) ? true : false;
document.form.session_visibility.selectedIndex = 0;
document.form.start_limit.disabled = (select.checked) ? true : false;
document.form.start_limit.checked = false;
document.form.end_limit.disabled = (select.checked) ? true : false;
document.form.end_limit.checked = false;
var end_div = document.getElementById('end_date');
end_div.style.display = 'none';
var start_div = document.getElementById('start_date');
start_div.style.display = 'none';
}
function disable_endtime(select) {
var end_div = document.getElementById('end_date');
if (end_div.style.display == 'none')
end_div.style.display = 'block';
else
end_div.style.display = 'none';
}
function disable_starttime(select) {
var start_div = document.getElementById('start_date');
if (start_div.style.display == 'none')
start_div.style.display = 'block';
else
start_div.style.display = 'none';
}
</script>
<?php
Display::display_footer();

@ -90,7 +90,7 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
$nbr_results = sizeof($Sessions);
$tool_name = get_lang('ListSessionCategory');
Display::display_header($tool_name);
api_display_tool_title($tool_name);
//api_display_tool_title($tool_name);
if (!empty($_GET['warn'])) {
Display::display_warning_message(urldecode($_GET['warn']),false);
@ -103,8 +103,8 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
<div class="actions">
<?php
echo '<div style="float:right;">
<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_category_add.php">'.Display::return_icon('folder_new.gif',get_lang('AddSessionCategory')).get_lang('AddSessionCategory').'</a>
<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_list.php">'.Display::return_icon('blackboard_blue.png',get_lang('ListSession'),array('width'=>'24px')).get_lang('ListSession').'</a>
<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_category_add.php">'.Display::return_icon('new_folder.png',get_lang('AddSessionCategory'),'','32').'</a>
<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_list.php">'.Display::return_icon('session.png',get_lang('ListSession'),'','32').'</a>
</div>';
?>
<form method="POST" action="session_category_list.php">

@ -281,7 +281,14 @@ if(!empty($errorMsg))
<form method="post" action="<?php echo api_get_self(); ?>" style="margin:0px;">
<input type="hidden" name="formSent" value="1">
<div class="row"><div class="form_header"><?php echo $tool_name; ?></div></div>
<?php
echo '<div class="actions">';
echo '<a href="../admin/index.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'','32').'</a>';
echo '</div>';
//echo '<div class=row><div class="form_header">';
//echo $tool_name;
//echo '</div></div>';
?>
<table border="0" cellpadding="5" cellspacing="0">
<tr>
<td nowrap="nowrap" valign="top"><?php echo get_lang('OutputFileType'); ?> :</td>

@ -851,7 +851,14 @@ if (count($inserted_in_course) > 1) {
<form method="post" action="<?php echo api_get_self(); ?>" enctype="multipart/form-data" style="margin: 0px;">
<input type="hidden" name="formSent" value="1">
<div class="row"><div class="form_header"><?php echo $tool_name; ?></div></div>
<?php
echo '<div class="actions">';
echo '<a href="../admin/index.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'','32').'</a>';
echo '</div>';
//echo '<div class=row><div class="form_header">';
//echo $tool_name;
//echo '</div></div>';
?>
<table border="0" cellpadding="5" cellspacing="0">
<?php

@ -206,11 +206,11 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
<?php
echo '<div style="float:right;">';
if (!isset($_GET['id_category'])) {
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_add.php">'.Display::return_icon('view_more_stats.gif',get_lang('AddSession')).get_lang('AddSession').'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_add.php">'.Display::return_icon('new_session.png',get_lang('AddSession'),'','32').'</a>';
}
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/add_many_session_to_category.php?id_category='.intval($_GET['id_category']).'">'.Display::return_icon('view_more_stats.gif',get_lang('AddSessionsInCategories')).get_lang('AddSessionsInCategories').'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_category_list.php">'.Display::return_icon('folder_document.gif',get_lang('ListSessionCategory')).get_lang('ListSessionCategory').'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/add_many_session_to_category.php?id_category='.intval($_GET['id_category']).'">'.Display::return_icon('session_to_category.png',get_lang('AddSessionsInCategories'),'','32').'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_category_list.php">'.Display::return_icon('folder.png',get_lang('ListSessionCategory'),'','32').'</a>';
echo '</div>';
?>
<form method="POST" action="session_list.php">
@ -287,7 +287,7 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
<tr class="<?php echo $i?'row_odd':'row_even'; ?>">
<td><input type="checkbox" id="idChecked_<?php echo $x; ?>" name="idChecked[]" value="<?php echo $enreg['id']; ?>"></td>
<td><a href="resume_session.php?id_session=<?php echo $enreg['id']; ?>"><?php echo api_htmlentities($enreg['name'],ENT_QUOTES,$charset); ?></a></td>
<td><a href="session_course_list.php?id_session=<?php echo $enreg['id']; ?>"><?php echo $nb_courses.' '.get_lang('Course'); ?></a></td>
<td><a href="session_course_list.php?id_session=<?php echo $enreg['id']; ?>"><?php echo $nb_courses; ?></a></td>
<td><?php echo api_htmlentities($enreg['category_name'],ENT_QUOTES,$charset); ?></td>
<td><?php echo ($enreg['date_start'] != '0000-00-00')? api_htmlentities($enreg['date_start'],ENT_QUOTES,$charset): '-'; ?></td>
<td><?php echo ($enreg['date_end'] != '0000-00-00')?api_htmlentities($enreg['date_end'],ENT_QUOTES,$charset): '-'; ?></td>
@ -309,8 +309,8 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
?></td>
<td>
<a href="add_users_to_session.php?page=session_list.php&id_session=<?php echo $enreg['id']; ?>"><?php Display::display_icon('add_user_big.gif', get_lang('SubscribeUsersToSession')); ?></a>
<a href="add_courses_to_session.php?page=session_list.php&id_session=<?php echo $enreg['id']; ?>"><?php Display::display_icon('course_add.gif', get_lang('SubscribeCoursesToSession')); ?></a>
<a href="add_users_to_session.php?page=session_list.php&id_session=<?php echo $enreg['id']; ?>"><?php Display::display_icon('user_subscribe_session.png', get_lang('SubscribeUsersToSession'),'','22'); ?></a>
<a href="add_courses_to_session.php?page=session_list.php&id_session=<?php echo $enreg['id']; ?>"><?php Display::display_icon('courses_to_session.png', get_lang('SubscribeCoursesToSession'),'','22'); ?></a>
<a href="resume_session.php?id_session=<?php echo $enreg['id']; ?>"><?php Display::display_icon('edit.gif', get_lang('Edit')); ?></a>
<a href="<?php echo api_get_self(); ?>?sort=<?php echo $sort; ?>&action=delete&idChecked=<?php echo $enreg['id']; ?>" onclick="javascript:if(!confirm('<?php echo get_lang('ConfirmYourChoice'); ?>')) return false;"><?php Display::display_icon('delete.gif', get_lang('Delete')); ?></a>
<a href="<?php echo api_get_self(); ?>?sort=<?php echo $sort; ?>&action=copy&idChecked=<?php echo $enreg['id'];?>" onclick="javascript:if(!confirm('<?php echo get_lang('ConfirmYourChoice'); ?>')) return false;"><?php Display::display_icon('copy.gif', get_lang('Copy')); ?></a>

@ -600,9 +600,9 @@ function get_courses_list_by_user_id_based_in_exercises($user_id) {
Display::display_header(get_lang('MoveUserStats'));
echo '<h1>'.get_lang('MoveUserStats').'</h1>';
echo '<div class="actions">';
echo '<a href="../admin/index.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'','32').'</a>';
echo '</div>';
echo Display::display_normal_message(get_lang('CompareUserResultsBetweenCoursesAndCoursesInASession'),false);

@ -24,13 +24,13 @@ $htmlHeadXtra[] = api_get_jquery_ui_js(true);
$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
$action = $_GET['action'];
if ($action == 'add') {
$interbreadcrumb[]=array('url' => 'usergroups.php','name' => get_lang('Groups'));
$interbreadcrumb[]=array('url' => 'usergroups.php','name' => get_lang('Classes'));
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Add'));
} elseif ($action == 'edit') {
$interbreadcrumb[]=array('url' => 'usergroups.php','name' => get_lang('Groups'));
$interbreadcrumb[]=array('url' => 'usergroups.php','name' => get_lang('Classes'));
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Edit'));
} else {
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Groups'));
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Classes'));
}
// The header.
@ -86,7 +86,7 @@ $(function() {
</script>
<?php
// Tool introduction
Display::display_introduction_section(get_lang('Groups'));
Display::display_introduction_section(get_lang('Classes'));
$usergroup = new UserGroup();
@ -125,7 +125,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'add') {
$usergroup->display();
} else {
echo '<div class="actions">';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png').' '.get_lang('Back').'</a>';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
echo '</div>';
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');
@ -164,7 +164,7 @@ elseif (isset($_GET['action']) && $_GET['action'] == 'edit' && is_numeric($_GET[
$usergroup->display();
} else {
echo '<div class="actions">';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png').' '.get_lang('Back').'</a>';
echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
echo '</div>';
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');

@ -87,12 +87,12 @@ function display_form() {
$sessions = SessionManager::get_sessions_list();
// Actions
$html .= '<div class="sectiontitle">';
$html .= '<div class="actions">';
// Link back to the documents overview
$html .= '<a href="../admin/index.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), array('style' => 'vertical-align:middle')).get_lang('BackTo').' '.get_lang('PlatformAdmin').'</a>';
$html .= '<a href="../admin/index.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'','32').'</a>';
$html .= '</div>';
$html .= '<div class="row"><div class="form_header">'.get_lang('CopyCourse').'</div></div>';
//$html .= '<div class="row"><div class="form_header">'.get_lang('CopyCourse').'</div></div>';
$html .= '<form name="formulaire" method="post" action="'.api_get_self().'" >';
$html .= '<table border="0" cellpadding="5" cellspacing="0" width="100%" align="center">';

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -199,6 +199,18 @@ blocks nuvola
social_network nuvola
create_group_social_network modif nuvola
add_user_fields modif nuvola
--
new_course modif nuvola
new_session modif nuvola
course_request_pending modif nuvola
session_to_category modif nuvola
new_promotion modif nuvola
promotion modif nuvola
new_career modif gnome
career gnome
session_to_promotion modif nuvola
courses_to_session modif nuvola
--julio
star
star_green

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

@ -52,8 +52,8 @@ class Career extends Model {
public function display() {
// action links
echo '<div class="actions" style="margin-bottom:20px">';
echo '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back')).get_lang('Back').'</a>';
echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('filenew.gif',get_lang('Add')).get_lang('Add').'</a>';
echo '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('new_career.png',get_lang('Add'),'','32').'</a>';
echo '</div>';
echo Display::grid_html('careers');
}

@ -42,9 +42,9 @@ class Promotion extends Model {
function display() {
// action links
echo '<div class="actions" style="margin-bottom:20px">';
echo '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back')).get_lang('Back').'</a>';
echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('filenew.gif',get_lang('Add')).get_lang('Add').'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_add.php">'.Display::return_icon('view_more_stats.gif',get_lang('AddSession')).get_lang('AddSession').'</a>';
echo '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('new_promotion.png',get_lang('Add'),'','32').'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_add.php">'.Display::return_icon('new_session.png',get_lang('AddSession'),'','32').'</a>';
echo '</div>';
echo Display::grid_html('promotions');
}

@ -26,8 +26,9 @@ class UserGroup extends Model {
*/
function display() {
// action links
echo '<div class="actions" style="margin-bottom:20px">';
//echo '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back')).get_lang('Back').'</a>';
echo '<div class="actions">';
echo '<a href="../admin/index.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'','32').'</a>';
//echo '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back')).get_lang('Back').'</a>';
echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('filenew.gif',get_lang('Add')).get_lang('Add').'</a>';
echo '</div>';
echo Display::grid_html('usergroups');

Loading…
Cancel
Save