Replacing WEB_LIBRARY_PATH to WEB_LIBRARY_JS_PATH see #6903

The idea is to move the javascript folder inside the web/ChamiloLMS/js
folder that is not parsed by the Silex controller.
1.10.x
Julio Montoya 11 years ago
parent e1f077ae15
commit f2242a68ec
  1. 159
      main/admin/calendar_tbl_change.js
  2. 3
      main/admin/calendar_view.php
  3. 4
      main/admin/ldap_import_students.php
  4. 6
      main/admin/ldap_import_students_to_session.php
  5. 5
      main/admin/session_category_edit.php
  6. 5
      main/admin/skills_profile.php
  7. 5
      main/admin/skills_wheel.php
  8. 3
      main/admin/sub_language.php
  9. 4
      main/admin/subscribe_user2course.php
  10. 2
      main/admin/user_add.php
  11. 2
      main/admin/user_edit.php
  12. 4
      main/admin/user_list.php
  13. 14
      main/admin/user_move_stats.php
  14. 6
      main/auth/profile.php
  15. 4
      main/blog/blog.php
  16. 1
      main/blog/calendar.php
  17. 3
      main/calendar/agenda.php
  18. 4
      main/calendar/agenda_js.php
  19. 3
      main/calendar/calendar.php
  20. 2
      main/course_home/vertical_activity.php
  21. 2
      main/course_progress/index.php
  22. 4
      main/coursecopy/classes/CourseSelectForm.class.php
  23. 5
      main/document/create_audio.php
  24. 2
      main/document/document.php
  25. 2
      main/document/document_lite.php
  26. 2
      main/document/document_quota.php
  27. 20
      main/document/edit_odf.php
  28. 32
      main/document/showinframes.php
  29. 12
      main/document/showinframesmin.php
  30. 4
      main/document/webcam_clip.php
  31. 2
      main/exercice/admin.php
  32. 2
      main/exercice/exercice.php
  33. 2
      main/exercice/exercise_admin.php
  34. 4
      main/exercice/exercise_reminder.php
  35. 4
      main/exercice/exercise_submit.php
  36. 4
      main/exercice/overview.php
  37. 3
      main/exercice/tests_category.php
  38. 53
      main/gradebook/gradebook_add_cat.php
  39. 61
      main/gradebook/gradebook_edit_cat.php
  40. 130
      main/gradebook/index.php
  41. 4
      main/inc/ajax/nanogong.ajax.php
  42. 47
      main/inc/lib/api.lib.php
  43. 4
      main/inc/lib/display.lib.php
  44. 4
      main/inc/lib/document.lib.php
  45. 1
      main/inc/lib/formvalidator/Element/calendar_popup.php
  46. 6
      main/inc/lib/formvalidator/FormValidator.class.php
  47. 12
      main/inc/lib/nanogong.lib.php
  48. 32
      main/inc/lib/search/search_widget.php
  49. 45
      main/inc/lib/template.lib.php
  50. 3
      main/messages/new_message.php
  51. 6
      main/newscorm/lp_controller.php
  52. 4
      main/newscorm/lp_impress.php
  53. 2
      main/newscorm/scorm_api.php
  54. 14
      main/reports/index.php
  55. 20
      main/reports/reports.php
  56. 3
      main/session/session_add.php
  57. 19
      main/social/invitations.php
  58. 8
      main/social/profile.php
  59. 5
      main/social/skills_wheel.php
  60. 4
      main/template/default/auth/login.tpl
  61. 3
      main/template/default/exercise/question_pool.tpl
  62. 8
      main/template/default/layout/footer.tpl
  63. 2
      main/template/default/layout/page_body.tpl
  64. 18
      main/template/default/learnpath/lp_js.tpl
  65. 2
      main/template/default/learnpath/record_voice.tpl
  66. 8
      main/template/jquery_mobile/learnpath/impress.tpl
  67. 2
      main/timeline/view.php
  68. 1
      main/upload/index.php
  69. 3
      main/upload/upload_ppt.php
  70. 1
      main/upload/upload_word.php
  71. 2
      src/ChamiloLMS/Component/Editor/CkEditor/CkEditor.php
  72. 2
      src/ChamiloLMS/Component/Editor/TinyMce/TinyMce.php
  73. 2
      src/ChamiloLMS/Controller/Admin/Administrator/BranchController.php
  74. 6
      src/ChamiloLMS/Controller/Admin/Administrator/JuryController.php
  75. 22
      src/ChamiloLMS/Controller/Admin/QuestionManager/QuestionManagerController.php
  76. 6
      src/ChamiloLMS/Controller/ExerciseController.php
  77. 4
      src/ChamiloLMS/Controller/IndexController.php
  78. 19
      src/ChamiloLMS/Resources/config/prod.php

@ -1,159 +0,0 @@
var day;
var month;
var year;
var hour;
var minute;
var second;
var clock_set = 0;
/**
* Opens calendar window.
*
* @param string form name
* @param string field name
*/
function openCalendar(form, field) {
window.open("./calendar_view.php", "calendar", "width=260,height=250,status=no");
day = eval("document." + form + "." + field + "day.options["+ "document." + form + "." + field + "day.selectedIndex].value");
month = eval("document." + form + "." + field + "month.options["+ "document." + form + "." + field + "month.selectedIndex].value");
month = month-1;
year = eval("document." + form + "." + field + "year.options["+ "document." + form + "." + field + "year.selectedIndex].value");
formName = form;
fieldName =field;
}
/**
* Formats number to two digits.
*
* @param int number to format.
*/
function formatNum2(i, valtype) {
f = (i < 10 ? '0' : '') + i;
if (valtype && valtype != '') {
switch(valtype) {
case 'month':
f = (f > 12 ? 12 : f);
break;
case 'day':
f = (f > 31 ? 31 : f);
break;
}
}
return f;
}
/**
* Formats number to four digits.
*
* @param int number to format.
*/
function formatNum4(i) {
return (i < 1000 ? i < 100 ? i < 10 ? '000' : '00' : '0' : '') + i;
}
/**
* Initializes calendar window.
*/
function initCalendar() {
if (!year && !month && !day) {
day = window.opener.day;
month = window.opener.month;
year = window.opener.year;
if (isNaN(year) || isNaN(month) || isNaN(day) || day == 0) {
dt = new Date();
year = dt.getFullYear();
month = dt.getMonth();
day = dt.getDate();
}
} else {
/* Moving in calendar */
if (month > 11) {
month = 0;
year++;
}
if (month < 0) {
month = 11;
year--;
}
}
if (document.getElementById) {
cnt = document.getElementById("calendar_data");
} else if (document.all) {
cnt = document.all["calendar_data"];
}
cnt.innerHTML = "";
str = ""
//heading table
str += '<table class="data_table"><tr><th class="monthyear" width="50%">';
str += '<a href="javascript:month--; initCalendar();">&laquo;</a> ';
str += month_names[month];
str += ' <a href="javascript:month++; initCalendar();">&raquo;</a>';
str += '</th><th class="monthyear" width="50%">';
str += '<a href="javascript:year--; initCalendar();">&laquo;</a> ';
str += year;
str += ' <a href="javascript:year++; initCalendar();">&raquo;</a>';
str += '</th></tr></table>';
str += '<table class="data_table"><tr>';
for (i = 0; i < 7; i++) {
str += "<td class='weekdays'>" + day_names[i] + "</td>";
}
str += "</tr>";
var firstDay = new Date(year, month, 1).getDay();
var lastDay = new Date(year, month + 1, 0).getDate();
str += "<tr>";
dayInWeek = 0;
for (i = 0; i < firstDay; i++) {
str += "<td>&nbsp;</td>";
dayInWeek++;
}
for (i = 1; i <= lastDay; i++) {
if (dayInWeek == 7) {
str += "</tr><tr>";
dayInWeek = 0;
}
dispmonth = 1 + month;
actVal = formatNum4(year) + "-" + formatNum2(dispmonth, 'month') + "-" + formatNum2(i, 'day');
if (i == day) {
style = ' class="selected"';
} else {
style = '';
}
str += "<td" + style + "><a href=\"javascript:returnDate(" + i +","+month+","+year + ");\">" + i + "</a></td>"
dayInWeek++;
}
for (i = dayInWeek; i < 7; i++) {
str += "<td>&nbsp;</td>";
}
str += "</tr></table>";
cnt.innerHTML = str;
}
/**
* Returns date from calendar.
*
* @param string date text
*/
function returnDate(d,m,y) {
cmd = "window.opener.document."+window.opener.formName+"."+window.opener.fieldName+"day.selectedIndex = "+(d-1);
eval(cmd);
cmd = "window.opener.document."+window.opener.formName+"."+window.opener.fieldName+"month.selectedIndex = "+m;
eval(cmd);
date = new Date();
year = date.getFullYear()-1;
cmd = "window.opener.document."+window.opener.formName+"."+window.opener.fieldName+"year.selectedIndex = "+(y-year);
eval(cmd);
window.close();
}

@ -90,9 +90,6 @@ table.calendar .monthyear a:hover
background-color: #ffff00;
}
</style>
<script src=<?php echo api_get_path(WEB_LIBRARY_PATH).'javascript/calendar/calendar_tbl_change.js'; ?>" type="text/javascript" ></script>
<script type="text/javascript">
/* added 2004-06-10 by Michael Keck
* we need this for Backwards-Compatibility and resolving problems

@ -28,7 +28,7 @@ $tool_name = get_lang('LDAPImport');
// setting breadcrumbs
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
$htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
$htmlHeadXtra[] = '<script>
var buttoncheck = 1;
function checkAll() {
//var boxes = document.form.elements[\'checkboxes[]\'];
@ -316,4 +316,4 @@ elseif (!empty($annee) && !empty($course) && empty($_POST['confirmed'])) {
echo '<a href="ldap_import_students.php?annee=&composante=&etape=">'.get_lang('BackToNewSearch').'</a>';
echo '<br /><br />';
}
Display::display_footer();
Display::display_footer();

@ -28,7 +28,7 @@ $tool_name = get_lang('LDAPImport');
// setting breadcrumbs
$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
$htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
$htmlHeadXtra[] = '<script>
var buttoncheck = 1;
function checkAll() {
//var boxes = document.form.elements[\'checkboxes[]\'];
@ -76,8 +76,8 @@ elseif(!empty($annee) && empty($id_session))
echo Display::return_icon('course.gif', get_lang('SelectSessionToImportUsersTo')).' '.get_lang('SelectSessionToImportUsersTo').'<br />';
echo '<form method="post" action="'.api_get_self().'?annee='.Security::remove_XSS($annee).'"><br />';
echo '<select name="id_session">';
$sessions = SessionManager::get_sessions_list();
$sessions = SessionManager::get_sessions_list();
foreach ($sessions as $row) {
echo '<option value="'.$row['id'].'">'.api_htmlentities($row['name'], ENT_COMPAT, api_get_system_encoding()).' ('.api_get_local_time($row['access_start_date']).' - '.api_get_local_time($row['access_end_date']).')</option>';
}

@ -220,11 +220,9 @@ for($i=$thisYear-5;$i <= ($thisYear+5);$i++)
</td>
</tr>
</table>
</form>
<script type="text/javascript">
<script>
<?php if($year_start=="0000") echo "setDisable(document.form.nolimit);\r\n"; ?>
function setDisable(select){
document.form.day_start.disabled = (select.checked) ? true : false;
@ -237,4 +235,3 @@ function setDisable(select){
</script>
<?php
Display::display_footer();
?>

@ -19,9 +19,6 @@ if (api_get_setting('allow_skills_tool') != 'true') {
api_not_allowed();
}
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$interbreadcrumb[] = array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
$skill = new Skill();
@ -156,4 +153,4 @@ $tpl->assign('url', $url);
$content = $tpl->fetch('default/skill/profile.tpl');
$tpl->assign('content', $content);
$tpl->display_one_col_template();
$tpl->display_one_col_template();

@ -24,9 +24,6 @@ $htmlHeadXtra[] = api_get_js('d3/d3.v2.min.js');
$htmlHeadXtra[] = api_get_js('d3/colorbrewer.js');
$htmlHeadXtra[] = api_get_js('d3/jquery.xcolor.js');
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$tpl = $app['template'];
$load_user = 0;
@ -49,4 +46,4 @@ $tpl->assign('url', $url);
$content = $tpl->fetch('default/skill/skill_wheel.tpl');
$tpl->assign('content', $content);
$tpl->display_no_layout_template();
$tpl->display_no_layout_template();

@ -33,9 +33,6 @@ $htmlHeadXtra[] ='<script type="text/javascript">
if (is_new_language.length>0 && is_new_language!="_" && file_id!="" && button_name!="") {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("#div_message_information_id").html("<div class=\"normal-message\"><img src=\'../inc/lib/javascript/indicator.gif\' /></div>");
},
type: "POST",
url: "../admin/sub_language_ajax.inc.php",
data: "new_language="+is_new_language+"&variable_language="+is_variable_language+"&file_id="+file_id+"&id="+'.intval($_REQUEST['id']).'+"&sub="+'.intval($_REQUEST['sub_language_id']).',

@ -37,8 +37,8 @@ $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAd
$htmlHeadXtra[] = '
<script type="text/javascript">
function validate_filter() {
document.formulaire.form_sent.value=0;
document.formulaire.submit();
document.formulaire.form_sent.value=0;
document.formulaire.submit();
}
</script>';

@ -10,8 +10,6 @@ api_protect_admin_script(true);
$message = null;
$htmlHeadXtra[] = api_get_password_checker_js('#username', '#password');
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
if (isset($_configuration['allow_strength_pass_checker']) && $_configuration['allow_strength_pass_checker']) {
$htmlHeadXtra[] = '
<script>

@ -10,8 +10,6 @@ api_protect_super_admin($user_id, null, true);
$is_platform_admin = api_is_platform_admin() ? 1 : 0;
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$htmlHeadXtra[] = '<script>
var is_platform_id = "'.$is_platform_admin.'";

@ -26,8 +26,6 @@ $htmlHeadXtra[] = '<script>
function load_course_list (div_course,my_user_id) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("div#"+div_course).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
type: "POST",
url: "'.$url.'",
data: "user_id="+my_user_id,
@ -41,8 +39,6 @@ function load_course_list (div_course,my_user_id) {
function load_session_list (div_session,my_user_id) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("div#"+div_session).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
type: "POST",
url: "'.$urlSession.'",
data: "user_id="+my_user_id,

@ -557,8 +557,6 @@ $htmlHeadXtra[] = '<script type="text/javascript">
var session_id = document.getElementById(unique_id).options[document.getElementById(unique_id).selectedIndex].value;
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("div#reponse_"+unique_id).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
type: "POST",
url: "user_move_stats.php",
data: "load_ajax=1"+"&unique_id="+unique_id+"&user_id="+user_id+"&session_id="+session_id,
@ -570,18 +568,6 @@ $htmlHeadXtra[] = '<script type="text/javascript">
function view_stat (unique_id, user_id) {
var session_id = document.getElementById(unique_id).options[document.getElementById(unique_id).selectedIndex].value;
load_thick("user_move_stats.php?load_ajax=1&view_stat=1"+"&unique_id="+unique_id+"&user_id="+user_id+"&session_id="+session_id,"");
/*
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("div#reponse_"+unique_id).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
type: "POST",
url: "user_move_stats.php",
data: "load_ajax=1&view_stat=1"+"&unique_id="+unique_id+"&user_id="+user_id+"&session_id="+session_id,
success: function(datos) {
$("div#reponse_"+unique_id).html(datos);
}
});*/
}

@ -34,9 +34,6 @@ if (!(isset($_user['user_id']) && $_user['user_id']) || api_is_anonymous($_user[
api_not_allowed(true);
}
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$htmlHeadXtra[] = '<script>
function confirmation(name) {
if (confirm("'.get_lang('AreYouSureToDelete', '').' " + name + " ?")) {
@ -49,13 +46,10 @@ function show_image(image,width,height) {
width = parseInt(width) + 20;
height = parseInt(height) + 20;
window_x = window.open(image,\'windowX\',\'width=\'+ width + \', height=\'+ height + \'\');
}
function generate_open_id_form() {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
/*$("#div_api_key").html("Loading...");*/ },
type: "POST",
url: "'.api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=generate_api_key",
data: "num_key_id="+"",

@ -180,9 +180,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'view_post') {
/*
DISPLAY
*/
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/calendar/tbl_change.js"></script>';
switch ($current_page){
switch ($current_page) {
case 'new_post' :
$nameTools = get_lang('NewPost');
$interbreadcrumb[] = array ('url' => "blog.php?blog_id=$blog_id", "name" => Blog :: get_blog_title($blog_id));

@ -110,7 +110,6 @@ table.calendar .monthyear a:hover
} // end if
//-->
</script>
<script src="<?php echo api_get_path(WEB_LIBRARY_PATH).'javascript/calendar/tbl_change.js'; ?>"></script>
<script type="text/javascript">
<!--
var month_names = new Array(

@ -75,9 +75,6 @@ $group_id = api_get_group_id();
$htmlHeadXtra[] = to_javascript();
$htmlHeadXtra[] = user_group_filter_javascript();
// this loads the javascript that is needed for the date popup selection
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/calendar/tbl_change.js" type="text/javascript" ></script>';
// setting the name of the tool
$nameTools = get_lang('Agenda'); // language variable in trad4all.inc.php
// showing the header if we are not in the learning path, if we are in

@ -32,8 +32,8 @@ $htmlHeadXtra[] = api_get_jquery_libraries_js(array('jquery-ui','jquery-ui-i18n'
$htmlHeadXtra[] = api_get_js('qtip2/jquery.qtip.min.js');
$htmlHeadXtra[] = api_get_js('fullcalendar/fullcalendar.min.js');
$htmlHeadXtra[] = api_get_js('fullcalendar/gcal.js');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/fullcalendar/fullcalendar.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/qtip2/jquery.qtip.min.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'fullcalendar/fullcalendar.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'qtip2/jquery.qtip.min.css');
if (api_is_platform_admin() && $type == 'admin') {
$type = 'admin';

@ -95,8 +95,7 @@ table.calendar td
} // end if
/* ]]> */
</script>
<script src="<?php echo api_get_path(WEB_LIBRARY_PATH).'javascript/calendar/tbl_change.js'; ?>"></script>
<script type="text/javascript">
<script>
/* <![CDATA[ */
var month_names = new Array(
<?php

@ -58,9 +58,7 @@ if (api_is_platform_admin()) {
if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
$content .= '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;">
<div class="normal-message" id="id_normal_message" style="display:none">';
$content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/>&nbsp;&nbsp;';
$content .= get_lang('PleaseStandBy');
$content .= '</div>
<div class="confirmation-message" id="id_confirmation_message" style="display:none"></div></div>';
$content .= '<div id="activity-3col">';

@ -189,7 +189,6 @@ function datetime_by_attendance(attendance_id, thematic_advance_id) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {},
type: "GET",
url: "'.api_get_path(WEB_AJAX_PATH).'thematic.ajax.php?a=get_datetime_by_attendance",
data: "attendance_id="+attendance_id+"&thematic_advance_id="+thematic_advance_id,
@ -205,7 +204,6 @@ function datetime_by_attendance(attendance_id, thematic_advance_id) {
function update_done_thematic_advance(selected_value) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {},
type: "GET",
url: "'.api_get_path(WEB_AJAX_PATH).'thematic.ajax.php?a=update_done_thematic_advance",
data: "thematic_advance_id="+selected_value,

@ -141,7 +141,6 @@ class CourseSelectForm
echo get_lang('DestinationCourse').' : '.$course_infos['title'];
echo '</h3>';
}
echo '<script src="'.api_get_path(WEB_CODE_PATH).'inc/lib/javascript/upload.js" type="text/javascript"></script>';
echo '<script type="text/javascript">var myUpload = new upload(1000);</script>';
echo '<form method="post" id="upload_form" name="course_select_form" onsubmit="javascript: myUpload.start(\'dynamic_div\',\''.api_get_path(WEB_CODE_PATH).'img/progress_bar.gif\',\''.get_lang('PleaseStandBy', '').'\',\'upload_form\')">';
echo '<input type="hidden" name="action" value="course_select_form"/>';
@ -571,7 +570,6 @@ class CourseSelectForm
echo '</h3>';
}
echo '<script src="'.api_get_path(WEB_CODE_PATH).'inc/lib/javascript/upload.js" type="text/javascript"></script>';
echo '<script type="text/javascript">var myUpload = new upload(1000);</script>';
echo '<form method="post" id="upload_form" name="course_select_form" onsubmit="myUpload.start(\'dynamic_div\',\''.api_get_path(WEB_CODE_PATH).'img/progress_bar.gif\',\''.get_lang('PleaseStandBy').'\',\'upload_form\')">';
echo '<input type="hidden" name="action" value="course_select_form"/>';
@ -618,4 +616,4 @@ class CourseSelectForm
echo '</form>';
echo '<div id="dynamic_div" style="display:block;margin-left:40%;margin-top:10px;height:50px;"></div>';
}
}
}

@ -41,9 +41,6 @@ if (empty($document_data)) {
}
$document_id = $document_data['id'];
$dir = $document_data['path'];
//jquery textareaCounter
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/textareacounter/jquery.textareaCounter.plugin.js" type="text/javascript"></script>';
$is_allowed_to_edit = api_is_allowed_to_edit(null, true);
// Please, do not modify this dirname formatting
@ -725,4 +722,4 @@ function downloadMP3_pediaphon($filepath, $dir)
Display::display_confirmation_message(get_lang('DocumentCreated'));
//return to location
echo '<script>window.location.href="'.$location.'"</script>';
}
}

@ -526,7 +526,7 @@ if (isset($_GET['createdir'])) {
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateDir'));
}
$js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/';
$js_path = api_get_path(WEB_LIBRARY_JS_PATH);
$htmlHeadXtra[] = '<link rel="stylesheet" href="'.$js_path.'jquery-jplayer/skins/chamilo/jplayer.blue.monday.css" type="text/css">';
$htmlHeadXtra[] = '<script type="text/javascript" src="'.$js_path.'jquery-jplayer/jquery.jplayer.min.js"></script>';

@ -266,7 +266,7 @@ if (empty($document_data['parents'])) {
if (isset($_GET['createdir'])) {
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateDir'));
}
$js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/';
$js_path = api_get_path(WEB_LIBRARY_JS_PATH);
$htmlHeadXtra[] = '<link rel="stylesheet" href="'.$js_path.'jquery-jplayer/skins/chamilo/jplayer.blue.monday.css" type="text/css">';
$htmlHeadXtra[] = '<script type="text/javascript" src="'.$js_path.'jquery-jplayer/jquery.jplayer.min.js"></script>';
$mediaplayer_path = api_get_path(WEB_LIBRARY_PATH).'mediaplayer/player.swf';

@ -26,7 +26,7 @@ $interbreadcrumb[] = array('url' => 'document.php', 'name' => get_lang('Document
$htmlHeadXtra[] = api_get_js('jqplot/jquery.jqplot.min.js');
$htmlHeadXtra[] = api_get_js('jqplot/plugins/jqplot.pieRenderer.min.js');
$htmlHeadXtra[] = api_get_js('jqplot/plugins/jqplot.donutRenderer.min.js');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/jqplot/jquery.jqplot.min.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'jqplot/jquery.jqplot.min.css');
$course_code = api_get_course_id();
$course_id = api_get_course_int_id();

@ -14,7 +14,7 @@ $document_id = $_GET['id'];
if ($document_id) {
$document_data = DocumentManager::get_document_data_by_id($document_id);
if (empty($document_data)) {
api_not_allowed();
api_not_allowed();
}
} else {
api_not_allowed();
@ -42,18 +42,18 @@ $file_url_web = api_get_path(WEB_COURSE_PATH).$_course['path'].'/document'.$head
if ($show_web_odf) {
$htmlHeadXtra[] = api_get_js('webodf/webodf.js');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/webodf/webodf.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'webodf/webodf.css');
$htmlHeadXtra[] = '
<script type="text/javascript" charset="utf-8">
<script type="text/javascript" charset="utf-8">
function init() {
var odfelement = document.getElementById("odf"),
odfcanvas = new odf.OdfCanvas(odfelement);
odfcanvas.load("'.$file_url_web.'");
var odfelement = document.getElementById("odf"),
odfcanvas = new odf.OdfCanvas(odfelement);
odfcanvas.load("'.$file_url_web.'");
}
$(document).ready(function() {
$(document).ready(function() {
window.setTimeout(init, 0);
});
</script>';
});
</script>';
}
$interbreadcrumb[]=array("url"=>"./document.php?curdirpath=".urlencode($my_cur_dir_path).$req_gid, "name"=> get_lang('Documents'));
@ -61,7 +61,7 @@ $interbreadcrumb[]=array("url"=>"./document.php?curdirpath=".urlencode($my_cur_d
// Interbreadcrumb for the current directory root path
if (empty($document_data['parents'])) {
$interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
} else {
} else {
foreach($document_data['parents'] as $document_sub_data) {
if ($document_data['title'] == $document_sub_data['title']) {
continue;

@ -142,7 +142,7 @@ $frameheight = 135;
if (api_is_course_admin()) {
$frameheight = 165;
}
$mathJaxUrl = api_get_path(WEB_LIBRARY_PATH).'javascript/math_jax/MathJax.js?config=default';
$mathJaxUrl = api_get_path(WEB_LIBRARY_JS_PATH).'math_jax/MathJax.js?config=default';
$js_glossary_in_documents = '';
if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
@ -151,8 +151,8 @@ if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
// $("<div>I am a div courses</div>").prependTo("body");
}, "top.mainFrame",
{ load: [
{type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js"},
{type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"},
{type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.js"},
{type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.highlight.js"},
{type:"script", id:"_fr3", src:"'.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/plugins/glossary/fck_glossary_manual.js"},
{type:"script", id:"_fr4", src:"'.$mathJaxUrl.'"}
]
@ -164,10 +164,10 @@ if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
// $("<div>I am a div courses</div>").prependTo("body");
}, "top.mainFrame",
{ load: [
{type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js"},
{type:"script", id:"_fr4", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-ui/smoothness/jquery-ui-1.8.21.custom.min.js"},
{type:"stylesheet", id:"_fr5", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-ui/smoothness/jquery-ui-1.8.21.custom.css"},
{type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"},
{type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.js"},
{type:"script", id:"_fr4", src:"'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery-ui/smoothness/jquery-ui-1.8.21.custom.min.js"},
{type:"stylesheet", id:"_fr5", src:"'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery-ui/smoothness/jquery-ui-1.8.21.custom.css"},
{type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.highlight.js"},
{type:"script", id:"_fr3", src:"'.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/plugins/glossary/fck_glossary_automatic.js"},
{type:"script", id:"_fr6", src:"'.$mathJaxUrl.'"}
]
@ -180,7 +180,7 @@ $js_glossary_in_documents = '
}, "top.mainFrame",
{
load: [
{type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js"},
{type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.js"},
{type:"script", id:"_fr2", src:"'.$mathJaxUrl.'"}
]
}
@ -194,7 +194,7 @@ $htmlHeadXtra[] = api_get_js('math_jax/MathJax.js?config=TeX-AMS-MML_HTMLorMML')
if (in_array(strtolower($pathinfo['extension']), $web_odf_supported_files)) {
$show_web_odf = true;
$htmlHeadXtra[] = api_get_js('webodf/webodf.js');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/webodf/webodf.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'webodf/webodf.css');
$htmlHeadXtra[] = '
<script charset="utf-8">
function init() {
@ -207,14 +207,10 @@ if (in_array(strtolower($pathinfo['extension']), $web_odf_supported_files)) {
});
</script>';
}
$execute_iframe = true;
if ($jplayer_supported) {
$extension = api_strtolower($pathinfo['extension']);
$js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/';
$js_path = api_get_path(WEB_LIBRARY_JS_PATH);
$htmlHeadXtra[] = '<link rel="stylesheet" href="'.$js_path.'jquery-jplayer/skins/blue/jplayer.blue.monday.css" type="text/css">';
$htmlHeadXtra[] = '<script type="text/javascript" src="'.$js_path.'jquery-jplayer/jquery.jplayer.min.js"></script>';
@ -261,10 +257,10 @@ if (!$jplayer_supported && $execute_iframe) {
$htmlHeadXtra[] = '<script type="text/javascript">
<!--
var jQueryFrameReadyConfigPath = \''.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js\';
var jQueryFrameReadyConfigPath = \''.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.js\';
-->
</script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.frameready.js"></script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.frameready.js"></script>';
$htmlHeadXtra[] = '<script>
<!--
var updateContentHeight = function() {
@ -411,14 +407,14 @@ if ($is_nanogong_available) {
//get file from tmp directory
$to_url = api_get_path(WEB_ARCHIVE_PATH).'temp/audio/'.$file_crip;
echo '<div align="center">';
echo '<a class="btn" href="'.$file_url_web.'" target="_blank">'.get_lang('Download').'</a>';
echo '<br/>';
echo '<br/>';
echo DocumentManager::readNanogongFile($to_url);
//erase temp file in tmp directory when return to documents
$_SESSION['temp_audio_nanogong']=$to_sys;
echo '</div>';

@ -81,8 +81,8 @@ if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
// $("<div>I am a div courses</div>").prependTo("body");
}, "mainFrame",
{ load: [
{type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js"},
{type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"},
{type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.js"},
{type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.highlight.js"},
{type:"script", id:"_fr3", src:"'.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/plugins/glossary/fck_glossary_manual.js"}
]
}
@ -95,8 +95,8 @@ if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
}, "mainFrame",
{ load: [
{type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js"},
{type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"},
{type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.js"},
{type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.highlight.js"},
{type:"script", id:"_fr3", src:"'.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/plugins/glossary/fck_glossary_automatic.js"}
]
}
@ -106,10 +106,10 @@ if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
$htmlHeadXtra[] = '<script type="text/javascript">
<!--
var jQueryFrameReadyConfigPath = \''.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js\';
var jQueryFrameReadyConfigPath = \''.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.js\';
-->
</script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.frameready.js"></script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.frameready.js"></script>';
$htmlHeadXtra[] = '
<script type="text/javascript">
<!--

@ -145,7 +145,7 @@ echo '</div>';
<script language="JavaScript">
var clip_filename='video_clip.jpg';
//var clip_filename='<?php //echo date('YmdHis') . '.jpg'; ?>';
webcam.set_swf_url ( '<?php echo api_get_path(WEB_LIBRARY_PATH); ?>jpegcam//webcam.swf?blackboard.png' );
webcam.set_swf_url ( '<?php echo api_get_path(WEB_LIBRARY_PATH); ?>jpegcam/webcam.swf?blackboard.png' );
webcam.set_shutter_sound( true,'<?php echo api_get_path(WEB_LIBRARY_PATH); ?>jpegcam/shutter.mp3' ); // true play shutter click sound
webcam.set_quality( 90 ); // JPEG quality (1 - 100)
webcam.set_api_url( '<?php echo api_get_path(WEB_LIBRARY_PATH); ?>jpegcam/webcam_receiver.php?webcamname='+escape(clip_filename)+'&webcamdir=<?php echo $webcamdir; ?>&webcamuserid=<?php echo $webcamuserid; ?>' );
@ -242,4 +242,4 @@ echo '</div>';
<?php
Display :: display_footer();
Display :: display_footer();

@ -348,8 +348,6 @@ $(function() {
</script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_CODE_PATH).'plugin/hotspot/JavaScriptFlashGateway.js"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_CODE_PATH).'plugin/hotspot/hotspot.js"></script>';
$htmlHeadXtra[] = "<script>

@ -28,7 +28,7 @@ require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be.inc.php';
$this_section = SECTION_COURSES;
$htmlHeadXtra[] = api_get_js('qtip2/jquery.qtip.min.js');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/qtip2/jquery.qtip.min.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'qtip2/jquery.qtip.min.css');
// Access control
api_protect_course_script(true);

@ -26,8 +26,6 @@ if (!api_is_allowed_to_edit(null,true)) {
$url = api_get_path(WEB_AJAX_PATH).'exercise.ajax.php?1=1';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$htmlHeadXtra[] = '<script>
function check() {
$("#category_id option:selected").each(function() {

@ -56,8 +56,8 @@ if ($objExercise->expired_time != 0 && !empty($clock_expired_time)) {
if ($time_control) {
// Get time left for expiring time
$time_left = api_strtotime($clock_expired_time,'UTC') - time();
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epiclock/stylesheet/jquery.epiclock.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epiclock/renderers/minute/epiclock.minute.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'epiclock/stylesheet/jquery.epiclock.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'epiclock/renderers/minute/epiclock.minute.css');
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.dateformat.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.epiclock.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/renderers/minute/epiclock.minute.js');

@ -59,8 +59,8 @@ if (api_get_setting('show_glossary_in_extra_tools') == 'true') {
$htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');
// This library is necessary for the time control feature
$htmlHeadXtra[]= api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epiclock/stylesheet/jquery.epiclock.css');
$htmlHeadXtra[]= api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epiclock/renderers/minute/epiclock.minute.css');
$htmlHeadXtra[]= api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'epiclock/stylesheet/jquery.epiclock.css');
$htmlHeadXtra[]= api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'epiclock/renderers/minute/epiclock.minute.css');
$htmlHeadXtra[]= api_get_js('epiclock/javascript/jquery.dateformat.min.js');
$htmlHeadXtra[]= api_get_js('epiclock/javascript/jquery.epiclock.min.js');
$htmlHeadXtra[]= api_get_js('epiclock/renderers/minute/epiclock.minute.js');

@ -59,8 +59,8 @@ if ($time_control) {
// Get time left for expiring time
$time_left = api_strtotime($clock_expired_time,'UTC') - time();
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epiclock/stylesheet/jquery.epiclock.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epiclock/renderers/minute/epiclock.minute.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'epiclock/stylesheet/jquery.epiclock.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'epiclock/renderers/minute/epiclock.minute.css');
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.dateformat.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.epiclock.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/renderers/minute/epiclock.minute.js');

@ -83,9 +83,6 @@ $htmlHeadXtra[] = '
});
</script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
// Breadcrumbs
$interbreadcrumb[] = array("url" => "exercice.php", "name" => get_lang('Exercices'));
Display::display_header(get_lang('Category'));

@ -21,9 +21,6 @@ require_once 'lib/fe/catform.class.php';
api_block_anonymous_users();
block_students();
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$htmlHeadXtra[] = '<script>
$(document).ready(function () {
$("#skills").fcbkcomplete({
@ -38,18 +35,18 @@ $(document).ready(function () {
filter_selected: true,
newel: true
});
$(".closebutton").click(function() {
var skill_id = ($(this).attr("id")).split("_")[1];
if (skill_id) {
$.ajax({
url: "'.api_get_path(WEB_AJAX_PATH).'skill.ajax.php?a=remove_skill",
var skill_id = ($(this).attr("id")).split("_")[1];
if (skill_id) {
$.ajax({
url: "'.api_get_path(WEB_AJAX_PATH).'skill.ajax.php?a=remove_skill",
data: "gradebook_id='.$edit_cat.'&skill_id="+skill_id,
success: function(return_value) {
success: function(return_value) {
if (return_value == 1 ) {
$("#skill_"+skill_id).remove();
}
}
}
});
}
});
@ -58,26 +55,26 @@ $(document).ready(function () {
function check_skills() {
//selecting only selected users
$("#skills option:selected").each(function() {
var skill_id = $(this).val();
if (skill_id != "" ) {
$.ajax({
url: "'.api_get_path(WEB_AJAX_PATH).'skill.ajax.php?a=skill_exists",
var skill_id = $(this).val();
if (skill_id != "" ) {
$.ajax({
url: "'.api_get_path(WEB_AJAX_PATH).'skill.ajax.php?a=skill_exists",
data: "skill_id="+skill_id,
success: function(return_value) {
success: function(return_value) {
if (return_value == 0 ) {
alert("'.get_lang('SkillDoesNotExist').'");
alert("'.get_lang('SkillDoesNotExist').'");
//Deleting select option tag
$("#skills option[value="+skill_id+"]").remove();
$("#skills option[value="+skill_id+"]").remove();
//Deleting holder
$(".holder li").each(function () {
if ($(this).attr("rel") == skill_id) {
$(this).remove();
}
});
}
},
});
}
});
}
},
});
}
});
}
</script>';
@ -117,10 +114,10 @@ if ($form->validate()) {
$cat->set_course_code($values['course_code']);//?
}
//Always add the gradebook to the course
$cat->set_course_code(api_get_course_id());
$cat->set_course_code(api_get_course_id());
$cat->set_skills($values['skills']);
$cat->set_description($values['description']);
$cat->set_user_id($values['hid_user_id']);
$cat->set_parent_id($values['hid_parent_id']);
@ -131,7 +128,7 @@ if ($form->validate()) {
$visible = 1;
}
$cat->set_visible($visible);
$result = $cat->add();
$result = $cat->add();
header('Location: '.Security::remove_XSS($_SESSION['gradebook_dest']).'?addcat=&selectcat=' . $cat->get_parent_id());
exit;
}
@ -147,8 +144,8 @@ $display_form = true;
/*if (!empty($grading_contents)) {
$count_items = count($grading_contents['items']);
$cats = Category :: load(null, null, $course_code, null, null, $session_id, false); //already init
$cats_count = count($cats) - 1 ;
$cats_count = count($cats) - 1 ;
if ($cats_count >= $count_items) {
Display::display_warning_message(get_lang('CheckYourGradingModelValues'));
$display_form = false;

@ -19,9 +19,6 @@ block_students();
$edit_cat = isset($_REQUEST['editcat']) ? $_REQUEST['editcat'] : '';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$htmlHeadXtra[] = '<script type="text/javascript">
$(document).ready(function() {
$("#skills").fcbkcomplete({
@ -36,18 +33,18 @@ $(document).ready(function() {
filter_selected: true,
newel: true
});
$(".closebutton").click(function() {
var skill_id = ($(this).attr("id")).split("_")[1];
if (skill_id) {
$.ajax({
url: "'.api_get_path(WEB_AJAX_PATH).'skill.ajax.php?a=remove_skill",
var skill_id = ($(this).attr("id")).split("_")[1];
if (skill_id) {
$.ajax({
url: "'.api_get_path(WEB_AJAX_PATH).'skill.ajax.php?a=remove_skill",
data: "gradebook_id='.$edit_cat.'&skill_id="+skill_id,
success: function(return_value) {
success: function(return_value) {
if (return_value == 1 ) {
$("#skill_"+skill_id).remove();
}
}
}
});
}
});
@ -56,26 +53,26 @@ $(document).ready(function() {
function check_skills() {
//selecting only selected users
$("#skills option:selected").each(function() {
var skill_id = $(this).val();
if (skill_id != "" ) {
$.ajax({
url: "'.api_get_path(WEB_AJAX_PATH).'skill.ajax.php?a=skill_exists",
var skill_id = $(this).val();
if (skill_id != "" ) {
$.ajax({
url: "'.api_get_path(WEB_AJAX_PATH).'skill.ajax.php?a=skill_exists",
data: "skill_id="+skill_id,
success: function(return_value) {
success: function(return_value) {
if (return_value == 0 ) {
alert("'.get_lang('SkillDoesNotExist').'");
alert("'.get_lang('SkillDoesNotExist').'");
//Deleting select option tag
$("#skills option[value="+skill_id+"]").remove();
$("#skills option[value="+skill_id+"]").remove();
//Deleting holder
$(".holder li").each(function () {
if ($(this).attr("rel") == skill_id) {
$(this).remove();
}
});
}
},
});
}
});
}
},
});
}
});
}
</script>';
@ -86,32 +83,32 @@ $form = new CatForm(CatForm :: TYPE_EDIT, $catedit[0], 'edit_cat_form');
if ($form->validate()) {
$values = $form->getSubmitValues();
$cat = new Category();
if (!empty($values['hid_id'])) {
$cat = $cat->load($values['hid_id']);
if (isset($cat[0])) {
$cat = $cat[0];
}
}
$cat->set_id($values['hid_id']);
$cat->set_name($values['name']);
if (empty ($values['course_code'])) {
$cat->set_course_code(null);
}else {
$cat->set_course_code($values['course_code']);
}
$cat->set_grade_model_id($values['grade_model_id']);
$cat->set_description($values['description']);
$cat->set_skills($values['skills']);
$cat->set_description($values['description']);
$cat->set_skills($values['skills']);
$cat->set_user_id($values['hid_user_id']);
$cat->set_parent_id($values['hid_parent_id']);
$cat->set_weight($values['weight']);
if ($values['hid_parent_id'] == 0 ) {
$cat->set_certificate_min_score($values['certif_min_score']);
}
@ -121,7 +118,7 @@ if ($form->validate()) {
$visible = 1;
}
$cat->set_visible($visible);
$cat->save();
$cat->save();
header('Location: '.Security::remove_XSS($_SESSION['gradebook_dest']).'?editcat=&selectcat=' . $cat->get_parent_id());
exit;
}
@ -130,4 +127,4 @@ $interbreadcrumb[] = array ('url' => Security::remove_XSS($_SESSION['gradebook_d
$this_section = SECTION_COURSES;
Display :: display_header(get_lang('EditCategory'));
$form->display();
Display :: display_footer();
Display :: display_footer();

@ -40,12 +40,12 @@ require_once api_get_path(LIBRARY_PATH).'ezpdf/class.ezpdf.php';
require_once api_get_path(LIBRARY_PATH).'gradebook.lib.php';
/*
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/jqplot/jquery.jqplot.min.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'jqplot/jquery.jqplot.min.css');
$htmlHeadXtra[] = api_get_js('jqplot/jquery.jqplot.min.js');
$htmlHeadXtra[] = api_get_js('jqplot/plugins/jqplot.donutRenderer.min.js');*/
$htmlHeadXtra[] = '<script>
var show_icon = "../img/view_more_stats.gif";
var hide_icon = "../img/view_less_stats.gif";
@ -53,28 +53,28 @@ $(document).ready(function() {
$(".view_children").live("click", function() {
var id = $(this).attr("data-cat-id");
$(".hidden_"+id).removeClass("hidden");
$(this).removeClass("view_children");
$(this).find("img").attr("src", hide_icon);
$(".hidden_"+id).removeClass("hidden");
$(this).removeClass("view_children");
$(this).find("img").attr("src", hide_icon);
$(this).attr("class", "hide_children");
});
$(".hide_children").live("click", function(event) {
var id = $(this).attr("data-cat-id");
$(".hidden_"+id).addClass("hidden");
$(".hide_children").live("click", function(event) {
var id = $(this).attr("data-cat-id");
$(".hidden_"+id).addClass("hidden");
$(this).removeClass("hide_children");
$(this).addClass("view_children");
$(this).find("img").attr("src", show_icon);
});
/*
var s1 = [["a",25]];
var s2 = [["a", 0], ["a", 10], ["a", 10], ["a", 5]];
var plot3 = $.jqplot("chart3", [s1, s2], {
var plot3 = $.jqplot("chart3", [s1, s2], {
colors: ["#000", "#fff"],
seriesDefaults: {
// make this a donut chart.
@ -88,7 +88,7 @@ $(document).ready(function() {
// By default, data labels show the percentage of the donut/pie.
// You can show the data "value" or data "label" instead.
dataLabels: "value"
}
}
});*/
@ -120,7 +120,7 @@ $filter_warning_msg = true;
///direct access to one evaluation
$cats = Category :: load(null, null, $course_code, null, null, $session_id, false); //already init
$first_time = null;
$first_time = null;
if (empty($cats)) {
$cats = Category :: load(0, null, $course_code, null, null, $session_id, false);//first time
$first_time=1;
@ -139,8 +139,8 @@ if ( (isset($_GET['selectcat']) && $_GET['selectcat']>0) && (isset($_SESSION['st
//Introduction tool: student view
Display::display_introduction_section(TOOL_GRADEBOOK, array('ToolbarSet' => 'AssessmentsIntroduction'));
$category= $_GET['selectcat'];
$category= $_GET['selectcat'];
$cats = Category :: load ($category, null, null, null, null, null, false);
$allcat= $cats[0]->get_subcategories($stud_id, $course_code, $session_id);
$alleval= $cats[0]->get_evaluations($stud_id);
@ -312,7 +312,7 @@ if (isset($_GET['deletecat'])) {
}
}
$confirmation_message = get_lang('CategoryDeleted');
$filter_confirm_msg = false;
$filter_confirm_msg = false;
}
//parameters for evaluations
if (isset ($_GET['visibleeval'])) {
@ -349,8 +349,8 @@ if (isset($_GET['lockedeval'])) {
if ($eval[0] != null) {
$eval[0]->lock($type_locked);
}
$filter_confirm_msg = false;
$filter_confirm_msg = false;
}
if (isset ($_GET['deleteeval'])) {
@ -395,11 +395,11 @@ if (isset ($_GET['deletelink'])) {
$link= LinkFactory :: load($get_delete_link);
if ($link[0] != null) {
// clean forum qualify
$sql = 'UPDATE '.$tbl_forum_thread.' SET thread_qualify_max=0,thread_weight=0,thread_title_qualify=""
$sql = 'UPDATE '.$tbl_forum_thread.' SET thread_qualify_max=0,thread_weight=0,thread_title_qualify=""
WHERE c_id = '.$course_id.' AND thread_id = (SELECT ref_id FROM '.$tbl_grade_links.' WHERE id='.$get_delete_link.' AND type = '.LINK_FORUM_THREAD.');';
Database::query($sql);
// clean attendance
$sql = 'UPDATE '.$tbl_attendance.' SET attendance_qualify_max=0, attendance_weight = 0, attendance_qualify_title=""
$sql = 'UPDATE '.$tbl_attendance.' SET attendance_qualify_max=0, attendance_weight = 0, attendance_qualify_title=""
WHERE c_id = '.$course_id.' AND id = (SELECT ref_id FROM '.$tbl_grade_links.' WHERE id='.$get_delete_link.' AND type = '.LINK_ATTENDANCE.');';
Database::query($sql);
$link[0]->delete();
@ -441,7 +441,7 @@ switch ($action) {
$category_to_lock[0]->lock_all_items(0);
$confirmation_message = get_lang('EvaluationHasBeenUnLocked');
}
break;
break;
}
//actions on the sortabletable
@ -454,7 +454,7 @@ if (isset ($_POST['action'])) {
$filter_warning_msg = false;
} else {
switch ($_POST['action']) {
case 'deleted' :
$number_of_deleted_categories= 0;
$number_of_deleted_evaluations= 0;
@ -620,8 +620,8 @@ if (empty ($_GET['selectcat'])) {
}
$simple_search_form='';
if (isset($_GET['studentoverview'])) {
//@todo this code also seems to be deprecated ...
if (isset($_GET['studentoverview'])) {
//@todo this code also seems to be deprecated ...
$cats= Category :: load($category);
$stud_id= (api_is_allowed_to_edit() ? null : $stud_id);
$allcat= array ();
@ -635,7 +635,7 @@ if (isset($_GET['studentoverview'])) {
foreach ($data_array as $data) {
$newarray[] = array_slice($data, 1);
}
$pdf= new Cezpdf();
$pdf= new Cezpdf();
$pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
$pdf->ezSetMargins(30, 30, 50, 30);
$pdf->ezSetY(810);
@ -649,15 +649,15 @@ if (isset($_GET['studentoverview'])) {
}
} else {
//Student view
//in any other case (no search, no pdf), print the available gradebooks
// Important note: loading a category will actually load the *contents* of
// this category. This means that, to show the categories of a course,
// we have to show the root category and show its subcategories that
// are inside this course. This is done at the time of calling
// $cats[0]->get_subcategories(), not at the time of doing Category::load()
// $category comes from GET['selectcat']
// $category comes from GET['selectcat']
//if $category = 0 (which happens when GET['selectcat'] is undefined)
// then Category::load() will create a new 'root' category with empty
// course and session fields in memory (Category::create_root_category())
@ -676,8 +676,8 @@ if (isset($_GET['studentoverview'])) {
$cats = Category :: load(null, null, $course_code, null, null, $session_id, false);
if (empty($cats)) {
// There is no category for this course+session, so create one
$cat= new Category();
if (!empty($session_id)) {
$cat= new Category();
if (!empty($session_id)) {
$s_name = api_get_session_name($session_id);
$cat->set_name($course_code.' - '.get_lang('Session').' '.$s_name);
$cat->set_session_id($session_id);
@ -707,7 +707,7 @@ if (isset($_GET['studentoverview'])) {
} else {
$stud_id = $stud_id;
}
$allcat = $cats[0]->get_subcategories($stud_id, $course_code, $session_id);
$alleval = $cats[0]->get_evaluations($stud_id);
$alllink = $cats[0]->get_links($stud_id);
@ -735,14 +735,14 @@ if ($category != '0') {
$category_id = intval($_GET['selectcat']);
$course_id = CourseManager::get_course_by_category($category_id);
$show_message = $cat->show_message_resource_delete($course_id);
if ($show_message == '') {
//student
if (!api_is_allowed_to_edit()) {
$certificate_html = Category::register_user_certificate($category_id, $stud_id);
if ($certificate_html) {
echo $certificate_html;
}
}
} //end hack
}
}
@ -751,45 +751,45 @@ if (api_is_allowed_to_edit(null, true)) {
// Tool introduction
Display::display_introduction_section(TOOL_GRADEBOOK, array('ToolbarSet' => 'AssessmentsIntroduction'));
if ( (isset ($_GET['selectcat']) && $_GET['selectcat']<>0) ) {
if ( (isset ($_GET['selectcat']) && $_GET['selectcat']<>0) ) {
//
} else {
} else {
if (((isset ($_GET['selectcat']) && $_GET['selectcat']==0) || ((isset($_GET['cidReq']) && $_GET['cidReq']!==''))) || isset($_GET['isStudentView']) && $_GET['isStudentView']=='false') {
$cats = Category :: load(null, null, $course_code, null, null, $session_id, false);
$cats = Category :: load(null, null, $course_code, null, null, $session_id, false);
}
}
}
if (isset($first_time) && $first_time==1 && api_is_allowed_to_edit(null,true)) {
echo '<meta http-equiv="refresh" content="0;url='.api_get_self().'?cidReq='.$course_code.'" />';
} else {
} else {
$cats = Category :: load(null, null, $course_code, null, null, $session_id, false); //already init
if (!empty($cats)) {
if ( (api_get_setting('gradebook_enable_grade_model') == 'true') &&
if ( (api_get_setting('gradebook_enable_grade_model') == 'true') &&
(api_is_platform_admin() || (api_is_allowed_to_edit(null, true) && api_get_setting('teachers_can_change_grade_model_settings') == 'true'))) {
//Getting grade models
$obj = new GradeModel();
$grade_models = $obj->get_all();
$grade_model_id = $cats[0]->get_grade_model_id();
//No children
if ( (count($cats) == 1 && empty($grade_model_id)) || (count($cats) == 1 && $grade_model_id != -1) ) {
if (!empty($grade_models)) {
$form_grade = new FormValidator('grade_model_settings');
if (!empty($grade_models)) {
$form_grade = new FormValidator('grade_model_settings');
$obj->fill_grade_model_select_in_form($form_grade, 'grade_model_id', $grade_model_id);
$form_grade->addElement('style_submit_button', 'submit', get_lang('Save'), 'class="save"');
if ($form_grade->validate()) {
$value = $form_grade->exportValue('grade_model_id');
$gradebook = new Gradebook();
$gradebook->update(array('id'=> $cats[0]->get_id(), 'grade_model_id' => $value), true);
$gradebook->update(array('id'=> $cats[0]->get_id(), 'grade_model_id' => $value), true);
//do something
$obj = new GradeModel();
//do something
$obj = new GradeModel();
$components = $obj->get_components($value);
foreach ($components as $component) {
@ -810,34 +810,34 @@ if (isset($first_time) && $first_time==1 && api_is_allowed_to_edit(null,true)) {
//Reloading cats
$cats = Category :: load(null, null, $course_code, null, null, $session_id, false);
} else {
$form_grade->display();
$form_grade->display();
}
}
}
}
$i = 0;
foreach ($cats as $cat) {
$allcat = $cat->get_subcategories($stud_id, $course_code, $session_id);
foreach ($cats as $cat) {
$allcat = $cat->get_subcategories($stud_id, $course_code, $session_id);
$alleval = $cat->get_evaluations($stud_id);
$alllink = $cat->get_links($stud_id, true);
if ($cat->get_parent_id() != 0 ) {
$i++;
} else {
//This is the father
//This is the father
//Create gradebook/add gradebook links
DisplayGradebook::display_header_gradebook($cat, 0, $cat->get_id(), $is_course_admin, $is_platform_admin, $simple_search_form, false, true);
DisplayGradebook::display_header_gradebook($cat, 0, $cat->get_id(), $is_course_admin, $is_platform_admin, $simple_search_form, false, true);
if (api_is_allowed_to_edit(null,true) && api_get_setting('gradebook_enable_grade_model') == 'true') {
//Showing the grading system
if (!empty($grade_models[$grade_model_id])) {
if (!empty($grade_models[$grade_model_id])) {
Display::display_normal_message(get_lang('GradeModel').': '.$grade_models[$grade_model_id]['name']);
}
}
$gradebooktable = new GradebookTable($cat, $allcat, $alleval, $alllink, $addparams);
$gradebooktable->display();
}
}
$gradebooktable = new GradebookTable($cat, $allcat, $alleval, $alllink, $addparams);
$gradebooktable->display();
}
}
}

@ -14,7 +14,7 @@ require_once '../global.inc.php';
$action = $_REQUEST['a'];
unset($_REQUEST['a']);
$js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/';
$js_path = api_get_path(WEB_LIBRARY_JS_PATH);
//Fix in order to add the exe_id
@ -101,4 +101,4 @@ switch ($action) {
default:
echo '';
}
exit;
exit;

@ -255,8 +255,11 @@ define('SYS_ARCHIVE_PATH', 'SYS_ARCHIVE_PATH');
define('WEB_ARCHIVE_PATH', 'WEB_ARCHIVE_PATH');
define('INCLUDE_PATH', 'INCLUDE_PATH');
define('LIBRARY_PATH', 'LIBRARY_PATH');
define('SYS_LIBRARY_JS_PATH', 'SYS_LIBRARY_JS_PATH');
define('CONFIGURATION_PATH', 'CONFIGURATION_PATH');
define('WEB_LIBRARY_PATH', 'WEB_LIBRARY_PATH');
define('WEB_LIBRARY_JS_PATH', 'WEB_LIBRARY_JS_PATH');
define('WEB_AJAX_PATH', 'WEB_AJAX_PATH');
define('SYS_TEST_PATH', 'SYS_TEST_PATH');
define('WEB_TEMPLATE_PATH', 'WEB_TEMPLATE_PATH');
@ -505,6 +508,7 @@ define('TOOL_ADMIN_VISIBLE', 'tooladminvisible');
* api_get_path(SYS_CSS_PATH) /var/www/chamilo/main/css
* api_get_path(INCLUDE_PATH) /var/www/chamilo/main/inc/
* api_get_path(LIBRARY_PATH) /var/www/chamilo/main/inc/lib/
* api_get_path(SYS_LIBRARY_JS_PATH) /var/www/chamilo/main/inc/lib/javascript
* api_get_path(CONFIGURATION_PATH) /var/www/chamilo/main/inc/conf/
* api_get_path(SYS_LANG_PATH) /var/www/chamilo/main/lang/
* api_get_path(SYS_PLUGIN_PATH) /var/www/chamilo/plugin/
@ -522,6 +526,7 @@ define('TOOL_ADMIN_VISIBLE', 'tooladminvisible');
* api_get_path(WEB_IMG_PATH) http://www.mychamilo.org/chamilo/main/img/
* api_get_path(WEB_CSS_PATH) http://www.mychamilo.org/chamilo/main/css/
* api_get_path(WEB_LIBRARY_PATH) http://www.mychamilo.org/chamilo/main/inc/lib/
* api_get_path(WEB_LIBRARY_JS_PATH) http://www.mychamilo.org/chamilo/main/inc/lib/javascript
* api_get_path(WEB_TEMPLATE_PATH) http://www.mychamilo.org/chamilo/main/template/
*
*
@ -560,8 +565,10 @@ function api_get_path($path_type, $path = null) {
WEB_ARCHIVE_PATH => 'temp/',
INCLUDE_PATH => 'inc/',
LIBRARY_PATH => 'inc/lib/',
SYS_LIBRARY_JS_PATH => 'inc/lib/javascript/',
CONFIGURATION_PATH => 'inc/conf/',
WEB_LIBRARY_PATH => 'inc/lib/',
WEB_LIBRARY_JS_PATH => 'inc/lib/javascript/',
WEB_AJAX_PATH => 'inc/ajax/',
SYS_TEST_PATH => 'tests/',
WEB_TEMPLATE_PATH => 'template/',
@ -655,9 +662,7 @@ function api_get_path($path_type, $path = null) {
$paths[WEB_CODE_PATH] = $root_web.$code_folder;
$paths[REL_DATA_PATH] = $root_rel.'data/';
$paths[WEB_DEFAULT_COURSE_DOCUMENT_PATH] = $paths[WEB_DATA_PATH].'default_course_document/';
$paths[REL_DEFAULT_COURSE_DOCUMENT_PATH] = $paths[REL_DATA_PATH].'default_course_document/';
@ -674,16 +679,14 @@ function api_get_path($path_type, $path = null) {
$paths[WEB_CSS_PATH] = $paths[WEB_CODE_PATH].$paths[WEB_CSS_PATH];
$paths[WEB_IMG_PATH] = $paths[WEB_CODE_PATH].$paths[WEB_IMG_PATH];
$paths[WEB_LIBRARY_PATH] = $paths[WEB_CODE_PATH].$paths[WEB_LIBRARY_PATH];
$paths[WEB_LIBRARY_JS_PATH] = $paths[WEB_CODE_PATH].$paths[WEB_LIBRARY_JS_PATH];
$paths[WEB_AJAX_PATH] = $paths[WEB_PUBLIC_PATH].'main/'.$paths[WEB_AJAX_PATH];
$paths[WEB_PLUGIN_PATH] = $paths[WEB_PATH].$paths[WEB_PLUGIN_PATH];
$paths[WEB_ARCHIVE_PATH] = $paths[WEB_PATH].$paths[WEB_ARCHIVE_PATH];
$paths[WEB_TEMPLATE_PATH] = $paths[WEB_CODE_PATH].$paths[WEB_TEMPLATE_PATH];
$paths[INCLUDE_PATH] = $paths[SYS_CODE_PATH].$paths[INCLUDE_PATH];
$paths[LIBRARY_PATH] = $paths[SYS_CODE_PATH].$paths[LIBRARY_PATH];
$paths[SYS_LIBRARY_JS_PATH] = $paths[SYS_CODE_PATH].$paths[SYS_LIBRARY_JS_PATH];
$paths[CONFIGURATION_PATH] = $paths[SYS_CODE_PATH].$paths[CONFIGURATION_PATH];
$is_this_function_initialized = true;
@ -703,6 +706,7 @@ function api_get_path($path_type, $path = null) {
WEB_PLUGIN_PATH => 'plugin/',
WEB_ARCHIVE_PATH => 'archive/',
WEB_LIBRARY_PATH => 'inc/lib/',
WEB_LIBRARY_JS_PATH => 'inc/lib/javascript/',
WEB_AJAX_PATH => 'inc/ajax/',
WEB_PUBLIC_PATH => 'web/',
);
@ -722,6 +726,7 @@ function api_get_path($path_type, $path = null) {
$paths[WEB_PLUGIN_PATH] = $paths[WEB_PATH].$web_paths[WEB_PLUGIN_PATH];
$paths[WEB_ARCHIVE_PATH] = $paths[WEB_PATH].$web_paths[WEB_ARCHIVE_PATH];
$paths[WEB_LIBRARY_PATH] = $paths[WEB_CODE_PATH].$web_paths[WEB_LIBRARY_PATH];
$paths[WEB_LIBRARY_JS_PATH] = $paths[WEB_CODE_PATH].$web_paths[WEB_LIBRARY_JS_PATH];
$paths[WEB_AJAX_PATH] = $paths[WEB_CODE_PATH].$web_paths[WEB_AJAX_PATH];
$paths[WEB_PUBLIC_PATH] = $paths[WEB_PATH].$web_paths[WEB_PUBLIC_PATH];
}
@ -5633,7 +5638,7 @@ function api_check_browscap() {
* Returns the <script> HTML tag
*/
function api_get_js($file) {
return '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/'.$file.'"></script>'."\n";
return '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_JS_PATH).$file.'"></script>'."\n";
}
/**
@ -5731,7 +5736,7 @@ function api_get_available_jquery_ui_languages() {
*/
function api_get_jquery_libraries_js($libraries) {
$js = '';
$js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/';
$js_path = api_get_path(WEB_LIBRARY_JS_PATH);
$isocode = api_get_language_isocode();
if (in_array('jquery-ui-i18n', $libraries)) {
@ -6151,17 +6156,16 @@ function api_get_security_key() {
}
function api_get_datetime_picker_js($htmlHeadXtra) {
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/datetimepicker/jquery-ui-timepicker-addon.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/datetimepicker/jquery-ui-timepicker-addon.css" rel="stylesheet" type="text/css" />';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'datetimepicker/jquery-ui-timepicker-addon.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_JS_PATH).'datetimepicker/jquery-ui-timepicker-addon.css" rel="stylesheet" type="text/css" />';
$isocode = api_get_language_isocode();
if ($isocode != 'en') {
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/datetimepicker/localization/jquery-ui-timepicker-'.$isocode.'.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'datetimepicker/localization/jquery-ui-timepicker-'.$isocode.'.js" type="text/javascript" language="javascript"></script>';
}
return $htmlHeadXtra;
}
function api_detect_user_roles($user_id, $courseId, $session_id = 0) {
$user_roles = array();
/*$user_info = api_get_user_info($user_id);
@ -6211,7 +6215,13 @@ function api_detect_user_roles($user_id, $courseId, $session_id = 0) {
return $user_roles;
}
function api_get_roles_to_string($roles) {
/**
* @param $roles
* @return null|string
*
*/
function api_get_roles_to_string($roles)
{
$role_names = array();
if (!empty($roles)) {
foreach ($roles as $role) {
@ -6224,7 +6234,11 @@ function api_get_roles_to_string($roles) {
return null;
}
/**
* @param int $courseId
* @param int $session_id
* @return bool
*/
function api_coach_can_edit_view_results($courseId = null, $session_id = null) {
$user_id = api_get_user_id();
@ -6252,12 +6266,15 @@ function api_coach_can_edit_view_results($courseId = null, $session_id = null) {
}
}
/**
* @param string $file
* @return string
*/
function api_get_js_simple($file)
{
return '<script type="text/javascript" src="'.$file.'"></script>'."\n";
}
function api_set_settings_and_plugins()
{
global $_configuration;

@ -1913,8 +1913,8 @@ class Display
$class = isset($params['class']) ? ' class="'.$params['class'].'"' : null;
$html = '<audio id="'.$id.'" '.$class.' controls '.$autoplay.' '.$width.' src="'.$file.'" >';
$html .= ' <object width="'.$params['width'].'" height="50" type="application/x-shockwave-flash" data="'.api_get_path(WEB_LIBRARY_PATH).'javascript/mediaelement/flashmediaelement.swf">
<param name="movie" value="'.api_get_path(WEB_LIBRARY_PATH).'javascript/mediaelement/flashmediaelement.swf" />
$html .= ' <object width="'.$params['width'].'" height="50" type="application/x-shockwave-flash" data="'.api_get_path(WEB_LIBRARY_JS_PATH).'mediaelement/flashmediaelement.swf">
<param name="movie" value="'.api_get_path(WEB_LIBRARY_JS_PATH).'mediaelement/flashmediaelement.swf" />
<param name="flashvars" value="controls=true&file='.$fileInfo['basename'].'" />
</object>';
$html .= '</audio>';

@ -279,7 +279,7 @@ class DocumentManager
* @param string
* @return true if the user is allowed to see the document, false otherwise
* @author Sergio A Kessler, first version
* @author Roan Embrechts, bugfix
* @author Roan Embrechts, bugfix
* @todo not only check if a file is visible, but also check if the user is allowed to see the file??
*/
public static function file_visible_to_user($this_course, $doc_url)
@ -2872,7 +2872,7 @@ class DocumentManager
static function generate_jplayer_jquery($params = array())
{
$js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/';
$js_path = api_get_path(WEB_LIBRARY_JS_PATH);
$jplayer_definition = ' $("#jquery_jplayer_'.$params['count'].'").jPlayer({
ready: function() {

@ -126,7 +126,6 @@ table.calendar .monthyear a:hover
} // end if
/* ]]> */
</script>
<script src="<?php echo api_get_path(WEB_LIBRARY_PATH).'javascript/calendar/tbl_change.js'; ?>"></script>
<script type="text/javascript">
/* <![CDATA[ */
var month_names = new Array(

@ -349,7 +349,6 @@ EOT;
}
$this->with_progress_bar = true;
$this->updateAttributes("onsubmit=\"javascript: myUpload.start('dynamic_div','" . api_get_path(WEB_IMG_PATH) . "progress_bar.gif','" . $label . "','" . $this->getAttribute('id') . "')\"");
$this->addElement('html', '<script language="javascript" src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/upload.js" type="text/javascript"></script>');
$this->addElement('html', '<script type="text/javascript">var myUpload = new upload(' . (abs(intval($delay)) * 1000) . ');</script>');
}
@ -372,7 +371,7 @@ EOT;
require_once api_get_path(LIBRARY_PATH) . 'xajax/xajax.inc.php';
}
$xajax_upload = new xajax(api_get_path(WEB_LIBRARY_PATH) . 'upload.xajax.php');
$xajax_upload = new xajax(api_get_path(WEB_LIBRARY_PATH).'upload.xajax.php');
$xajax_upload->registerFunction('updateProgress');
// IMPORTANT : must be the first element of the form
@ -403,10 +402,9 @@ EOT;
}
// Get the xajax code
$this->addElement('html', $xajax_upload->getJavascript(api_get_path(WEB_LIBRARY_PATH) . 'xajax'));
$this->addElement('html', $xajax_upload->getJavascript(api_get_path(WEB_LIBRARY_PATH).'xajax'));
// Get the upload code
$this->addElement('html', '<script language="javascript" src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/upload.js" type="text/javascript"></script>');
$this->addElement('html', '<script type="text/javascript">var myUpload = new upload(' . (abs(intval($delay)) * 1000) . ');</script>');
if (!$wait_after_upload) {

@ -373,9 +373,7 @@ class Nanogong
$html .= '<div id="nanogong_player_id" class="nanogong_player_container">';
$html .= '<div class="action_player">'.$actions.'</div>';
$html .= '<div class="nanogong_player">';
$html .= '<applet id="nanogong_player" archive="'.api_get_path(
WEB_LIBRARY_PATH
).'nanogong/nanogong.jar" code="gong.NanoGong" width="250" height="40" ALIGN="middle">';
$html .= '<applet id="nanogong_player" archive="'.api_get_path(WEB_LIBRARY_PATH).'nanogong/nanogong.jar" code="gong.NanoGong" width="250" height="40" ALIGN="middle">';
$html .= '<param name="ShowRecordButton" value="false" />'; // default true
$html .= '<param name="ShowSaveButton" value="false" />'; //you can save in local computer | (default true)
@ -402,7 +400,7 @@ class Nanogong
).$download_button.'</div>';
} elseif (in_array($path_info['extension'], array('mp3', 'ogg', 'wav'))) {
$js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/';
$js_path = api_get_path(WEB_LIBRARY_JS_PATH);
$html .= '<link rel="stylesheet" href="'.$js_path.'jquery-jplayer/skins/blue/jplayer.blue.monday.css" type="text/css">';
//$html .= '<link rel="stylesheet" href="' . $js_path . 'jquery-jplayer/skins/chamilo/jplayer.blue.monday.css" type="text/css">';
@ -577,10 +575,10 @@ class Nanogong
/**
* Returns the HTML form to upload a nano file or upload a file
* @param string
* @return string
*/
public function return_form($message = null)
{
$params = $this->get_params(true);
$url = api_get_path(WEB_AJAX_PATH).'nanogong.ajax.php?a=save_file&'.$params;
@ -601,9 +599,7 @@ class Nanogong
$html .= '<div id="nanogong_div">';
$html .= '<applet id="nanogong" archive="'.api_get_path(
WEB_LIBRARY_PATH
).'nanogong/nanogong.jar" code="gong.NanoGong" width="250" height="40" align="middle">';
$html .= '<applet id="nanogong" archive="'.api_get_path(WEB_LIBRARY_PATH).'nanogong/nanogong.jar" code="gong.NanoGong" width="250" height="40" align="middle">';
//echo '<param name="ShowRecordButton" value="false" />'; // default true
// echo '<param name="ShowSaveButton" value="false" />'; //you can save in local computer | (default true)
$html .= '<param name="ShowSpeedButton" value="false" />'; // default true

@ -19,10 +19,10 @@ require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
* @param array $htmlHeadXtra A reference to the doc $htmlHeadXtra
*/
function search_widget_prepare(&$htmlHeadXtra) {
$htmlHeadXtra[] = '
<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.autocomplete.js"></script>
$htmlHeadXtra[] = '
<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.autocomplete.js"></script>
<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'search/search_widget.js"></script>
<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.autocomplete.css" />
<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.autocomplete.css" />
<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_LIBRARY_PATH).'search/search_widget.css" />';
}
@ -31,7 +31,7 @@ function search_widget_prepare(&$htmlHeadXtra) {
*/
function format_one_specific_field_select($prefix, $sf_term_array, $op, $extra_select_attr='size="7" class="sf-select-multiple"') {
global $charset;
$multiple_select .= '<select '. $extra_select_attr .' title="'. $prefix .'" id="sf-'. $prefix .'" name="sf_'. $prefix .'[]">';
$multiple_select = '<select '. $extra_select_attr .' title="'. $prefix .'" id="sf-'. $prefix .'" name="sf_'. $prefix .'[]">';
$all_selected = '';
if (!empty($_REQUEST['sf_'. $prefix]) ) {
@ -123,7 +123,7 @@ function search_widget_normal_form($action, $show_thesaurus, $sf_terms, $op) {
$action='index.php';
}
$navigator_info = api_get_navigator();
if ($navigator_info['name']=='Internet Explorer' && $navigator_info['version']=='6') {
$submit_button1 = '<input type="submit" id="submit" value="'. get_lang('Search') .'" />';
$submit_button2 = '<input class="lower-submit" type="submit" value="'. get_lang('Search') .'" />';
@ -142,8 +142,8 @@ function search_widget_normal_form($action, $show_thesaurus, $sf_terms, $op) {
'.$submit_button1.'
<br /><br />';
$list = get_specific_field_list();
if(!empty($list)) {
if(!empty($list)) {
$form .= '<span class="search-links-box">'. $advanced_options .'&nbsp;</span>
<div id="tags" class="tags" style="display:'. $display_thesaurus .';">
<div class="search-help-box">'. $help .'</div>
@ -200,7 +200,7 @@ function search_widget_prefilter_form($action, $show_thesaurus, $sf_terms, $op,
if (isset($_GET['action']) && strcmp(trim($_GET['action']),'search')===0) {
$action='index.php';
}
$form = '
<form id="chamilo_search" action="'. $action .'" method="GET">
<input type="text" id="query" name="query" size="40" />
@ -226,26 +226,26 @@ function search_widget_prefilter_form($action, $show_thesaurus, $sf_terms, $op,
unset($sf_term_array);
natcasesort($temp);
$sf_term_array = $temp;
// get specific field name
$sf_value = get_specific_field_list(array( 'code' => "'$prefilter_prefix'" ));
$sf_value = array_shift($sf_value);
$form .= '<label class="sf-select-multiple-title" for="sf_'. $prefix .'[]">'.$icons_for_search_terms[$prefix].' '.$sf_value['name'].'</label><br />';
$form .= format_one_specific_field_select($prefilter_prefix, $sf_term_array, $op, 'id="prefilter"');
$form .= format_specific_fields_selects($sf_terms, $op, $prefilter_prefix);
} else {
$form .= format_specific_fields_selects($sf_terms, $op);
}
$or_checked = '';
$and_checked = '';
if ($op == 'or') {
$or_checked = 'checked="checked"';
} else if ($op == 'and') {
$and_checked = 'checked="checked"';
}
}
$form .= '
</tr>
<tr>
@ -263,11 +263,11 @@ function search_widget_prefilter_form($action, $show_thesaurus, $sf_terms, $op,
</tr>
</table>
</div>';
}
}
$form .= '
</form>
<br style="clear: both;"/>';
return $form;
}
@ -276,7 +276,7 @@ function search_widget_prefilter_form($action, $show_thesaurus, $sf_terms, $op,
*/
function display_search_form($action, $show_thesaurus, $sf_terms, $op) {
$type = (!empty($_REQUEST['type'])? htmlentities($_REQUEST['type']): 'normal');
switch ($type) {
case 'prefilter':
$prefilter_prefix = api_get_setting('search_prefilter_prefix');

@ -359,6 +359,7 @@ class Template
'web_plugin_path' => api_get_path(WEB_PLUGIN_PATH),
'web_lib' => api_get_path(WEB_LIBRARY_PATH),
'web_library_path' => api_get_path(WEB_LIBRARY_PATH),
'web_library_js_path' => api_get_path(WEB_LIBRARY_JS_PATH),
'public_web' => api_get_path(WEB_PUBLIC_PATH)
);
@ -399,9 +400,9 @@ class Template
$css[] = api_get_path(WEB_PUBLIC_PATH).'css/'.$this->theme.'/style.css';
} else {
// Bootstrap
$css[] = api_get_cdn_path(api_get_path(WEB_LIBRARY_PATH).'javascript/bootstrap/css/bootstrap.css');
$css[] = api_get_cdn_path(api_get_path(WEB_LIBRARY_JS_PATH).'bootstrap/css/bootstrap.css');
//$css[] = api_get_cdn_path(api_get_path(WEB_LIBRARY_PATH).'javascript/bootstrap/css/bootstrap-theme.css');
//$css[] = api_get_cdn_path(api_get_path(WEB_LIBRARY_JS_PATH).'bootstrap/css/bootstrap-theme.css');
// Base CSS.
$css[] = api_get_cdn_path($cssPath.'base.css');
@ -416,16 +417,17 @@ class Template
}
if (api_is_global_chat_enabled()) {
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chat/css/chat.css';
$css[] = api_get_path(WEB_LIBRARY_JS_PATH).'chat/css/chat.css';
}
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-ui/css/'.$this->jquery_ui_theme.'/jquery-ui-custom.css';
//$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-ui/default.css';
$css[] = api_get_path(WEB_LIBRARY_JS_PATH).'jquery-ui/css/'.$this->jquery_ui_theme.'/jquery-ui-custom.css';
//$css[] = api_get_path(WEB_LIBRARY_JS_PATH).'jquery-ui/default.css';
}
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/font-awesome/css/font-awesome.css';
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.css';
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chosen/chosen.css';
$css[] = api_get_path(WEB_LIBRARY_JS_PATH).'font-awesome/css/font-awesome.css';
$css[] = api_get_path(WEB_LIBRARY_JS_PATH).'thickbox.css';
$css[] = api_get_path(WEB_LIBRARY_JS_PATH).'chosen/chosen.css';
$css[] = api_get_path(WEB_LIBRARY_JS_PATH).'tag/style.css';
$css_file_to_string = null;
foreach ($css as $file) {
@ -450,8 +452,8 @@ class Template
$navigator_info = api_get_navigator();
if ($navigator_info['name'] == 'Internet Explorer' && $navigator_info['version'] == '6') {
$css_file_to_string .= 'img, div { behavior: url('.api_get_path(
WEB_LIBRARY_PATH
).'javascript/iepngfix/iepngfix.htc) } '."\n";
WEB_LIBRARY_JS_PATH
).'iepngfix/iepngfix.htc) } '."\n";
}
if (!$disable_js_and_css_files) {
@ -489,10 +491,10 @@ class Template
{
global $disable_js_and_css_files, $htmlHeadXtra;
$jsFolder = api_get_path(WEB_LIBRARY_PATH).'javascript/';
$jsFolder = api_get_path(WEB_LIBRARY_JS_PATH);
if ($this->app['assetic.enabled']) {
$js_files = array(
$jsFiles = array(
api_get_path(WEB_PATH).'web/js/script.js',
$jsFolder.'chosen/chosen.jquery.min.js',
$jsFolder.'thickbox.js',
@ -500,41 +502,44 @@ class Template
);
} else {
//JS files
$js_files = array(
$jsFiles = array(
$jsFolder.'modernizr.js',
$jsFolder.'jquery.js',
$jsFolder.'chosen/chosen.jquery.min.js',
$jsFolder.'jquery-ui/js/jquery-ui.custom.js',
$jsFolder.'thickbox.js',
$jsFolder.'tag/jquery.fcbkcomplete.js',
$jsFolder.'bootstrap/js/bootstrap.js',
$jsFolder.'upload.js',
$jsFolder.'calendar/tbl_change.js',
$jsFolder.'textareacounter/jquery.textareaCounter.plugin.js'
);
}
$this->app['html_editor']->getJavascriptToInclude($js_files);
$this->app['html_editor']->getJavascriptToInclude($jsFiles);
if (api_is_global_chat_enabled()) {
//Do not include the global chat in LP
if ($this->show_learnpath == false && $this->show_footer == true && $this->app['template.hide_global_chat'] == false) {
$js_files[] = $jsFolder.'chat/js/chat.js';
$jsFiles[] = $jsFolder.'chat/js/chat.js';
}
}
if (api_get_setting('accessibility_font_resize') == 'true') {
$js_files[] = $jsFolder.'fontresize.js';
$jsFiles[] = $jsFolder.'fontresize.js';
}
if (api_get_setting('include_asciimathml_script') == 'true') {
$js_files[] = $jsFolder.'asciimath/ASCIIMathML.js';
$jsFiles[] = $jsFolder.'asciimath/ASCIIMathML.js';
}
if (api_get_setting('disable_copy_paste') == 'true') {
$js_files[] = $jsFolder.'jquery.nocutcopypaste.js';
$jsFiles[] = $jsFolder.'jquery.nocutcopypaste.js';
}
$js_file_to_string = null;
foreach ($js_files as $js_file) {
foreach ($jsFiles as $js_file) {
$js_file_to_string .= api_get_js_simple($js_file);
}

@ -36,9 +36,6 @@ function validate(form,list) {
}
</script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$htmlHeadXtra[] = '<script>
$(document).ready(function () {

@ -37,11 +37,11 @@ $current_course_tool = TOOL_LEARNPATH;
if (api_get_setting('show_glossary_in_documents') == 'ismanual' || api_get_setting('show_glossary_in_documents') == 'isautomatic' ) {
$htmlHeadXtra[] = '<script>
<!--
var jQueryFrameReadyConfigPath = \''.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js\';
var jQueryFrameReadyConfigPath = \''.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.js\';
-->
</script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.frameready.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.frameready.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'jquery.highlight.js" type="text/javascript" language="javascript"></script>';
}
$htmlHeadXtra[] = '<script>

@ -52,7 +52,7 @@ if ($debug) {
$course_code = api_get_course_id();
$course_id = api_get_course_int_id();
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/impress/impress-demo.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'impress/impress-demo.css');
$list = $_SESSION['oLP']->get_toc();
@ -86,4 +86,4 @@ foreach ($list as $toc) {
$app['template']->assign('html', $html);
$content = $app['template']->fetch('default/learnpath/impress.tpl');
$app['template']->assign('content', $content);
$app['template']->display_one_col_template();
$app['template']->display_one_col_template();

@ -1766,8 +1766,6 @@ function attach_glossary_into_scorm(type) {
if (type == 'automatic') {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(object) {
},
type: "POST",
url: my_protocol+"//"+location.host+work_path+"/main/glossary/glossary_ajax_request.php",
data: "glossary_data=true",

@ -11,7 +11,7 @@ exit;
$language_file = array('reportlib');
$cidReset = true;
// including files
// including files
require_once '../inc/global.inc.php';
require_once 'reports.lib.php';
@ -28,7 +28,7 @@ $tool_name=get_lang('Reports');
// Displaying the header
foreach (array('jquery.ba-bbq.min.js', 'jquery.validate.js', 'jquery.form.js', 'jquery.form.wizard.js', 'jquery.dataTables.min.js') as $js)
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/'.$js.'" type="text/javascript" language="javascript"></script>'."\n";
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).$js.'" type="text/javascript" language="javascript"></script>';
// FIXME
$htmlHeadXtra[] = ' <style type="text/css">
@ -47,7 +47,7 @@ $htmlHeadXtra[] = ' <style type="text/css">
margin-right : 1em;
text-align: right;
}
#data {
font-size : 0.7em;
}
@ -94,7 +94,7 @@ $htmlHeadXtra[] = ' <style type="text/css">
.navigation_button {
width : 70px;
}
#data {
overflow : auto;
display: none;
@ -165,7 +165,7 @@ foreach ($reports_template as $key => $value) {
</div>
<div id="wizardShowButton">
<?php echo get_lang('ShowWizard'); ?>
</div>
</div>
<p id="data"></p>
</div>
<div id="result" class="result">
@ -183,7 +183,7 @@ foreach ($reports_template as $key => $value) {
$("#wizardContent").show();
$("#wizardShowButton").hide();
});
$("#reportsBuilderWizardForm").formwizard({
$("#reportsBuilderWizardForm").formwizard({
formPluginEnabled: true,
validationEnabled: true,
focusFirstInput : true,
@ -196,7 +196,7 @@ foreach ($reports_template as $key => $value) {
},
beforeSubmit: function(data){$("#data").html("data sent to the server: " + $.param(data));},
resetForm: false
}
}
}
);
});

@ -12,7 +12,7 @@ exit;
$language_file = array('reportlib');
$cidReset = true;
// including files
// including files
require_once '../inc/global.inc.php';
require_once 'reports.lib.php';
require_once 'multiquery.lib.php';
@ -48,7 +48,7 @@ if ($_REQUEST['format'] == 'link') {
if ($_REQUEST['format'] == 'directlink') {
foreach (array('jquery.dataTables.min.js') as $js)
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/'.$js.'" type="text/javascript" language="javascript"></script>'."\n";
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).$js.'" type="text/javascript" language="javascript"></script>'."\n";
$htmlCSSXtra[] = 'dataTable.css';
@ -104,7 +104,7 @@ if (is_array($reports_template[$_REQUEST['type']])) {
die(var_export($query, true));
$result = multiquery_query($query);
// check number of result
$numberOfResult = multiquery_num_rows($result);
@ -149,7 +149,7 @@ if ($_REQUEST['format'] == 'html' || $_REQUEST['format'] == 'directlink') {
// counting fields
$nfields = multiquery_num_fields($result);
$columns = array();
$columns = array();
$columns_islink = array();
echo '<thead><tr>';
for ($i=0; $i < $nfields; $i++) {
@ -157,7 +157,7 @@ if ($_REQUEST['format'] == 'html' || $_REQUEST['format'] == 'directlink') {
if (substr($columns[$i], -5, 5) != '_link') {
$column_islink[$i] = false;
echo '<th>'.$columns[$i].'</th>';
} else
} else
$columns_islink[$i] = true;
}
@ -176,10 +176,10 @@ if ($_REQUEST['format'] == 'html' || $_REQUEST['format'] == 'directlink') {
if (!$columns_islink[$i]){ // ignore links
if ($columns_link[$i] != '') // link is defined
if (substr($columns_link[$i],0,10) == 'javascript') {
echo '<td><a href="#" onclick="'.$row[$columns_link[$i]].'">'.$row[$i].'</a></td>';
echo '<td><a href="#" onclick="'.$row[$columns_link[$i]].'">'.$row[$i].'</a></td>';
}
else {
echo '<td><a href="'.$row[$columns_link[$i]].'">'.$row[$i].'</a></td>';
echo '<td><a href="'.$row[$columns_link[$i]].'">'.$row[$i].'</a></td>';
}
else
echo '<td>'.$row[$i].'</td>';
@ -197,18 +197,18 @@ if ($_REQUEST['format'] == 'html' || $_REQUEST['format'] == 'directlink') {
</div>';
Display::display_footer();
}
} else if ($_REQUEST['format'] == 'csv') {
$nfields = multiquery_num_fields($result);
$columns = array();
$columns = array();
$columns_islink = array();
for ($i=0; $i < $nfields; $i++) {
$columns[$i] = multiquery_field_name($result, $i);
if (substr($columns[$i], -5, 5) != '_link') {
$column_islink[$i] = false;
echo csv_escaping($columns[$i]).',';
} else
} else
$columns_islink[$i] = true;
}

@ -22,10 +22,7 @@ SessionManager::protect_session_edit();
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Sessions'));
$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList'));
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$htmlHeadXtra[] = api_get_jquery_libraries_js(array('jquery-ui-i18n'));
$htmlHeadXtra = api_get_datetime_picker_js($htmlHeadXtra);
$id = null;

@ -36,9 +36,6 @@ function denied_friend (element_input) {
friend_user_id=user_id[1];
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("#id_response").html("<img src=\'../inc/lib/javascript/indicator.gif\' />");
},
type: "POST",
url: "'.api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=deny_friend",
data: "denied_friend_id="+friend_user_id,
@ -56,15 +53,13 @@ function register_friend(element_input) {
user_friend_id=user_id[1];
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("div#dpending_"+user_friend_id).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
type: "POST",
url: "'.api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=add_friend",
data: "friend_id="+user_friend_id+"&is_my_friend="+"friend",
success: function(data) {
$("div#"+name_div_id).hide("slow");
$("#id_response").html(data);
}
type: "POST",
url: "'.api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=add_friend",
data: "friend_id="+user_friend_id+"&is_my_friend="+"friend",
success: function(data) {
$("div#"+name_div_id).hide("slow");
$("#id_response").html(data);
}
});
}
}

@ -172,13 +172,10 @@ function toogle_course (element_html, course_code){
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("div#"+content).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
type: "POST",
url: "'.api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=toogle_course",
data: "load_ajax="+id_elem+"&action="+action+"&course_code="+course_code,
success: function(datos) {
$("div#"+content).html(datos);
}
});
}
@ -227,9 +224,6 @@ function register_friend(element_input) {
user_friend_id=user_id[1];
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("div#dpending_"+user_friend_id).html("<img src=\'../inc/lib/javascript/indicator.gif\' />");
},
type: "POST",
url: "'.api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=add_friend",
data: "friend_id="+user_friend_id+"&is_my_friend="+"friend",
@ -676,4 +670,4 @@ $tpl = $app['template'];
$tpl->assign('social_left_content', $social_left_content);
$tpl->assign('social_right_content', $social_right_content);
$social_layout = $tpl->get_template('layout/social_layout.tpl');
$tpl->display($social_layout);
$tpl->display($social_layout);

@ -24,9 +24,6 @@ $htmlHeadXtra[] = api_get_js('d3/d3.v2.min.js');
$htmlHeadXtra[] = api_get_js('d3/colorbrewer.js');
$htmlHeadXtra[] = api_get_js('d3/jquery.xcolor.js');
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$tpl = $app['template'];
$load_user = api_get_user_id();
@ -45,4 +42,4 @@ $tpl->assign('url', $url);
$content = $tpl->fetch('default/skill/skill_wheel_student.tpl');
$tpl->assign('content', $content);
$tpl->display_no_layout_template();
$tpl->display_no_layout_template();

@ -2,8 +2,8 @@
{% block content %}
{% if ("use_virtual_keyboard" | get_setting) == 'true' %}
<link href="{{ _p.web_lib }}javascript/keyboard/keyboard.css" rel="stylesheet" type="text/css" />
<script src="{{ _p.web_lib }}javascript/keyboard/jquery.keyboard.js" type="text/javascript" language="javascript"></script>
<link href="{{ _p.web_library_js_path }}keyboard/keyboard.css" rel="stylesheet" type="text/css" />
<script src="{{ _p.web_library_js_path }}keyboard/jquery.keyboard.js" type="text/javascript" language="javascript"></script>
<script>
$(function(){
$('.virtualkey').keyboard({

@ -137,9 +137,6 @@
function ajaxAction(obj) {
var url = $(obj).attr('data-url');
$.ajax({
beforeSend: function(obj) {
$("#result").html("<img src=\'{{ _p.web_img }}loadingAnimation.gif\' />");
},
type: "POST",
url: url,
success: function(data) {

@ -134,6 +134,14 @@ function mysort(a, b) {
return 0;
}
// Global loading for ajax calls.
$(document).bind("ajaxSend", function(){
$("#loading_block").show();
}).bind("ajaxComplete", function(){
$("#loading_block").hide();
});
$("form").on("click", ' .advanced_parameters', function() {
var id = $(this).attr('id') + '_options';
var button = $(this);

@ -9,6 +9,8 @@
{{ knp_menu_render('actions_menu', { 'currentClass': 'active'}) }}
{% endif %}
<span id="loading_block" style="display:none">Loading ...</span>
{# Page header #}
{% if header != '' %}
<div class="page-header">

@ -50,22 +50,22 @@ chamilo_courseCode = '{{ course_code }}';
{
type:"script",
id:"_fr1",
src:"{{ _p.web_library_path}}javascript/jquery.js"
src:"{{ _p.web_library_js_path }}jquery.js"
},
{
type:"script",
id:"_fr4",
src:"{{ _p.web_library_path}}javascript/jquery-ui/js/jquery-ui.custom.js"
src:"{{ _p.web_library_js_path }}jquery-ui/js/jquery-ui.custom.js"
},
{
type:"stylesheet",
id:"_fr5",
src:"{{ _p.web_library_path}}javascript/jquery-ui/css/smoothness/jquery-ui.custom.min.css"
src:"{{ _p.web_library_js_path }}jquery-ui/css/smoothness/jquery-ui.custom.min.css"
},
{
type:"script",
id:"_fr2",
src:"{{ _p.web_library_path}}javascript/jquery.highlight.js"
src:"{{ _p.web_library_js_path }}jquery.highlight.js"
}
]
}
@ -79,22 +79,22 @@ chamilo_courseCode = '{{ course_code }}';
{
type:"script",
id:"_fr1",
src:"{{ _p.web_library_path}}javascript/jquery.js"},
src:"{{ _p.web_library_js_path }}jquery.js"},
{
type:"script",
id:"_fr4",
src:"{{ _p.web_library_path}}javascript/jquery-ui/js/jquery-ui.custom.js"},
src:"{{ _p.web_library_js_path }}jquery-ui/js/jquery-ui.custom.js"},
{
type:"stylesheet",
id:"_fr5",
src:"{{ _p.web_library_path}}javascript/jquery-ui/css/smoothness/jquery-ui-custom.css"},
src:"{{ _p.web_library_js_path }}jquery-ui/css/smoothness/jquery-ui-custom.css"},
{
type:"script",
id:"_fr2",
src:"{{ _p.web_library_path}}javascript/jquery.highlight.js"
src:"{{ _p.web_library_js_path }}jquery.highlight.js"
}
]}
);
</script>
{% endif %}
{% endif %}
{% endif %}

@ -1,4 +1,4 @@
<script type="text/javascript" src="{{ _p.web_lib }}javascript/rtc/RecordRTC.js"></script>
<script type="text/javascript" src="{{ _p.web_library_js_path }}rtc/RecordRTC.js"></script>
<script type="text/javascript" src="{{ _p.web_lib }}swfobject/swfobject.js"></script>
<script type="text/javascript" src="{{ _p.web_lib }}wami-recorder/recorder.js"></script>
<script type="text/javascript" src="{{ _p.web_lib }}wami-recorder/gui.js"></script>

@ -11,14 +11,14 @@
<p>Use a spacebar or arrow keys to navigate</p>
</div>
<script>
if ("ontouchstart" in document.documentElement) {
if ("ontouchstart" in document.documentElement) {
document.querySelector(".hint").innerHTML = "<p>Tap on the left or right to navigate</p>";
}
</script>
<script>
<script>
$(document).ready(function() {
impress().init();
impress().init();
});
</script>
<script type="text/javascript" src="{{_p.web_lib}}javascript/impress/impress.js"></script>
<script type="text/javascript" src="{{ _p.web_library_js_path }}impress/impress.js"></script>

@ -20,7 +20,7 @@ $url = $timeline->get_url($_GET['id']);
$item = $timeline->get($_GET['id']);
$interbreadcrumb[]=array('url' => '#','name' => $item['headline']);
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/timeline/timeline.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'timeline/timeline.css');
$htmlHeadXtra[] = api_get_js('timeline/timeline-min.js');
$htmlHeadXtra[] = '
<script>

@ -96,7 +96,6 @@ event_access_tool(TOOL_UPLOAD);
* Prepare the header
*/
$htmlHeadXtra[] = '<script language="javascript" src="../inc/lib/javascript/upload.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script type="text/javascript">
var myUpload = new upload(0);
</script>';

@ -18,7 +18,6 @@ $language_file[] = "scormdocument";
// global settings initialisation
require_once '../inc/global.inc.php';
$htmlHeadXtra[] = '<script language="javascript" src="../inc/lib/javascript/upload.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script>
var myUpload = new upload(0);
</script>';
@ -116,4 +115,4 @@ $form->setDefaults($defaults);
// display the form
$form->display();
Display::display_footer();
Display::display_footer();

@ -31,7 +31,6 @@ $form_style = '
#dynamic_div_waiter_container{float:left;}
</style>';
$htmlHeadXtra[] = '<script language="javascript" src="../inc/lib/javascript/upload.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script type="text/javascript">
var myUpload = new upload(0);
</script>';

@ -26,7 +26,7 @@ class CkEditor extends Editor
*/
public function getJavascriptToInclude(& $files)
{
$jsFolder = api_get_path(WEB_LIBRARY_PATH).'javascript/';
$jsFolder = api_get_path(WEB_LIBRARY_JS_PATH);
$files[] = $jsFolder.'ckeditor/ckeditor.js';
}

@ -16,7 +16,7 @@ class TinyMce extends Editor
*/
public function getJavascriptToInclude(& $files)
{
$jsFolder = api_get_path(WEB_LIBRARY_PATH).'javascript/';
$jsFolder = api_get_path(WEB_LIBRARY_JS_PATH);
$files[] = $jsFolder.'tinymce/tinymce.min.js';
}

@ -72,8 +72,6 @@ class BranchController extends CommonController
*/
public function addDirectorAction($id)
{
$extraJS[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$type = new BranchUsersType();
$branchUsers = new Entity\BranchUsers();

@ -135,12 +135,6 @@ class JuryController extends CommonController
*/
public function addMembersAction(Application $app, $id)
{
$extraJS = array(
'<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />',
'<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript"></script>'
);
$app['extraJS'] = $extraJS;
$juryUserType = new JuryMembersType();
$juryMember = new Entity\JuryMembers();
$juryMember->setJuryId($id);

@ -32,12 +32,6 @@ class QuestionManagerController
*/
public function editQuestionAction(Application $app, $id)
{
$extraJS = array();
//@todo improve this JS includes should be added using twig
$extraJS[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$extraJS[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$app['extraJS'] = $extraJS;
// Setting exercise obj.
$exercise = new \Exercise();
$exercise->edit_exercise_in_lp = true;
@ -306,16 +300,6 @@ class QuestionManagerController
*/
public function newCategoryAction(Application $app)
{
$extraJS = array();
//@todo improve this JS includes should be added using twig
$extraJS[] = '<link href="'.api_get_path(
WEB_LIBRARY_PATH
).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$extraJS[] = '<script src="'.api_get_path(
WEB_LIBRARY_PATH
).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript"></script>';
$app['extraJS'] = $extraJS;
$url = $app['url_generator']->generate('admin_category_new');
$form = new \FormValidator('new', 'post', $url);
@ -351,12 +335,6 @@ class QuestionManagerController
*/
public function editCategoryAction(Application $app, $id)
{
$extraJS = array();
//@todo improve this JS includes should be added using twig
$extraJS[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$extraJS[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript"></script>';
$app['extraJS'] = $extraJS;
$objcat = new \Testcategory($id);
if (!empty($objcat->c_id) || empty($objcat->id)) {

@ -246,12 +246,6 @@ class ExerciseController extends CommonController
*/
public function editQuestionAction(Application $app, $id)
{
$extraJS = array();
//@todo improve this JS includes should be added using twig
$extraJS[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
$extraJS[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$app['extraJS'] = $extraJS;
// Setting exercise obj.
$exercise = new \Exercise();
$exercise->edit_exercise_in_lp = true;

@ -92,7 +92,7 @@ class IndexController extends CommonController
);
if (api_get_setting('use_virtual_keyboard') == 'true') {
$extra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/keyboard/keyboard.css');
$extra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'keyboard/keyboard.css');
$extra[] = api_get_js('keyboard/jquery.keyboard.js');
}
@ -181,7 +181,7 @@ class IndexController extends CommonController
$app['template']->assign('error', $app['security.last_error']($request));
$extra = array();
if (api_get_setting('use_virtual_keyboard') == 'true') {
$extra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/keyboard/keyboard.css');
$extra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).'keyboard/keyboard.css');
$extra[] = api_get_js('keyboard/jquery.keyboard.js');
}
$app['extraJS'] = $extra;

@ -53,6 +53,7 @@ $app['temp.paths']->folders[] = $app['temp.path'].'temp';
// Assetic.
if ($app['assetic.enabled']) {
$jsFolder = api_get_path(SYS_LIBRARY_JS_PATH);
// Assetic cache folder.
$app['assetic.path_to_cache'] = $app['temp.path'].'assetic';
@ -66,30 +67,28 @@ if ($app['assetic.enabled']) {
$css_path = api_get_path(SYS_CSS_PATH);
$app['assetic.input.path_to_css'] = array(
api_get_path(WEB_LIBRARY_PATH).'javascript/bootstrap/css/bootstrap.css',
$jsFolder.'bootstrap/css/bootstrap.css',
$css_path.'base.css',
$css_path.'base_chamilo.css',
$css_path.$app['app.theme'].'/default.css',
$css_path.'responsive.css',
// api_get_path(LIBRARY_PATH).'javascript/thickbox.css',
// api_get_path(LIBRARY_PATH).'javascript/chosen/chosen.css',
$css_path.$app['app.theme'].'/learnpath.css',
$css_path.$app['app.theme'].'/scorm.css',
api_get_path(LIBRARY_PATH).'javascript/chat/css/chat.css',
api_get_path(LIBRARY_PATH).'javascript/jquery-ui/'.$app['jquery_ui_theme'].'/jquery-ui-custom.css',
api_get_path(LIBRARY_PATH).'javascript/jquery-ui/default.css',
$jsFolder.'chat/css/chat.css',
$jsFolder.'jquery-ui/'.$app['jquery_ui_theme'].'/jquery-ui-custom.css',
$jsFolder.'jquery-ui/default.css',
//api_get_path(LIBRARY_PATH).'javascript/bxslider/bx_styles/bx_styles.css',
);
$app['assetic.output.path_to_css'] = 'css/'.$app['app.theme'].'/style.css';
$app['assetic.input.path_to_js'] = array(
api_get_path(LIBRARY_PATH).'javascript/modernizr.js',
api_get_path(LIBRARY_PATH).'javascript/jquery.js',
$jsFolder.'javascript/modernizr.js',
$jsFolder.'javascript/jquery.js',
//api_get_path(LIBRARY_PATH).'javascript/chosen/chosen.jquery.min.js',
api_get_path(LIBRARY_PATH).'javascript/jquery-ui/css/'.$app['jquery_ui_theme'].'/jquery-ui-custom.min.js',
$jsFolder.'javascript/jquery-ui/css/'.$app['jquery_ui_theme'].'/jquery-ui-custom.min.js',
//api_get_path(LIBRARY_PATH).'javascript/thickbox.js',
api_get_path(LIBRARY_PATH).'javascript/bootstrap/bootstrap.js',
$jsFolder.'javascript/bootstrap/bootstrap.js',
//api_get_path(LIBRARY_PATH).'javascript/bxslider/jquery.bxSlider.min.js',
);

Loading…
Cancel
Save