Replacing <img> with WEB_IMG_PATH and Display::return_icon see BT#6903

1.10.x
Julio Montoya 11 years ago
parent 2da43b751a
commit 8b7c976686
  1. 17
      main/admin/special_exports.php
  2. 6
      main/auth/openid/login.php
  3. 49
      main/calendar/agenda.inc.php
  4. 10
      main/calendar/agenda_js.php
  5. 1
      main/calendar/allagendas.php
  6. 11
      main/coursecopy/classes/CourseSelectForm.class.php
  7. 2
      main/document/create_document.php
  8. 3
      main/document/document.php
  9. 8
      main/gradebook/index.php
  10. 42
      main/gradebook/lib/fe/scoredisplayform.class.php
  11. 12
      main/inc/lib/agenda.lib.php
  12. 12
      main/inc/lib/api.lib.php
  13. 223
      main/inc/lib/blog.lib.php
  14. 2
      main/inc/lib/course.lib.php
  15. 24
      main/inc/lib/display.lib.php
  16. 4
      main/inc/lib/exercise.lib.php
  17. 10
      main/inc/lib/grade_model.lib.php
  18. 12
      main/inc/lib/group_portal_manager.lib.php
  19. 5
      main/inc/lib/page.lib.php
  20. 6
      main/inc/lib/pear/HTML/QuickForm/advmultiselect.php
  21. 4
      main/inc/lib/search/search_widget.php
  22. 4
      main/inc/lib/search/tool_processors/document_processor.class.php
  23. 3
      main/inc/lib/search/tool_processors/link_processor.class.php
  24. 6
      main/inc/lib/search/tool_processors/quiz_processor.class.php
  25. 4
      main/inc/lib/social.lib.php
  26. 4
      main/inc/lib/upload.xajax.php
  27. 4
      main/inc/lib/usergroup.lib.php
  28. 16
      main/inc/lib/usermanager.lib.php
  29. 4
      main/mySpace/access_details.php
  30. 7
      main/mySpace/myStudents.php
  31. 8
      main/mySpace/student.php
  32. 8
      main/newscorm/learnpath.class.php
  33. 16
      main/newscorm/lp_add.php
  34. 12
      main/newscorm/lp_add_category.php
  35. 3
      main/newscorm/lp_add_item.php
  36. 2
      main/newscorm/lp_edit.php
  37. 25
      main/newscorm/lp_list.php
  38. 7
      main/newscorm/lp_list_search.php
  39. 52
      main/newscorm/lp_stats.php
  40. 24
      main/newscorm/resourcelinker.php
  41. 6
      main/permissions/blog_permissions.inc.php
  42. 13
      main/permissions/group_permissions.inc.php
  43. 19
      main/permissions/permissions_functions.inc.php
  44. 11
      main/permissions/user_permissions.inc.php
  45. 165
      main/resourcelinker/resourcelinker.inc.php
  46. 28
      main/resourcelinker/resourcelinker.php
  47. 23
      main/social/friends.php
  48. 2
      main/social/group_topics.php
  49. 4
      main/social/groups.php
  50. 6
      main/social/profile.php
  51. 2
      main/social/search.php
  52. 22
      main/survey/survey.lib.php
  53. 8
      main/survey/survey.php
  54. 6
      main/template/default/admin/session_manager/role_index.tpl
  55. 18
      main/template/default/layout/breadcrumb.tpl
  56. 3
      main/template/default/layout/footer.tpl
  57. 2
      main/template/default/layout/main_header.tpl
  58. 132
      main/template/default/link/index.tpl
  59. 14
      main/template/default/userportal/course_item.tpl
  60. 1
      main/upload/form.scorm.php
  61. 4
      main/user/class.php
  62. 20
      main/work/work.lib.php
  63. 6
      main/work/work.php
  64. 4
      plugin/search_course/lib/search_course_widget.class.php
  65. 8
      web/ChamiloLMS/js/thickbox.js
  66. 4
      web/ChamiloLMS/js/upload.js

@ -12,7 +12,6 @@
$language_file = array('admin');
// including the global file
$cidReset = true;
require_once '../inc/global.inc.php';
// setting the section (for the tabs)
$this_section = SECTION_PLATFORM_ADMIN;
// setting breadcrumbs
@ -22,12 +21,12 @@ api_protect_admin_script(true);
$nameTools = get_lang('SpecialExports');
// include additional libraries
require_once '../document/document.inc.php';
require_once api_get_path(SYS_CODE_PATH).'document/document.inc.php';
// include additional libraries
require_once '../coursecopy/classes/CourseBuilder.class.php';
require_once '../coursecopy/classes/CourseArchiver.class.php';
require_once '../coursecopy/classes/CourseRestorer.class.php';
require_once '../coursecopy/classes/CourseSelectForm.class.php';
require_once api_get_path(SYS_CODE_PATH).'coursecopy/classes/CourseBuilder.class.php';
require_once api_get_path(SYS_CODE_PATH).'coursecopy/classes/CourseArchiver.class.php';
require_once api_get_path(SYS_CODE_PATH).'coursecopy/classes/CourseRestorer.class.php';
require_once api_get_path(SYS_CODE_PATH).'coursecopy/classes/CourseSelectForm.class.php';
if (function_exists('ini_set')) {
api_set_memory_limit('256M');
@ -260,9 +259,9 @@ function fullexportspecial(){
$query_session_doc = Database::query($sql_session_doc);
while ($rows_course_session_file = Database::fetch_assoc($query_session_doc)) {
$zip_folder->add($FileZip['PATH_COURSE'].$_course['directory'].'/document'.$rows_course_session_file['path'],
PCLZIP_OPT_ADD_PATH, $_course['directory']."/".$rows_session['name'],
PCLZIP_OPT_REMOVE_PATH, $FileZip['PATH_COURSE'].$_course['directory'].'/document'.$FileZip['PATH_REMOVE']
);
PCLZIP_OPT_ADD_PATH, $_course['directory']."/".$rows_session['name'],
PCLZIP_OPT_REMOVE_PATH, $FileZip['PATH_COURSE'].$_course['directory'].'/document'.$FileZip['PATH_REMOVE']
);
}
}
}

@ -22,12 +22,6 @@ function openid_form() {
$form->addElement('text', 'openid_url', array(get_lang('OpenIDURL'), Display::url(get_lang('OpenIDWhatIs'), 'main/auth/openid/whatis.php')), array('class' => 'openid_input'));
$form->addElement('button', 'submit', get_lang('Login'));
return $form->return_form();
/*
return '<label for="openid_url">'.get_lang('OpenIDURL').' <a href="main/auth/openid/whatis.php" title="'.get_lang('OpenIDWhatIs').'">'.Display::return_icon('info3.gif',get_lang('Info')).'</a></label>
<input type="text" id="openid_url" name="openid_url" style="background: url(main/img/openid_small_logo.png) no-repeat; background-color: #fff; background-position: 0 50%; padding-left:18px;" value="http://"></input>
* <input type="submit" name="openid_login" value="'.get_lang('Enter').'" /><br /><br /></form></div>';
*
*/
}
/**

@ -291,9 +291,6 @@ function selectAll(cbList,bSelect,showwarning) {
}
document.new_calendar_item.submit();
}
}
function reverseAll(cbList)
@ -305,34 +302,6 @@ function reverseAll(cbList)
}
}
function plus_attachment() {
if (document.getElementById('options').style.display == 'none') {
document.getElementById('options').style.display = 'block';
document.getElementById('plus').innerHTML='&nbsp;".$hideImg."&nbsp;".get_lang(
'AddAnAttachment'
)."';
} else {
document.getElementById('options').style.display = 'none';
document.getElementById('plus').innerHTML='&nbsp;".$showImg."&nbsp;".get_lang(
'AddAnAttachment'
)."';
}
}
function plus_repeated_event() {
if (document.getElementById('options2').style.display == 'none') {
document.getElementById('options2').style.display = 'block';
document.getElementById('plus2').innerHTML='&nbsp;".$hideImg."&nbsp;".get_lang(
'RepeatEvent'
)."';
} else {
document.getElementById('options2').style.display = 'none';
document.getElementById('plus2').innerHTML='&nbsp;".$showImg."&nbsp;".get_lang(
'RepeatEvent'
)."';
}
}
/*
function plus_ical() {
if (document.getElementById('icalform').style.display == 'none') {
@ -802,7 +771,6 @@ function display_courseadmin_links($filter = 0)
}
$form = null;
if (!isset($_GET['action'])) {
$form = show_to($filter, 'selected_form_id_search');
$actions = "<a href='agenda_js.php?type=course&".api_get_cidreq()."'>".Display::return_icon('calendar_na.png', get_lang('Agenda'), '', ICON_SIZE_MEDIUM)."</a>";
} else {
$actions = "<a href='agenda_js.php?type=course&".api_get_cidreq()."'>".Display::return_icon('calendar.png', get_lang('Agenda'), '', ICON_SIZE_MEDIUM)."</a>";
@ -1356,10 +1324,6 @@ function display_one_agenda_item($agenda_id)
// a coach can only delete an element belonging to his session
// DISPLAY: edit delete button (course admin only)
$export_icon = '../img/export.png';
$export_icon_low = '../img/export_low_fade.png';
$export_icon_high = '../img/export_high_fade.png';
echo '<th style="text-align:right">';
if (!$repeat && api_is_allowed_to_edit(false, true)) {
// edit
@ -1603,14 +1567,8 @@ function show_add_form($id = '', $type = null)
// Repeating the calendar item
if (empty($id)) {
$form->addElement('label', null, '
<a href="javascript://" onclick="return plus_repeated_event();">
<span id="plus2">
'.$showImg.'&nbsp;'.get_lang('RepeatEvent').'
</span></a>'
);
$form->addElement('html', '<div id="options2" style="display:none">');
$form->addElement('label', null, Display::url(get_lang('RepeatEvent'), '#', array('id' => 'repeat', 'class' => 'advanced_options')));
$form->addElement('html', '<div id="repeat_options" style="display:none">');
$form->addElement('checkbox', 'repeat', null, get_lang('RepeatEvent'));
$options = array(
@ -1619,8 +1577,7 @@ function show_add_form($id = '', $type = null)
'monthlyByDate' => get_lang('RepeatMonthlyByDate'),
//'monthlyByDay' => get_lang('RepeatMonthlyByDay'),
//'monthlyByDayR' => get_lang('RepeatMonthlyByDayR'),
'yearly' => get_lang('RepeatYearly'),
'yearly' => get_lang('RepeatYearly')
);
$form->addElement('select', 'repeat_type', get_lang('RepeatType'), $options);

@ -132,12 +132,7 @@ if ($region_value == 'en') {
}
$tpl->assign('region_value', $region_value);
$export_icon = '../img/export.png';
$export_icon_low = '../img/export_low_fade.png';
$export_icon_high = '../img/export_high_fade.png';
$tpl->assign('export_ical_confidential_icon', Display::return_icon($export_icon_high, get_lang('ExportiCalConfidential')));
$tpl->assign('export_ical_confidential_icon', Display::return_icon('export.png', get_lang('ExportiCalConfidential')));
$actions = null;
if (api_is_allowed_to_edit(false,true) OR (api_get_course_setting('allow_user_edit_agenda') && !api_is_anonymous()) && api_is_allowed_to_session_edit(false,true) OR $is_group_tutor) {
@ -207,9 +202,7 @@ $form->addElement('label', get_lang('Title'), '<div id="simple_title"></div>');
$form->addElement('label', get_lang('Description'), '<div id="simple_content"></div>');
$tpl->assign('form_simple', $form->return_form());
$form = new FormValidator('add_event_form', null, null);
if (!empty($select)) {
$form->addElement(
'label',
@ -241,7 +234,6 @@ $form->addElement(
);
if ($type == 'course') {
$form->addElement('html', '<div id="add_as_announcement_div">');
$form->addElement('checkbox', 'add_as_annonuncement', array(null, null, get_lang('AddAsAnnouncement').' ('.get_lang('SendEmail').')'));
$form->addElement('html', '</div>');

@ -350,7 +350,6 @@ if (isset ($_user['user_id'])) {
echo '</td>';
// the divider
// OlivierB : the image has a white background, which causes trouble if the portal has another background color. Image should be transparent. ----> echo "<td width=\"20\" background=\"../img/verticalruler.gif\">&nbsp;</td>";
echo "<td width=\"20\">&nbsp;</td>";
// the main area: day, week, month view
echo '<td valign="top">';

@ -142,9 +142,8 @@ class CourseSelectForm
echo '</h3>';
}
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 '<form method="post" id="upload_form" name="course_select_form" onsubmit="javascript: myUpload.start(\'dynamic_div\', \'\' ,\''.get_lang('PleaseStandBy', '').'\',\'upload_form\')">';
echo '<input type="hidden" name="action" value="course_select_form"/>';
if (!empty($hidden_fields['destination_course']) && !empty($hidden_fields['origin_course']) && !empty($hidden_fields['destination_session']) && !empty($hidden_fields['origin_session']) ) {
echo '<input type="hidden" name="destination_course" value="'.$hidden_fields['destination_course'].'"/>';
echo '<input type="hidden" name="origin_course" value="'.$hidden_fields['origin_course'].'"/>';
@ -562,8 +561,8 @@ class CourseSelectForm
</script>
<?php
//get destination course title
if(!empty($hidden_fields['destination_course'])) {
// Get destination course title
if (!empty($hidden_fields['destination_course'])) {
$course_infos = CourseManager::get_course_information($hidden_fields['destination_course']);
echo '<h3>';
echo get_lang('DestinationCourse').' : '.$course_infos['title'];
@ -571,13 +570,13 @@ class CourseSelectForm
}
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 '<form method="post" id="upload_form" name="course_select_form" onsubmit="myUpload.start(\'dynamic_div\',\'\',\''.get_lang('PleaseStandBy').'\',\'upload_form\')">';
echo '<input type="hidden" name="action" value="course_select_form"/>';
foreach ($list_course as $course){
foreach ($course->resources as $type => $resources) {
if (count($resources) > 0) {
echo '<img id="img_'.$course->code.'" src="'.$iconPath.'1.gif" onclick="javascript:exp('."'$course->code'".');" />';
echo '<b onclick="javascript:exp('."'$course->code'".');" > '.$course->code.'</b><br />';
echo '<b onclick="javascript:exp('."'$course->code'".');" > '.$course->code.'</b><br />';
echo '<div id="div_'.$course->code.'">';
echo '<blockquote>';

@ -26,7 +26,6 @@ var hide_bar = function() {
$("#template_col").hide();
$("#doc_form").removeClass("span9");
$("#doc_form").addClass("span11");
//$("#hide_bar_template").css({"background-image" : \'url("../img/hide2.png")\'})
}
$(document).ready(function() {
@ -41,7 +40,6 @@ $(document).ready(function() {
$("#template_col").show();
$("#doc_form").removeClass("span11");
$("#doc_form").addClass("span9");
//$(this).css("background-image", \'url("../img/hide0.png")\');
}
);
});

@ -354,7 +354,8 @@ if (isset($_GET['curdirpath']) && $_GET['curdirpath'] == '/certificates' && isse
Display::display_reduced_header();
echo '<style>body {background:none;}</style><style media="print" type="text/css"> #print_div { visibility:hidden; } </style>';
echo '<a href="javascript:window.print();" style="float:right; padding:4px;" id="print_div"><img src="../img/printmgr.gif" alt="'.get_lang('Print').'"/>'.get_lang('Print').'</a>';
echo '<a href="javascript:window.print();" style="float:right; padding:4px;" id="print_div">';
echo Display::return_icon('printmgr.gif', get_lang('Print')).' '.get_lang('Print').'</a>';
if (is_file($qr_code_filename) && is_readable($qr_code_filename)) {
$new_content_html = str_replace('((certificate_barcode))', Display::img($qr_code_web_filename), $new_content_html);
}

@ -46,8 +46,8 @@ $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";
var show_icon = "'.api_get_path(WEB_IMG_PATH).'view_more_stats.gif";
var hide_icon = "'.api_get_path(WEB_IMG_PATH).'view_less_stats.gif";
$(document).ready(function() {
@ -66,10 +66,6 @@ $(document).ready(function() {
$(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]];

@ -22,12 +22,12 @@ class ScoreDisplayForm extends FormValidator
parent :: __construct($form_name, 'post', $action);
$displayscore = ScoreDisplay :: instance();
$customdisplays = $displayscore->get_custom_score_display_settings();
$nr_items = (count($customdisplays)!='0') ? count($customdisplays) : '1';
$this->setDefaults(array (
'scorecolpercent' => $displayscore->get_color_split_value()
$this->setDefaults(array (
'scorecolpercent' => $displayscore->get_color_split_value()
));
$this->addElement('hidden', 'maxvalue', '100');
$this->addElement('hidden', 'minvalue', '0');
$counter= 1;
@ -46,20 +46,20 @@ class ScoreDisplayForm extends FormValidator
$scorecol = array();
//settings for the colored score
$this->addElement('header', get_lang('ScoreEdit'));
if ($displayscore->is_coloring_enabled()) {
$this->addElement('html', '<b>' . get_lang('ScoreColor') . '</b>');
$this->addElement('header', get_lang('ScoreEdit'));
if ($displayscore->is_coloring_enabled()) {
$this->addElement('html', '<b>' . get_lang('ScoreColor') . '</b>');
$this->addElement('text', 'scorecolpercent', array(get_lang('Below'), get_lang('WillColorRed'), '%'), array (
'size' => 5,
'maxlength' => 5,
'class'=>'span1',
));
if (api_get_setting('teachers_can_change_score_settings') != 'true') {
if (api_get_setting('teachers_can_change_score_settings') != 'true') {
$this->freeze('scorecolpercent');
}
$this->addRule('scorecolpercent', get_lang('OnlyNumbers'), 'numeric');
$this->addRule(array('scorecolpercent','maxvalue'), get_lang('Over100'), 'compare', '<=');
$this->addRule(array('scorecolpercent','minvalue'), get_lang('UnderMin'), 'compare', '>');
@ -67,8 +67,8 @@ class ScoreDisplayForm extends FormValidator
//Settings for the scoring system
if ($displayscore->is_custom()) {
$this->addElement('html', '<br /><b>' . get_lang('ScoringSystem') . '</b>');
if ($displayscore->is_custom()) {
$this->addElement('html', '<br /><b>' . get_lang('ScoringSystem') . '</b>');
$this->addElement('static', null, null, get_lang('ScoreInfo'));
$scorenull[]= & $this->CreateElement('static', null, null, get_lang('Between'));
$this->setDefaults(array (
@ -86,17 +86,21 @@ class ScoreDisplayForm extends FormValidator
$elementTemplateTwoLabel =
'<div id=' . $counter . ' style="display: '.(($counter<=$nr_items)?'inline':'none').';" class="control-group">
<p><!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->
<label class="control-label">{label}</label>
<div class="controls"><!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error --> <br/>&nbsp<b>'.get_lang('And').'</b>&nbsp&nbsp&nbsp&nbsp&nbsp{element}&nbsp%&nbsp&nbsp=';
$elementTemplateTwoLabel2 =
'<!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error -->&nbsp{element}
<a href="javascript:plusItem(' . ($counter+1) . ')"><img style="display: '.(($counter>=$nr_items)?'inline':'none').';" id="plus-' . ($counter+1) . '" src="../img/icons/22/add.png" alt="'.get_lang('Add').'" title="'.get_lang('Add').'"></img></a>
<a href="javascript:minItem(' . ($counter) . ')"><img style="display: '.(($counter>=$nr_items && $counter!=1)?'inline':'none').';" id="min-' . $counter . '" src="../img/delete.png" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'"></img></a>
<a href="javascript:plusItem('.($counter+1).')">
<img style="display: '.(($counter>=$nr_items)?'inline':'none').';" id="plus-' . ($counter+1) . '" src="'.api_get_path(WEB_IMG_PATH).'icons/22/add.png" alt="'.get_lang('Add').'" title="'.get_lang('Add').'"/>
</a>
<a href="javascript:minItem(' . ($counter) . ')">
<img style="display: '.(($counter>=$nr_items && $counter!=1)?'inline':'none').';" id="min-' . $counter . '" src="'.api_get_path(WEB_IMG_PATH).'delete.png" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'"/>
</a>
</div></p></div>';
$scorebetw= array ();
$scorebetw= array();
$this->addElement('text', 'endscore[' . $counter . ']', null, array (
'size' => 5,
'maxlength' => 5,
@ -116,11 +120,11 @@ class ScoreDisplayForm extends FormValidator
$this->addRule(array ('endscore[' . $counter . ']', 'minvalue'), get_lang('UnderMin'), 'compare', '>');
}
}
if ($displayscore->is_custom())
$this->addElement('style_submit_button', 'submit', get_lang('Ok'),'class="save"');
}
function validate() {
return parent :: validate();
}

@ -1069,16 +1069,8 @@ class Agenda
$form->addElement('text', 'end_date', get_lang('EndDate'));
if (empty($id)) {
$form->addElement(
'advanced_settings',
'<a href="javascript://" onclick="return plus_repeated_event();"><span id="plus2">
<img style="vertical-align:middle;" src="../img/div_show.gif" alt="" />&nbsp;'.get_lang(
'RepeatEvent'
).'</span>
</a>'
);
$form->addElement('html', '<div style="display:block">');
$form->addElement('label', null, Display::url(get_lang('RepeatEvent'), '#', array('id' => 'repeat', 'class' => 'advanced_options')));
$form->addElement('html', '<div id="repeat_options" style="display:block">');
$form->addElement('checkbox', 'repeat', null, get_lang('RepeatEvent'));
$repeat_events = array(

@ -523,7 +523,7 @@ define('TOOL_ADMIN_VISIBLE', 'tooladminvisible');
* api_get_path(WEB_CODE_PATH) http://www.mychamilo.org/chamilo/main/
* api_get_path(WEB_PLUGIN_PATH) http://www.mychamilo.org/chamilo/plugin/
* api_get_path(WEB_ARCHIVE_PATH) http://www.mychamilo.org/chamilo/archive/
* api_get_path(WEB_IMG_PATH) http://www.mychamilo.org/chamilo/main/img/
* api_get_path(WEB_IMG_PATH) http://www.mychamilo.org/chamilo/web/chamiloLMS/img/
* api_get_path(SYS_IMG_PATH) /var/www/chamilo/web/ChamiloLMS/img/
*
* api_get_path(WEB_CSS_PATH) http://www.mychamilo.org/chamilo/main/css/
@ -678,7 +678,7 @@ function api_get_path($path_type, $path = null) {
$paths[SYS_TEMPLATE_PATH] = $paths[SYS_CODE_PATH].$paths[SYS_TEMPLATE_PATH];
$paths[SYS_CSS_PATH] = $paths[SYS_PATH].$paths[SYS_CSS_PATH];
$paths[WEB_CSS_PATH] = $paths[WEB_PATH].$paths[WEB_CSS_PATH];
$paths[WEB_IMG_PATH] = $paths[WEB_PATH].$paths[WEB_IMG_PATH];
$paths[WEB_IMG_PATH] = $paths[WEB_CODE_PATH].$paths[WEB_IMG_PATH];
$paths[SYS_IMG_PATH] = $paths[SYS_PATH].$paths[SYS_IMG_PATH];
$paths[WEB_LIBRARY_PATH] = $paths[WEB_CODE_PATH].$paths[WEB_LIBRARY_PATH];
@ -689,7 +689,7 @@ function api_get_path($path_type, $path = null) {
$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[SYS_LIBRARY_JS_PATH] = $paths[SYS_PATH].$paths[SYS_LIBRARY_JS_PATH];
$paths[CONFIGURATION_PATH] = $paths[SYS_CODE_PATH].$paths[CONFIGURATION_PATH];
$is_this_function_initialized = true;
@ -1233,9 +1233,9 @@ function api_format_user($user, $add_password = false) {
//Getting user avatar
$picture_filename = trim($user['picture_uri']);
$avatar = api_get_path(WEB_CODE_PATH).'img/unknown.jpg';
$avatar_small = api_get_path(WEB_CODE_PATH).'img/unknown_22.jpg';
$avatar_sys_path = api_get_path(SYS_CODE_PATH).'img/unknown.jpg';
$avatar = api_get_path(WEB_IMG_PATH).'unknown.jpg';
$avatar_small = api_get_path(WEB_IMG_PATH).'unknown_22.jpg';
$avatar_sys_path = api_get_path(SYS_IMG_PATH).'unknown.jpg';
$dir = 'upload/users/'.$user_id.'/';
if (!empty($picture_filename)) {

@ -850,7 +850,7 @@ class Blog
array('title' => $username)
).' - <a href="blog.php?action=view_post&amp;blog_id='.$blog_id.'&amp;post_id='.$blog_post['post_id'].'#add_comment" title="'.get_lang(
'ReadPost'
).'" >'.get_lang('Comments').': '.$blog_post_comments['number_of_comments'].'</a></span>'."\n";
).'" >'.get_lang('Comments').': '.$blog_post_comments['number_of_comments'].'</a></span>';
echo '</div>';
}
} else {
@ -951,7 +951,7 @@ class Blog
if (api_is_allowed('BLOG_'.$blog_id, 'article_edit', $task_id)) {
$blog_post_actions .= '<a href="blog.php?action=edit_post&amp;blog_id='.$blog_id.'&amp;post_id='.$post_id.'&amp;article_id='.$blog_post['post_id'].'&amp;task_id='.$task_id.'" title="'.get_lang(
'EditThisPost'
).'"><img src="../img/edit.gif" /></a>';
).'">'.Display::return_icon('edit.png').'</a>';
}
if (api_is_allowed('BLOG_'.$blog_id, 'article_delete', $task_id)) {
@ -959,7 +959,7 @@ class Blog
'DeleteThisArticle'
).'" onclick="javascript:if(!confirm(\''.addslashes(
api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset)
).'\')) return false;"><img src="../img/delete.gif" border="0" /></a>';
).'\')) return false;">'.Display::return_icon('delete.png').'</a>';
}
if (api_is_allowed('BLOG_'.$blog_id, 'article_rate')) {
@ -1192,7 +1192,7 @@ class Blog
'DeleteThisComment'
).'" onclick="javascript:if(!confirm(\''.addslashes(
api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset)
).'\')) return false;"><img src="../img/delete.gif" border="0" /></a>';
).'\')) return false;">'.Display::return_icon('delete.png').'</a>';
}
if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_rate')) {
$rating_select = Blog::display_rating_form('comment', $blog_id, $post_id, $comment['comment_id']);
@ -1350,14 +1350,10 @@ class Blog
global $color2;
echo '<div class="actions">';
echo '<a href="'.api_get_self(
).'?action=manage_tasks&amp;blog_id='.$blog_id.'&amp;do=add"><img src="../img/blog_newtasks.gif" border="0" align="middle" alt="'.get_lang(
'AddTasks'
).'" />'.get_lang('AddTasks').'</a> ';
echo '<a href="'.api_get_self(
).'?action=manage_tasks&amp;blog_id='.$blog_id.'&amp;do=assign"><img src="../img/blog_task.gif" border="0" align="middle" alt="'.get_lang(
'AssignTasks'
).'" />'.get_lang('AssignTasks').'</a>';
echo '<a href="'.api_get_self().'?action=manage_tasks&amp;blog_id='.$blog_id.'&amp;do=add">'.
Display::return_icon('blog_newtasks.gif', get_lang('AddTasks')).' '.get_lang('AddTasks').'</a> ';
echo '<a href="'.api_get_self().'?action=manage_tasks&amp;blog_id='.$blog_id.'&amp;do=assign">'.
Display::return_icon('blog_task.gif', get_lang('AssignTasks')).''.get_lang('AssignTasks').'</a>';
?>
<a href="<?php echo api_get_self(); ?>?action=manage_rights&amp;blog_id=<?php echo $blog_id ?>"
title="<?php echo get_lang('ManageRights') ?>"><?php echo Display::return_icon(
@ -1372,11 +1368,11 @@ class Blog
echo '<span class="blogpost_title">'.get_lang('TaskList').'</span><br />';
echo "<table class=\"data_table\">";
echo "<tr bgcolor=\"$color2\" align=\"center\" valign=\"top\">",
"<th width='240'><b>", get_lang('Title'), "</b></th>\n",
"<th><b>", get_lang('Description'), "</b></th>\n",
"<th><b>", get_lang('Color'), "</b></th>\n",
"<th width='50'><b>", get_lang('Modify'), "</b></th>\n",
"</tr>\n";
"<th width='240'><b>", get_lang('Title'), "</b></th>",
"<th><b>", get_lang('Description'), "</b></th>",
"<th><b>", get_lang('Color'), "</b></th>",
"<th width='50'><b>", get_lang('Modify'), "</b></th>",
"</tr>";
$sql = " SELECT
@ -1409,14 +1405,12 @@ class Blog
'<td>'.Security::remove_XSS($task['description']).'</td>',
'<td><span style="background-color: #'.$task['color'].'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>',
'<td width="50">',
'<a href="'.api_get_self(
).'?action=manage_tasks&amp;blog_id='.$task['blog_id'].'&amp;do=edit&amp;task_id='.$task['task_id'].'">',
'<img src="../img/edit.gif" border="0" title="'.get_lang('EditTask').'" />',
"</a>\n",
'<a href="'.$delete_link.'"',
$delete_confirm,
'><img src="../img/'.$delete_icon.'" border="0" title="'.$delete_title.'" />',
"</a>\n",
'<a href="'.api_get_self().'?action=manage_tasks&amp;blog_id='.$task['blog_id'].'&amp;do=edit&amp;task_id='.$task['task_id'].'">',
Display::return_icon('edit.png', get_lang('EditTask')),
"</a>",
'<a href="'.$delete_link.'"', $delete_confirm,'>
'.Display::return_icon($delete_icon, $delete_title).
"</a>",
'</td>',
'</tr>';
}
@ -1442,11 +1436,11 @@ class Blog
echo '<span class="blogpost_title">'.get_lang('AssignedTasks').'</span><br />';
echo "<table class=\"data_table\">";
echo "<tr bgcolor=\"$color2\" align=\"center\" valign=\"top\">",
"<th width='240'><b>", get_lang('Member'), "</b></th>\n",
"<th><b>", get_lang('Task'), "</b></th>\n",
"<th><b>", get_lang('Description'), "</b></th>\n",
"<th><b>", get_lang('TargetDate'), "</b></th>\n",
"<th width='50'><b>", get_lang('Modify'), "</b></th>\n",
"<th width='240'><b>", get_lang('Member'), "</b></th>",
"<th><b>", get_lang('Task'), "</b></th>",
"<th><b>", get_lang('Description'), "</b></th>",
"<th><b>", get_lang('TargetDate'), "</b></th>",
"<th width='50'><b>", get_lang('Modify'), "</b></th>",
"</tr>";
$course_id = api_get_course_int_id();
@ -1484,17 +1478,16 @@ class Blog
'<td>'.stripslashes($assignment['description']).'</td>',
'<td>'.$assignment['target_date'].'</td>',
'<td width="50">',
'<a href="'.api_get_self(
).'?action=manage_tasks&amp;blog_id='.$assignment['blog_id'].'&amp;do=edit_assignment&amp;task_id='.$assignment['task_id'].'&amp;user_id='.$assignment['user_id'].'">',
'<img src="../img/edit.gif" border="0" title="'.get_lang('EditTask').'" />',
"</a>\n",
'<a href="'.api_get_self().'?action=manage_tasks&amp;blog_id='.$assignment['blog_id'].'&amp;do=edit_assignment&amp;task_id='.$assignment['task_id'].'&amp;user_id='.$assignment['user_id'].'">',
Display::return_icon('edit.png', get_lant('EditTask')),
"</a>",
'<a href="'.api_get_self(
).'?action=manage_tasks&amp;blog_id='.$assignment['blog_id'].'&amp;do=delete_assignment&amp;task_id='.$assignment['task_id'].'&amp;user_id='.$assignment['user_id'].'" ',
'onclick="javascript:if(!confirm(\''.addslashes(
api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset)
).'\')) return false;"',
'<img src="../img/'.$delete_icon.'" border="0" title="'.$delete_title.'" />',
"</a>\n",
Display::return_icon($delete_icon, $delete_title),
"</a>",
'</td>',
'</tr>';
}
@ -1560,25 +1553,25 @@ class Blog
</label>
<div class="controls">';
echo "\t\t\t".'<table class="data_table" cellspacing="0" style="border-collapse:collapse; width:446px;">';
echo "\t\t\t\t".'<tr>'."\n";
echo "\t\t\t\t\t".'<th colspan="2" style="width:223px;">'.get_lang('ArticleManager').'</th>'."\n";
echo "\t\t\t\t\t".'<th width:223px;>'.get_lang('CommentManager').'</th>'."\n";
echo "\t\t\t\t".'</tr>'."\n";
echo "\t\t\t\t".'<tr>'."\n";
echo "\t\t\t\t".'<tr>'."";
echo "\t\t\t\t\t".'<th colspan="2" style="width:223px;">'.get_lang('ArticleManager').'</th>'."";
echo "\t\t\t\t\t".'<th width:223px;>'.get_lang('CommentManager').'</th>'."";
echo "\t\t\t\t".'</tr>'."";
echo "\t\t\t\t".'<tr>'."";
echo "\t\t\t\t\t".'<th style="width:111px;"><label for="articleDelete">'.get_lang(
'Delete'
).'</label></th>'."\n";
echo "\t\t\t\t\t".'<th style="width:112px;"><label for="articleEdit">'.get_lang('Edit').'</label></th>'."\n";
).'</label></th>'."";
echo "\t\t\t\t\t".'<th style="width:112px;"><label for="articleEdit">'.get_lang('Edit').'</label></th>'."";
echo "\t\t\t\t\t".'<th style="width:223px;"><label for="commentsDelete">'.get_lang(
'Delete'
).'</label></th>'."\n";
echo "\t\t\t\t".'</tr>'."\n";
echo "\t\t\t\t".'<tr>'."\n";
echo "\t\t\t\t\t".'<td style="text-align:center;"><input id="articleDelete" name="chkArticleDelete" type="checkbox" /></td>'."\n";
echo "\t\t\t\t\t".'<td style="text-align:center;"><input id="articleEdit" name="chkArticleEdit" type="checkbox" /></td>'."\n";
echo "\t\t\t\t\t".'<td style="border:1px dotted #808080; text-align:center;"><input id="commentsDelete" name="chkCommentsDelete" type="checkbox" /></td>'."\n";
echo "\t\t\t\t".'</tr>'."\n";
echo "\t\t\t".'</table>'."\n";
).'</label></th>'."";
echo "\t\t\t\t".'</tr>'."";
echo "\t\t\t\t".'<tr>'."";
echo "\t\t\t\t\t".'<td style="text-align:center;"><input id="articleDelete" name="chkArticleDelete" type="checkbox" /></td>'."";
echo "\t\t\t\t\t".'<td style="text-align:center;"><input id="articleEdit" name="chkArticleEdit" type="checkbox" /></td>'."";
echo "\t\t\t\t\t".'<td style="border:1px dotted #808080; text-align:center;"><input id="commentsDelete" name="chkCommentsDelete" type="checkbox" /></td>'."";
echo "\t\t\t\t".'</tr>'."";
echo "\t\t\t".'</table>'."";
echo ' </div>
</div>';
@ -1671,42 +1664,42 @@ class Blog
$arrPermissions[] = $row['action'];
}
echo "\t".'<tr>'."\n";
echo "\t".'<tr>'."";
echo "\t\t".'<td style="text-align:right; vertical-align:top;">'.get_lang(
'TaskManager'
).':&nbsp;&nbsp;</td>'."\n";
echo "\t\t".'<td>'."\n";
).':&nbsp;&nbsp;</td>'."";
echo "\t\t".'<td>'."";
echo "\t\t\t".'<table class="data_table" cellspacing="0" style="border-collapse:collapse; width:446px;">';
echo "\t\t\t\t".'<tr>'."\n";
echo "\t\t\t\t\t".'<th colspan="2" style="width:223px;">'.get_lang('ArticleManager').'</th>'."\n";
echo "\t\t\t\t\t".'<th width:223px;>'.get_lang('CommentManager').'</th>'."\n";
echo "\t\t\t\t".'</tr>'."\n";
echo "\t\t\t\t".'<tr>'."\n";
echo "\t\t\t\t".'<tr>'."";
echo "\t\t\t\t\t".'<th colspan="2" style="width:223px;">'.get_lang('ArticleManager').'</th>'."";
echo "\t\t\t\t\t".'<th width:223px;>'.get_lang('CommentManager').'</th>'."";
echo "\t\t\t\t".'</tr>'."";
echo "\t\t\t\t".'<tr>'."";
echo "\t\t\t\t\t".'<th style="width:111px;"><label for="articleDelete">'.get_lang(
'Delete'
).'</label></th>'."\n";
echo "\t\t\t\t\t".'<th style="width:112px;"><label for="articleEdit">'.get_lang('Edit').'</label></th>'."\n";
).'</label></th>'."";
echo "\t\t\t\t\t".'<th style="width:112px;"><label for="articleEdit">'.get_lang('Edit').'</label></th>'."";
echo "\t\t\t\t\t".'<th style="width:223px;"><label for="commentsDelete">'.get_lang(
'Delete'
).'</label></th>'."\n";
echo "\t\t\t\t".'</tr>'."\n";
echo "\t\t\t\t".'<tr>'."\n";
).'</label></th>';
echo "\t\t\t\t".'</tr>';
echo "\t\t\t\t".'<tr>';
echo "\t\t\t\t\t".'<td style="text-align:center;"><input '.((in_array(
'article_delete',
$arrPermissions
)) ? 'checked ' : '').'id="articleDelete" name="chkArticleDelete" type="checkbox" /></td>'."\n";
)) ? 'checked ' : '').'id="articleDelete" name="chkArticleDelete" type="checkbox" /></td>';
echo "\t\t\t\t\t".'<td style="text-align:center;"><input '.((in_array(
'article_edit',
$arrPermissions
)) ? 'checked ' : '').'id="articleEdit" name="chkArticleEdit" type="checkbox" /></td>'."\n";
)) ? 'checked ' : '').'id="articleEdit" name="chkArticleEdit" type="checkbox" /></td>';
echo "\t\t\t\t\t".'<td style="text-align:center;"><input '.((in_array(
'article_comments_delete',
$arrPermissions
)) ? 'checked ' : '').'id="commentsDelete" name="chkCommentsDelete" type="checkbox" /></td>'."\n";
echo "\t\t\t\t".'</tr>'."\n";
echo "\t\t\t".'</table>'."\n";
echo "\t\t".'</td>'."\n";
echo "\t".'</tr>'."\n";
)) ? 'checked ' : '').'id="commentsDelete" name="chkCommentsDelete" type="checkbox" /></td>';
echo "\t\t\t\t".'</tr>';
echo "\t\t\t".'</table>';
echo "\t\t".'</td>';
echo "\t".'</tr>';
/* end of edit */
echo '<tr>
@ -1835,8 +1828,7 @@ class Blog
}
}
echo '</select>
<select name="task_month">';
<select name="task_month">';
for ($i = 1; $i <= 12; $i++) {
// values need to have double digits
$value = ($i <= 9 ? "0".$i : $i);
@ -1848,16 +1840,17 @@ class Blog
}
}
echo '</select>
<select name="task_year">
<option value="'.($year - 1).'">'.($year - 1).'</option>
<option value="'.$year.'" selected> '.$year.' </option>';
<select name="task_year">
<option value="'.($year - 1).'">'.($year - 1).'</option>
<option value="'.$year.'" selected> '.$year.' </option>';
for ($i = 1; $i <= 5; $i++) {
$value = $year + $i;
echo "\t\t\t\t<option value=\"".$value."\">".$value."</option>\n";
echo "<option value=\"".$value."\">".$value."</option>";
}
echo '</select>
<a title="Kalender" href="javascript:openCalendar(\'assign_task\', \'task_\')"><img src="../img/calendar_select.gif" border="0" align="absmiddle"/></a>';
<a title="Kalender" href="javascript:openCalendar(\'assign_task\', \'task_\')">
'.Display::return_icon('calendar_select.gif').'
</a>';
echo ' </div>
</div>';
@ -2003,20 +1996,22 @@ class Blog
}
echo '</select>
<a title="Kalender" href="javascript:openCalendar(\'assign_task\', \'task_\')"><img src="../img/calendar_select.gif" border="0" align="absmiddle"/></a>
</td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<input type="hidden" name="action" value="" />
<input type="hidden" name="old_task_id" value="'.$task_id.'" />
<input type="hidden" name="old_user_id" value="'.$user_id.'" />
<input type="hidden" name="old_target_date" value="'.$old_date.'" />
<input type="hidden" name="assign_task_edit_submit" value="true" />
<td><br /><button class="save type="submit" name="Submit">'.get_lang('Ok').'</button></td>
</tr>
</table>
</form>';
<a title="Kalender" href="javascript:openCalendar(\'assign_task\', \'task_\')">
'.Display::return_icon('calendar_select.gif').'
</a>
</td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<input type="hidden" name="action" value="" />
<input type="hidden" name="old_task_id" value="'.$task_id.'" />
<input type="hidden" name="old_user_id" value="'.$user_id.'" />
<input type="hidden" name="old_target_date" value="'.$old_date.'" />
<input type="hidden" name="assign_task_edit_submit" value="true" />
<td><br /><button class="save type="submit" name="Submit">'.get_lang('Ok').'</button></td>
</tr>
</table>
</form>';
}
/**
@ -2636,31 +2631,21 @@ class Blog
if (is_array($tasks[$curday])) {
// Add tasks to calendar
foreach ($tasks[$curday] as $task) {
echo '<a href="blog.php?action=execute_task&amp;blog_id='.$task['blog_id'].'&amp;task_id='.stripslashes(
$task['task_id']
).'" title="'.$task['title'].' : '.get_lang(
'InBlog'
).' : '.$task['blog_name'].' - '.get_lang(
'ExecuteThisTask'
).'"><img src="../img/blog_task.gif" alt="Task" title="'.get_lang(
'ExecuteThisTask'
).'" /></a>';
echo '<a href="blog.php?action=execute_task&amp;blog_id='.$task['blog_id'].'&amp;task_id='.stripslashes($task['task_id']).'" title="'.$task['title'].' : '.get_lang('InBlog').' : '.$task['blog_name'].' - '.get_lang('ExecuteThisTask').'">'.
Display::return_icon('blog_task.gif', get_lant('ExecuteThisTask')).'
</a>';
}
}
}
echo "</td>\n";
echo "</td>";
$curday++;
} else {
echo "<td>&nbsp;</td>\n";
echo "<td>&nbsp;</td>";
}
}
echo "</tr>\n";
echo "</tr>";
}
echo "</table>\n";
echo "</table>";
}
/**
@ -2758,8 +2743,8 @@ class Blog
$url_start_blog = 'blog.php'."?"."blog_id=".$info_log[3]."&amp;".api_get_cidreq();
$title = $info_log[0];
$image = '<img src="../img/blog.gif" border="0" align="absmiddle" alt="'.$title.'">'."\n";
$list_name = '<div style="float: left; width: 35px; height: 22px;"><a href="'.$url_start_blog.'">'.$image.'</a></div><a href="'.$url_start_blog.'">'.$title.'</a>'.$session_img."\n";
$image = Display::return_icon('blog.gif', $title);
$list_name = '<div style="float: left; width: 35px; height: 22px;"><a href="'.$url_start_blog.'">'.$image.'</a></div><a href="'.$url_start_blog.'">'.$title.'</a>'.$session_img;
$list_body_blog[] = $list_name;
$list_body_blog[] = $info_log[1];
@ -2767,19 +2752,17 @@ class Blog
$visibility_icon = ($info_log[2] == 0) ? 'invisible' : 'visible';
$visibility_info = ($info_log[2] == 0) ? 'Visible' : 'Invisible';
$my_image .= '<a href="'.api_get_self().'?action=edit&amp;blog_id='.$info_log[3].'">';
$my_image .= '<img src="../img/edit.gif" border="0" title="'.get_lang('EditBlog').'" />';
$my_image .= "</a>\n";
$my_image .= Display::return_icon('edit.png', get_lang('EditBlog'));
$my_image .= "</a>";
$my_image .= '<a href="'.api_get_self().'?action=delete&amp;blog_id='.$info_log[3].'" ';
$my_image .= 'onclick="javascript:if(!confirm(\''.addslashes(
api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset)
).'\')) return false;" >';
$my_image .= '<img src="../img/delete.gif" border="0" title="'.get_lang('DeleteBlog').'" />';
$my_image .= "</a>\n";
$my_image .= Display::return_icon('delete.png', get_lang('DeleteBlog'));
$my_image .= "</a>";
$my_image .= '<a href="'.api_get_self().'?action=visibility&amp;blog_id='.$info_log[3].'">';
$my_image .= '<img src="../img/'.$visibility_icon.'.gif" border="0" title="'.get_lang(
$visibility_info
).'" />';
$my_image .= "</a>\n";
$my_image .= Display::return_icon($visibility_icon.'.gif', get_lang('$visibility_info'));
$my_image .= "</a>";
$list_body_blog[] = $my_image;
$my_image = '';

@ -4566,7 +4566,7 @@ class CourseManager
/* Introduction text */
$intro_text='<p style="text-align: center;">
$intro_text = '<p style="text-align: center;">
<img src="'.api_get_path(REL_CODE_PATH).'img/mascot.png" alt="Mr. Chamilo" title="Mr. Chamilo" />
<h2>'.Database::escape_string(get_lang('IntroductionText')).'</h2>
</p>';

@ -723,25 +723,39 @@ class Display
$sourceurl = str_replace('&isHidden=true', '', $sourceurl);
$sourceurl = str_replace('&isHidden=false', '', $sourceurl);
$output_string_menu .= ' <a href="'.$sourceurl.'&isHidden=false"><img src="../../main/img/expand.gif" alt="'.'Show menu1'.'" padding:"2px"/></a>';
$output_string_menu .= ' <a href="'.$sourceurl.'&isHidden=false">
'.Display::return_icon('expand.gif', 'Show menu1').'
</a>';
} elseif ($isHidden == 'false' && $_SESSION['hideMenu']) {
$sourceurl = str_replace('&isHidden=true', '', $sourceurl);
$sourceurl = str_replace('&isHidden=false', '', $sourceurl);
$_SESSION['hideMenu'] = 'shown';
$output_string_menu .= '<div id="leftimg"><a href="'.$sourceurl.'&isHidden=true"><img src="../../main/img/collapse.gif" alt="'.'Hide menu2'.'" padding:"2px"/></a></div>';
$output_string_menu .= '<div id="leftimg"><a href="'.$sourceurl.'&isHidden=true">
'.Display::return_icon('collapse.gif', 'Hide menu2').'
</a>
</div>';
} elseif ($_SESSION['hideMenu']) {
if ($_SESSION['hideMenu'] == 'shown') {
$output_string_menu .= '<div id="leftimg"><a href="'.$sourceurl.'&isHidden=true"><img src="../../main/img/collapse.gif" alt="'.'Hide menu3'.' padding:"2px"/></a></div>';
$output_string_menu .= '<div id="leftimg"><a href="'.$sourceurl.'&isHidden=true">
'.Display::return_icon('collapse.gif', 'Hide menu3').'
</a>
</div>';
}
if ($_SESSION['hideMenu'] == 'hidden') {
$sourceurl = str_replace('&isHidden=true', '', $sourceurl);
$output_string_menu .= '<a href="'.$sourceurl.'&isHidden=false"><img src="../../main/img/expand.gif" alt="'.'Hide menu4'.' padding:"2px"/></a>';
$output_string_menu .= '<a href="'.$sourceurl.'&isHidden=false">
'.Display::return_icon('expand.gif', 'Hide menu4').'
</a>';
}
} elseif (!$_SESSION['hideMenu']) {
$_SESSION['hideMenu'] = 'shown';
if (isset($_cid)) {
$output_string_menu .= '<div id="leftimg"><a href="'.$sourceurl.'&isHidden=true"><img src="main/img/collapse.gif" alt="'.'Hide menu5'.' padding:"2px"/></a></div>';
$output_string_menu .= '<div id="leftimg">
<a href="'.$sourceurl.'&isHidden=true">
'.Display::return_icon('collapse.gif', 'Hide menu5').'
</a>
</div>';
}
}
}

@ -612,7 +612,9 @@ class ExerciseLib
//Admin can always delete the attempt
if ($locked == false || api_is_platform_admin()) {
$ip = TrackingUserLog::get_ip_from_user_event($results[$i]['exe_user_id'], $results[$i]['exe_date'], false);
$actions .= '<a href="http://www.whatsmyip.org/ip-geo-location/?ip='.$ip.'" target="_blank"><img src="'.api_get_path(WEB_CODE_PATH).'img/icons/22/info.png" title="'.$ip.'" /></a>';
$actions .= '<a href="http://www.whatsmyip.org/ip-geo-location/?ip='.$ip.'" target="_blank">
'.Display::return_icon('info.png', $ip).'
</a>';
$delete_link = '<a href="exercise_report.php?'.api_get_cidreq().'&filter_by_user='.intval($_GET['filter_by_user']).'&filter=' . $filter . '&exerciseId='.$exercise_id.'&delete=delete&did=' . $id . '"
onclick="javascript:if(!confirm(\'' . sprintf(get_lang('DeleteAttempt'), $results[$i]['username'], $dt) . '\')) return false;">'.Display :: return_icon('delete.png', get_lang('Delete')).'</a>';
$delete_link = utf8_encode($delete_link);

@ -160,14 +160,10 @@ class GradeModel extends Model
$template_title =
'&nbsp{element} <!-- BEGIN error --> <span class="form_error">{error}</span><!-- END error -->
<a href="javascript:plusItem('.($counter + 1).')">
<img style="display: '.(($counter >= $nr_items) ? 'inline' : 'none').';" id="plus-'.($counter + 1).'" src="../img/icons/22/add.png" alt="'.get_lang(
'Add'
).'" title="'.get_lang('Add').'"></img>
</a>
'.Display::return_icon('add.png', get_lang('Add'), array('style' => 'display: '.(($counter >= $nr_items) ? 'inline' : 'none'), 'id' => 'plus-'.($counter + 1))).'
</a>
<a href="javascript:minItem('.($counter).')">
<img style="display: '.(($counter >= $nr_items) ? 'inline' : 'none').';" id="min-'.$counter.'" src="../img/delete.png" alt="'.get_lang(
'Delete'
).'" title="'.get_lang('Delete').'"></img>
'.Display::return_icon('delete.png', get_lang('Delete'), array('style' => 'display: '.(($counter >= $nr_items) ? 'inline' : 'none'), 'id' => 'min-'.$counter)).'
</a>
</div></p></div>';

@ -814,8 +814,8 @@ class GroupPortalManager
* @param bool If we want that the function returns the /main/img/unknown.jpg image set it at true
* @return array Array of 2 elements: 'dir' and 'file' which contain the dir and file as the name implies if image does not exist it will return the unknow image if anonymous parameter is true if not it returns an empty er's
*/
public static function get_group_picture_path_by_id($id, $type = 'none', $preview = false, $anonymous = false) {
public static function get_group_picture_path_by_id($id, $type = 'none', $preview = false, $anonymous = false)
{
switch ($type) {
case 'system': // Base: absolute system path.
$base = api_get_path(SYS_CODE_PATH);
@ -859,6 +859,7 @@ class GroupPortalManager
} else {
$dir = $base.'upload/users/groups/'.$id.'/';
}
if (empty($picture_filename) && $anonymous) {
return array('dir' => $base.'img/', 'file' => 'unknown.jpg');
}
@ -897,12 +898,12 @@ class GroupPortalManager
* @param string style css
* @return array with the file and the style of an image i.e $array['file'] $array['style']
*/
public static function get_picture_group($id, $picture_file, $height, $size_picture = GROUP_IMAGE_SIZE_MEDIUM , $style = '') {
$patch_profile = 'upload/users/groups/';
public static function get_picture_group($id, $picture_file, $height, $size_picture = GROUP_IMAGE_SIZE_MEDIUM , $style = '')
{
$picture = array();
$picture['style'] = $style;
if ($picture_file == 'unknown.jpg') {
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/'.$picture_file;
$picture['file'] = api_get_path(WEB_IMG_PATH).$picture_file;
return $picture;
}
@ -936,7 +937,6 @@ class GroupPortalManager
$picture['style'] = ' style="padding-top:'.$margin.'px; width:'.$dimension['width'].'px; height:'.$dimension['height'].';" ';
}
} else {
//$file = api_get_path(SYS_CODE_PATH).$patch_profile.$user_id.'/'.$picture_file;
$file = $image_array_sys['dir'].$picture_file;
if (file_exists($file) && !is_dir($file)) {
$picture['file'] = $image_array['dir'].$picture_file;

@ -883,9 +883,8 @@ class PageController
).'" method="post">';
$courses_list_string .= '<input type="hidden" name="sec_token" value="'.$stok.'">';
$courses_list_string .= '<input type="hidden" name="subscribe" value="'.$course['code'].'" />';
$courses_list_string .= '<input type="image" name="unsub" src="main/img/enroll.gif" alt="'.get_lang(
'Subscribe'
).'" />'.get_lang('Subscribe').'</form>';
$courses_list_string .= '<input type="image" name="unsub" src="main/img/enroll.gif" alt="'.get_lang('Subscribe').'" />'.get_lang('Subscribe').'
</form>';
} else {
$courses_list_string .= '<br />'.get_lang('SubscribingNotAllowed');
}

@ -1128,10 +1128,8 @@ class HTML_QuickForm_advmultiselect extends HTML_QuickForm_select
*/
function getElementJs($raw = true, $min = true)
{
$js = '@data_dir@'.DIRECTORY_SEPARATOR
.'@package_name@'.DIRECTORY_SEPARATOR;
$js = api_get_path(LIBRARY_PATH).'javascript'.DIRECTORY_SEPARATOR.'pear'.DIRECTORY_SEPARATOR;
//$js = '@data_dir@'.DIRECTORY_SEPARATOR.'@package_name@'.DIRECTORY_SEPARATOR;
$js = api_get_path(SYS_LIBRARY_JS_PATH).'pear'.DIRECTORY_SEPARATOR;
if ($min) {
$js .= 'qfamsHandler-min.js';

@ -67,13 +67,13 @@ function format_specific_fields_selects($sf_terms, $op, $prefilter_prefix='') {
// Process each prefix type term
$i = 0;
$max = count($sf_terms);
$multiple_selects .='';
$multiple_selects ='';
foreach ($sf_terms as $prefix => $sf_term_array) {
if ($prefix == $prefilter_prefix) continue;
$multiple_select = '';
if ($i>0) {
//print "+" image
$multiple_select .= '<td><img class="sf-select-splitter" src="../img/search-big-plus.gif" alt="plus-sign-decoration"/></td>';
$multiple_select .= '<td><img class="sf-select-splitter" src="'.api_get_path(WEB_IMG_PATH).'search-big-plus.gif" /></td>';
}
//sorting the array of terms
$temp = array();

@ -87,11 +87,11 @@ class document_processor extends search_processor {
$name = '';
if ($row = Database::fetch_array($dk_result)) {
$name = $row['title'];
$url = api_get_path(WEB_PATH) . 'courses/%s/document%s';
$url = api_get_path(WEB_PATH).'courses/%s/document%s';
$url = sprintf($url, $course_path, $row['path']);
// Get the image path
$icon = FileManager::choose_image(basename($row['path']));
$thumbnail = api_get_path(WEB_CODE_PATH) . 'img/' . $icon;
$thumbnail = api_get_path(WEB_IMG_PATH).$icon;
$image = $thumbnail;
//FIXME: use big images
// get author

@ -111,7 +111,7 @@ class link_processor extends search_processor {
$url = api_get_path(WEB_PATH) . 'main/link/link.php?cidReq=%s';
$url = sprintf($url, $course_id_alpha);
// Get the image path
$thumbnail = api_get_path(WEB_CODE_PATH) . 'img/link.gif';
$thumbnail = api_get_path(WEB_IMG_PATH).'link.gif';
$image = $thumbnail; //FIXME: use big images
// get author
$author = '';
@ -126,5 +126,4 @@ class link_processor extends search_processor {
return array();
}
}
}

@ -119,13 +119,13 @@ class quiz_processor extends search_processor {
//actually author isn't saved on exercise tool, but prepare for when it's ready
$sql = "SELECT insert_user_id FROM $item_property_table
WHERE ref = $doc_id AND tool = '" . TOOL_DOCUMENT . "' AND c_id = $course_id
WHERE ref = $doc_id AND tool = '" . TOOL_DOCUMENT . "' AND c_id = $course_id
LIMIT 1";
$name = '';
if ($row = Database::fetch_array($dk_result)) {
// Get the image path
$thumbnail = api_get_path(WEB_PATH) . 'main/img/quiz.gif';
$thumbnail = api_get_path(WEB_IMG_PATH).'quiz.gif';
$image = $thumbnail; //FIXME: use big images
$name = $row['title'];
// get author
@ -142,4 +142,4 @@ class quiz_processor extends search_processor {
}
}
}
}

@ -412,7 +412,7 @@ class SocialManager extends UserManager {
//display course entry
$result .= '<div id="div_'.$count.'">';
$result .= '<h3><img src="../img/nolines_plus.gif" id="btn_'.$count.'" onclick="toogle_course(this,\''.$course_id.'\' )">';
$result .= '<h3>'.Display::return_icon('nolines_plus.gif', null, array('id' => 'btn_'.$count, 'onclick' => 'toogle_course(this,\''.$course_id.'\' )'));
$result .= $s_htlm_status_icon;
//show a hyperlink to the course, unless the course is closed and user is not course admin
@ -716,7 +716,7 @@ class SocialManager extends UserManager {
$user_status = $user_info['status'] == 1 ? Display::span('', array('class' => 'teacher_online')) : Display::span('', array('class' => 'student_online'));
if ($image_array['file'] == 'unknown.jpg' || !file_exists($image_array['dir'].$image_array['file'])) {
$friends_profile['file'] = api_get_path(WEB_CODE_PATH).'img/unknown_180_100.jpg';
$friends_profile['file'] = api_get_path(WEB_IMG_PATH).'unknown_180_100.jpg';
$img = '<img title = "'.$name.'" alt="'.$name.'" src="'.$friends_profile['file'].'">';
} else {
$friends_profile = UserManager::get_picture_user($uid, $image_array['file'], 80, USER_IMAGE_SIZE_ORIGINAL);

@ -24,7 +24,7 @@ function updateProgress($div_id, $upload_id, $waitAfterupload = false) {
if($waitAfterupload && $ul_info['est_sec']<2) {
$percent = 100;
$objResponse -> addAssign($div_id.'_label' , 'innerHTML', get_lang('UploadFile').' : '.$percent.' %');
$objResponse -> addAssign($div_id.'_waiter_frame','innerHTML','<img src="'.api_get_path(WEB_CODE_PATH).'img/progress_bar.gif" />');
$objResponse -> addAssign($div_id.'_waiter_frame','innerHTML', '<img src="'.api_get_path(WEB_IMG_PATH).'progress_bar.gif" />');
$objResponse -> addScript('clearInterval("myUpload.__progress_bar_interval")');
}
$objResponse -> addAssign($div_id.'_label' , 'innerHTML', get_lang('UploadFile').' : '.$percent.' %');
@ -32,5 +32,3 @@ function updateProgress($div_id, $upload_id, $waitAfterupload = false) {
return $objResponse;
}
?>

@ -1402,7 +1402,7 @@ class UserGroup extends Model
$picture = array();
$picture['style'] = $style;
if ($picture_file == 'unknown.jpg') {
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/'.$picture_file;
$picture['file'] = api_get_path(WEB_IMG_PATH).$picture_file;
return $picture;
}
@ -1440,7 +1440,7 @@ class UserGroup extends Model
if (file_exists($file) && !is_dir($file)) {
$picture['file'] = $image_array['dir'].$picture_file;
} else {
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/unknown_group.png';
$picture['file'] = api_get_path(WEB_IMG_PATH).'unknown_group.png';
}
}
return $picture;

@ -1457,7 +1457,7 @@ class UserManager
$production_path = self::get_user_picture_path_by_id($user_id, 'web', true);
$production_dir = $production_path['dir'].$user_id.'/';
$del_image = api_get_path(WEB_CODE_PATH).'img/delete.gif';
$del_image = api_get_path(WEB_IMG_PATH).'delete.png';
$del_text = get_lang('Delete');
$production_list = '';
if (count($productions) > 0) {
@ -3101,11 +3101,12 @@ class UserManager
* @param string style css
* @return array with the file and the style of an image i.e $array['file'] $array['style']
*/
public static function get_picture_user($user_id, $picture_file, $height, $size_picture = USER_IMAGE_SIZE_MEDIUM , $style = '') {
public static function get_picture_user($user_id, $picture_file, $height, $size_picture = USER_IMAGE_SIZE_MEDIUM , $style = '')
{
$picture = array();
$picture['style'] = $style;
if ($picture_file == 'unknown.jpg') {
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/'.$picture_file;
$picture['file'] = api_get_path(WEB_IMG_PATH).$picture_file;
return $picture;
}
switch ($size_picture) {
@ -3149,15 +3150,14 @@ class UserManager
} else {
switch ($size_picture) {
case 'big_' :
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/unknown.jpg'; break;
$picture['file'] = api_get_path(WEB_IMG_PATH).'unknown.jpg'; break;
case 'medium_' :
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/unknown_50_50.jpg'; break;
$picture['file'] = api_get_path(WEB_IMG_PATH).'unknown_50_50.jpg'; break;
case 'small_' :
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/unknown.jpg'; break;
$picture['file'] = api_get_path(WEB_IMG_PATH).'unknown.jpg'; break;
default:
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/unknown.jpg'; break;
$picture['file'] = api_get_path(WEB_IMG_PATH).'unknown.jpg'; break;
}
}
}
return $picture;

@ -216,7 +216,9 @@ $form->display();
<?php
if ($result_to_print != "") {
echo '<br /><div class="slider_menu">
<a href="#" onclick="return sliderAction();"><img src="../img/icons/22/zoom_in.png"></a>
<a href="#" onclick="return sliderAction();">
'.Display::return_icon('zoom_in.png').'
</a>
</div>';
}?>
</div>

@ -789,7 +789,10 @@ if (empty($_GET['details'])) {
if ($from_myspace) {
$from ='&from=myspace';
}
$link = Display::url('<img src="../img/2rightarrow.gif" border="0" />','lp_tracking.php?course='.Security::remove_XSS($_GET['course']).$from.'&origin='.Security::remove_XSS($_GET['origin']).'&lp_id='.$learnpath['id'].'&student_id='.$user_info['user_id'].'&id_session='.$session_id);
$link = Display::url(
Display::return_icon('2rightarrow.gif'),
'lp_tracking.php?course='.Security::remove_XSS($_GET['course']).$from.'&origin='.Security::remove_XSS($_GET['origin']).'&lp_id='.$learnpath['id'].'&student_id='.$user_info['user_id'].'&id_session='.$session_id
);
echo Display::tag('td', $link);
}
@ -797,7 +800,7 @@ if (empty($_GET['details'])) {
echo '<td>';
if ($any_result === true) {
echo '<a href="myStudents.php?action=reset_lp&sec_token='.$token.'&course='.Security::remove_XSS($_GET['course']).'&details='.Security::remove_XSS($_GET['details']).'&origin='.Security::remove_XSS($_GET['origin']).'&lp_id='.$learnpath['id'].'&student='.$user_info['user_id'].'&details=true&id_session='.Security::remove_XSS($_GET['id_session']).'">';
echo Display::return_icon('clean.png',get_lang('Clean'),'',ICON_SIZE_SMALL).'</a>';
echo Display::return_icon('clean.png', get_lang('Clean'), '', ICON_SIZE_SMALL).'</a>';
echo '</a>';
}
echo '</td>';

@ -111,8 +111,12 @@ if (api_is_allowed_to_create_course() || api_is_drh()) {
echo '</div>';
} else {
echo '<div class="actions"><div style="float:right;">
<a href="javascript: void(0);" onclick="javascript: window.print();"><img align="absbottom" src="../img/printmgr.gif">&nbsp;'.get_lang('Print').'</a>
<a href="'.api_get_self().'?export=csv"><img align="absbottom" src="../img/excel.gif">&nbsp;'.get_lang('ExportAsCSV').'</a>
<a href="javascript: void(0);" onclick="javascript: window.print();">
'.Display::return_icon('printmgr.gif', get_lang('Print')).'
</a>
<a href="'.api_get_self().'?export=csv">
'.Display::return_icon('excel.gif', get_lang('ExportAsCSV')).'
&nbsp;'.get_lang('ExportAsCSV').'</a>
</div></div>';
}

@ -5755,7 +5755,7 @@ class learnpath
$elements = array();
$return_audio = null;
$iconSysPath = api_get_path(SYS_CODE_PATH).'img/';
$iconSysPath = api_get_path(SYS_IMG_PATH);
for ($i = 0; $i < count($arrLP); $i++) {
$title = $arrLP[$i]['title'];
@ -6084,11 +6084,11 @@ class learnpath
*/
public function build_tree()
{
$iconSysPath = api_get_path(SYS_CODE_PATH).'img/';
$iconSysPath = api_get_path(SYS_IMG_PATH);
$iconWebPath = api_get_path(WEB_IMG_PATH);
$course_id = api_get_course_int_id();
$return = "<script type=\"text/javascript\">\n";
$return = "<script type=\"text/javascript\">";
$return .= "\tm = new dTree('m');\n\n";
$return .= "\tm.config.folderLinks = true;\n";
$return .= "\tm.config.useCookies = true;\n";
@ -8930,7 +8930,7 @@ class learnpath
$arrLP = $this->arrMenu;
unset($this->arrMenu);
$imgSysPath = api_get_path(SYS_CODE_PATH).'img/';
$imgSysPath = api_get_path(SYS_IMG_PATH);
for ($i = 0; $i < count($arrLP); $i++) {
if ($arrLP[$i]['id'] == $item_id) {

@ -42,16 +42,6 @@ $(document).ready(function () {
setFocus();
});
function advanced_parameters() {
if(document.getElementById(\'options\').style.display == \'none\') {
document.getElementById(\'options\').style.display = \'block\';
document.getElementById(\'img_plus_and_minus\').innerHTML=\'&nbsp;'.$hideImg.'&nbsp;'.get_lang('AdvancedParameters').'\';
} else {
document.getElementById(\'options\').style.display = \'none\';
document.getElementById(\'img_plus_and_minus\').innerHTML=\'&nbsp;'.$showImg.'&nbsp;'.get_lang('AdvancedParameters').'\';
}
}
function activate_start_date() {
if(document.getElementById(\'start_date_div\').style.display == \'none\') {
document.getElementById(\'start_date_div\').style.display = \'block\';
@ -127,13 +117,11 @@ $form->addElement('header', null, get_lang('AddLpToStart'));
$form->addElement('text', 'lp_name', api_ucfirst(get_lang('LPName')), array('class' => 'span6'));
$form->applyFilter('lp_name', 'html_filter');
$form->addRule('lp_name', get_lang('ThisFieldIsRequired'), 'required');
$form->addElement('hidden', 'post_time', time());
$form->addElement('hidden', 'action', 'add_lp');
$advanced = '<a href="javascript://" onclick=" return advanced_parameters()"><span id="img_plus_and_minus"><div style="vertical-align:top;" >&nbsp;'.$showImg.'&nbsp;'.get_lang('AdvancedParameters').'</div></span></a>';
$form -> addElement('advanced_settings',$advanced);
$form -> addElement('html','<div id="options" style="display:none">');
$form->addElement('advanced_settings', Display::url(get_lang('AdvancedParameters'), '#', array('id'=> 'lp', 'class' => 'advanced_options')));
$form->addElement('html','<div id="lp_options" style="display:none">');
$items = learnpath::get_category_from_course_into_select(api_get_course_int_id());
if (!empty($items)) {

@ -36,16 +36,6 @@ $(document).ready(function () {
setFocus();
});
function advanced_parameters() {
if(document.getElementById(\'options\').style.display == \'none\') {
document.getElementById(\'options\').style.display = \'block\';
document.getElementById(\'img_plus_and_minus\').innerHTML=\'&nbsp;<img style="vertical-align:middle;" src="../img/div_hide.gif" alt="" />&nbsp;'.get_lang('AdvancedParameters').'\';
} else {
document.getElementById(\'options\').style.display = \'none\';
document.getElementById(\'img_plus_and_minus\').innerHTML=\'&nbsp;<img style="vertical-align:middle;" src="../img/div_show.gif" alt="" />&nbsp;'.get_lang('AdvancedParameters').'\';
}
}
function activate_start_date() {
if(document.getElementById(\'start_date_div\').style.display == \'none\') {
document.getElementById(\'start_date_div\').style.display = \'block\';
@ -149,4 +139,4 @@ echo '</div>';
$form->display();
// Footer
Display::display_footer();
Display::display_footer();

@ -121,8 +121,7 @@ Display::display_header(null, 'Path');
$suredel = trim(get_lang('AreYouSureToDelete'));
//@todo move this somewhere else css/fix.css
$iconUrl = api_get_path(WEB_CODE_PATH).'img/';
$iconUrl = api_get_path(WEB_IMG_PATH);
?>
<style>
#feedback { font-size: 1.4em; }

@ -201,7 +201,7 @@ if ($_SESSION['oLP']->get_hide_toc_frame() == 1) {
$form -> display();
echo '</div>';
echo '<div class="span6" align="center">';
echo '<img src="../img/course_setting_layout.png" />';
echo Display::return_icon('course_setting_layout.png');
echo '</div>';
}
echo '</div>';

@ -428,19 +428,18 @@ foreach ($categories as $item) {
if ($details['autolaunch'] == 1 && $autolunch_exists == false) {
$autolunch_exists = true;
$lp_auto_lunch_icon = '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=auto_launch&status=0&lp_id='.$id.'">
<img src="../img/launch.png" border="0" title="'.get_lang('DisableLPAutoLaunch').'" /></a>';
'.Display::return_icon('launch.png', get_lang('DisableLPAutoLaunch')).'
</a>';
} else {
$lp_auto_lunch_icon = '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=auto_launch&status=1&lp_id='.$id.'">
<img src="../img/launch_na.png" border="0" title="'.get_lang('EnableLPAutoLaunch').'" /></a>';
'.Display::return_icon('launch_na.png', get_lang('EnableLPAutoLaunch')).'
</a>';
}
}
//if (api_get_setting('pdf_export_watermark_enable') == 'true') {
$export_icon = ' <a href="'.api_get_self().'?'.api_get_cidreq().'&action=export_to_pdf&lp_id='.$id.'">
'.Display::return_icon('pdf.png', get_lang('ExportToPDFOnlyHTMLAndImages'), '', ICON_SIZE_SMALL).'</a>';
//}
/* DELETE COMMAND */
if ($current_session == $details['lp_session']) {
$dsp_delete = "<a href=\"lp_controller.php?".api_get_cidreq()."&action=delete&lp_id=$id\" ".
"onclick=\"javascript: return confirmation('".addslashes($name)."');\">".
@ -456,11 +455,12 @@ foreach ($categories as $item) {
if ($current_session == 0) {
if ($details['lp_display_order'] == 1 && $max != 1) {
$dsp_order .= '<a href="lp_controller.php?'.api_get_cidreq().'&action=move_lp_down&lp_id='.$id.'">
'.Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL).'</a>
<img src="../img/blanco.png" border="0" alt="" title="" />';
'.Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL).'
</a>
'.Display::return_icon('blanco.png');
} elseif ($current == $max - 1 && $max != 1) {
$dsp_order .= '<img src="../img/blanco.png" border="0" alt="" title="" /><a href="lp_controller.php?'.api_get_cidreq().'&action=move_lp_up&lp_id='.$id.'">
'.Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL).'</a>';
$dsp_order .= Display::return_icon('blanco.png').'<a href="lp_controller.php?'.api_get_cidreq().'&action=move_lp_up&lp_id='.$id.'">
'.Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL).'</a>';
} elseif ($max == 1) {
$dsp_order = '';
} else {
@ -476,9 +476,10 @@ foreach ($categories as $item) {
} else {
$start_time = $end_time = '';
}
} else { // end if ($is_allowedToEdit)
//Student
$export_icon = ' <a href="'.api_get_self().'?'.api_get_cidreq().'&action=export_to_pdf&lp_id='.$id.'">'.Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_SMALL).'</a>';
} else {
// Student.
$export_icon = ' <a href="'.api_get_self().'?'.api_get_cidreq().'&action=export_to_pdf&lp_id='.$id.'">'.
Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_SMALL).'</a>';
}
echo $dsp_line.$start_time.$end_time.$dsp_progress.$dsp_desc.$dsp_export.$dsp_edit.$dsp_build.$dsp_edit_lp.$dsp_visible.$dsp_publish.$subscribe_users.$dsp_reinit.

@ -118,7 +118,7 @@ if ($count > 0) {
foreach ($results as $result) {
// Fill the result array.
if (empty($result['thumbnail'])) {
$result['thumbnail'] = '../img/no_document_thumb.jpg';
$result['thumbnail'] = Display::return_icon('no_document_thumb.jpg');
}
if (!empty($result['url'])) {
@ -176,11 +176,10 @@ if (count($blocks) > 0) {
$mode_selector = '<div id="mode-selector">';
$mode_selector .= sprintf($search_link, api_get_path(WEB_CODE_PATH), 'gallery', $_REQUEST['query'], $get_params);
$mode_selector .= '<img src="../img/'. (($mode=='gallery')?'ButtonGallOn':'ButtonGallOff') .'.png" /></a>';
$mode_selector .= Display::return_icon((($mode=='gallery')?'ButtonGallOn':'ButtonGallOff') .'.png').'</a>';
$mode_selector .= sprintf($search_link, api_get_path(WEB_CODE_PATH), 'default', $_REQUEST['query'], $get_params);
$mode_selector .= '<img src="../img/'.(($mode=='default')?'ButtonListOn':'ButtonListOff').'.png" /></a>';
$mode_selector .= Display::return_icon((($mode=='default')?'ButtonListOn':'ButtonListOff') .'.png').'</a>';
$mode_selector .= '</div>';
echo '<div id="search-results-container">';
echo $mode_selector;
$s->display();

@ -71,10 +71,14 @@ if ($origin == 'tracking') {
$url_suffix = '&lp_id=' . $lp_id;
}
if (!empty($_GET['extend_all'])) {
$extend_all_link = '<a href="' . api_get_self() . '?action=stats' . $url_suffix . '"><img src="../img/view_less_stats.gif" alt="fold_view" border="0" title="' . get_lang('HideAllAttempts') . '"></a>';
$extend_all_link = '<a href="' . api_get_self() . '?action=stats' . $url_suffix . '">
'.Display::return_icon('view_less_stats.gif', get_lang('HideAllAttempts') ).'
</a>';
$extend_all = 1;
} else {
$extend_all_link = '<a href="' . api_get_self() . '?action=stats&extend_all=1' . $url_suffix . '"><img src="../img/view_more_stats.gif" alt="extend_view" border="0" title="' . get_lang('ShowAllAttempts') . '"></a>';
$extend_all_link = '<a href="' . api_get_self() . '?action=stats&extend_all=1' . $url_suffix . '">
'.Display::return_icon('view_more_stats.gif', get_lang('ShowAllAttempts') ).'
</a>';
}
if ($origin != 'tracking') {
@ -263,7 +267,8 @@ if (is_array($list) && count($list) > 0) {
$extend_link = '';
if (!empty($inter_num)) {
$extend_link = '<a href="' . api_get_self() . '?action=stats&fold_id=' . $my_item_id . $url_suffix . '">
<img src="../img/visible.gif" alt="' . get_lang('HideAttemptView') . '" title="' . get_lang('HideAttemptView') . '" border="0"></a>';
'.Display::return_icon('visible.gif', get_lang('HideAttemptView') ).'
</a>';
}
$title = $row['mytitle'];
@ -296,10 +301,13 @@ if (is_array($list) && count($list) > 0) {
if (!empty($_GET['extend_attempt_id']) && $_GET['extend_attempt_id'] == $row['iv_id']) {
// The extend button for this attempt has been clicked.
$extend_this_attempt = 1;
$extend_attempt_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&fold_attempt_id=' . $row['iv_id'] . $url_suffix . '"><img src="../img/visible.gif" alt="' . get_lang('HideAttemptView') . '" title="' . get_lang('HideAttemptView') . '" border="0"></a>';
$extend_attempt_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&fold_attempt_id=' . $row['iv_id'] . $url_suffix . '">
'.Display::return_icon('visible.gif', get_lang('HideAttemptView')).'</a>';
} else { // Same case if fold_attempt_id is set, so not implemented explicitly.
// The extend button for this attempt has not been clicked.
$extend_attempt_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&extend_attempt_id=' . $row['iv_id'] . $url_suffix . '"><img src="../img/invisible.gif" alt="' . get_lang('ExtendAttemptView') . '" title="' . get_lang('ExtendAttemptView') . '" border="0"></a>';
$extend_attempt_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&extend_attempt_id=' . $row['iv_id'] . $url_suffix . '">
'.Display::return_icon('invisible.gif', get_lang('ExtendAttemptView')).'
</a>';
}
}
@ -480,10 +488,13 @@ if (is_array($list) && count($list) > 0) {
if (!empty($_GET['extend_attempt_id']) && $_GET['extend_attempt_id'] == $row['iv_id']) {
// The extend button for this attempt has been clicked.
$extend_this_attempt = 1;
$extend_attempt_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&fold_attempt_id=' . $row['iv_id'] . $url_suffix . '"><img src="../img/visible.gif" alt="' . get_lang('HideAttemptView') . '" title="' . get_lang('HideAttemptView') . '" border="0"></a>' . "\n";
$extend_attempt_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&fold_attempt_id=' . $row['iv_id'] . $url_suffix . '">
'.Display::return_icon('visible.gif', get_lang('HideAttemptView')).'</a>';
} else { // Same case if fold_attempt_id is set, so not implemented explicitly.
// The extend button for this attempt has not been clicked.
$extend_attempt_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&extend_attempt_id=' . $row['iv_id'] . $url_suffix . '"><img src="../img/invisible.gif" alt="' . get_lang('ExtendAttemptView') . '" title="' . get_lang('ExtendAttemptView') . '" border="0"></a>' . "\n";
$extend_attempt_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&extend_attempt_id=' . $row['iv_id'] . $url_suffix . '">
'.Display::return_icon('invisible.gif', get_lang('ExtendAttemptView')).'
</a>';
}
}
@ -495,7 +506,8 @@ if (is_array($list) && count($list) > 0) {
$extend_link = '';
if ($inter_num > 1) {
$extend_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&extend_attempt_id=' . $row['iv_id'] . $url_suffix . '"><img src="../img/invisible.gif" alt="' . get_lang('ExtendAttemptView') . '" title="' . get_lang('ExtendAttemptView') . '" border="0"></a>';
$extend_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&extend_attempt_id=' . $row['iv_id'] . $url_suffix . '">
'.Display::return_icon('invisible.gif', get_lang('ExtendAttemptView')).'</a>';
}
$lesson_status = $row['mystatus'];
@ -635,9 +647,13 @@ if (is_array($list) && count($list) > 0) {
$num = Database :: num_rows($resultLastAttempt);
if ($num > 0) {
if (isset($_GET['extend_attempt']) && $_GET['extend_attempt'] == 1 && (isset($_GET['lp_id']) && $_GET['lp_id'] == $my_lp_id) && (isset($_GET['lp_item_id']) && $_GET['lp_item_id'] == $my_id)) {
$correct_test_link = '<a href="' . api_get_self() . '?action=stats' . $my_url_suffix . '&session_id=' . api_get_session_id() . '&lp_item_id=' . $my_id . '"><img src="../img/view_less_stats.gif" alt="fold_view" border="0" title="' . get_lang('HideAllAttempts') . '"></a>';
$correct_test_link = '<a href="' . api_get_self() . '?action=stats' . $my_url_suffix . '&session_id=' . api_get_session_id() . '&lp_item_id=' . $my_id . '">
'.Display::return_icon('view_less_stats.gif', get_lang('HideAllAttempts') ).'
</a>';
} else {
$correct_test_link = '<a href="' . api_get_self() . '?action=stats&extend_attempt=1' . $my_url_suffix . '&session_id=' . api_get_session_id() . '&lp_item_id=' . $my_id . '"><img src="../img/view_more_stats.gif" alt="extend_view" border="0" title="' . get_lang('ShowAllAttemptsByExercise') . '"></a>';
$correct_test_link = '<a href="' . api_get_self() . '?action=stats&extend_attempt=1' . $my_url_suffix . '&session_id=' . api_get_session_id() . '&lp_item_id=' . $my_id . '">
'.Display::return_icon('view_more_stats.gif', get_lang('ShowAllAttemptsByExercise') ).'
</a>';
}
} else {
$correct_test_link = '-';
@ -650,13 +666,13 @@ if (is_array($list) && count($list) > 0) {
if ((isset($_GET['lp_id']) && $_GET['lp_id'] == $my_lp_id && false)) {
$output .= '<tr class =' . $oddclass . '>
<td>' . $extend_link . '</td>
<td colspan="4">' . $title . '</td>
$output .= '<tr class ='.$oddclass.'>
<td>'.$extend_link.'</td>
<td colspan="4">'.$title.'</td>
<td colspan="2">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>' . $correct_test_link . '</td>
<td>'.$correct_test_link.'</td>
</tr>';
$output .= '</tr>';
} else {
@ -816,17 +832,17 @@ if (is_array($list) && count($list) > 0) {
<td colspan="2">'.$time_attemp . '</td>';
if ($origin != 'tracking') {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$output .= '<td><img src="' . api_get_path(WEB_IMG_PATH) . 'quiz_na.gif" alt="' . get_lang('ShowAttempt') . '" title="' . get_lang('ShowAttempt') . '"></td>';
$output .= '<td><img src="' . api_get_path(WEB_IMG_PATH).'quiz_na.gif" alt="' . get_lang('ShowAttempt') . '" title="' . get_lang('ShowAttempt') . '"></td>';
} else {
$output .= '<td><a href="../exercice/exercise_show.php?origin=' . $origin . '&id=' . $my_exe_id . '&cidReq=' . $course_code . $from_link . '" target="_parent">
<img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" alt="' . get_lang('ShowAttempt') . '" title="' . get_lang('ShowAttempt') . '"></a></td>';
<img src="' . api_get_path(WEB_IMG_PATH).'quiz.gif" alt="' . get_lang('ShowAttempt') . '" title="' . get_lang('ShowAttempt') . '"></a></td>';
}
} else {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$output .= '<td><img src="' . api_get_path(WEB_IMG_PATH) . 'quiz_na.gif" alt="' . get_lang('ShowAndQualifyAttempt') . '" title="' . get_lang('ShowAndQualifyAttempt') . '"></td>';
$output .= '<td><img src="' . api_get_path(WEB_IMG_PATH).'quiz_na.gif" alt="' . get_lang('ShowAndQualifyAttempt') . '" title="' . get_lang('ShowAndQualifyAttempt') . '"></td>';
} else {
$output .= '<td><a href="../exercice/exercise_show.php?cidReq=' . $course_code . '&origin=correct_exercise_in_lp&id=' . $my_exe_id . '" target="_parent">
<img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" alt="' . get_lang('ShowAndQualifyAttempt') . '" title="' . get_lang('ShowAndQualifyAttempt') . '"></a></td>';
<img src="' . api_get_path(WEB_IMG_PATH).'quiz.gif" alt="' . get_lang('ShowAndQualifyAttempt') . '" title="' . get_lang('ShowAndQualifyAttempt') . '"></a></td>';
}
}
$output .= '</tr>';

@ -738,7 +738,7 @@ if ($content == 'Agenda') {
while ($myrow = Database::fetch_array($result)) {
echo "<table width=\"100%\"><tr><td bgcolor=\"#E6E6E6\">";
echo "<img src='../img/agenda.gif' alt='agenda'>";
echo Display::return_icon('agenda.gif');
echo api_convert_and_format_date($myrow['start_date'], null, date_default_timezone_get())."<br />";
echo "<b>".$myrow['title']."</b></td></tr><tr><td>";
echo $myrow['content']."<br />";
@ -783,7 +783,8 @@ if ($content == 'Document' || (empty($content) && (api_is_allowed_to_edit() || i
// showing the blue bar with the path in it when we are not in the root
if (FileManager::get_levels($folder)) {
echo "<table width=\"100%\"><tr><td bgcolor=\"#4171B5\">";
echo "<img src=\"../img/opendir.gif\" alt='directory'><font color=\"#ffffff\"><b>";
echo Display::return_icon('opendir.gif');
echo "<font color=\"#ffffff\"><b>";
echo $folder."</b></font></td></tr></table>";
}
@ -801,7 +802,7 @@ if ($content == 'Ad_Valvas') {
$result = Database::query($sql);
while ($myrow = Database::fetch_array($result)) {
echo "<table width=\"100%\"><tr><td>";
echo "<img src='../img/valves.gif' alt='advalvas'>";
echo Display::return_icon('valves.gif');
echo api_convert_and_format_date($myrow['end_date'], DATE_FORMAT_LONG, date_default_timezone_get());
echo "</td></tr><tr><td>";
echo $myrow['title']."<br />";
@ -830,7 +831,9 @@ if ($content == 'Forum') {
echo "<tr><td bgcolor='#4171B5' colspan='2'><font color='white'><b>".$myrow['cat_title']."</b></font></td></tr>";
}
$old_cat_title = $myrow['cat_title'];
echo "<tr><td><img src='../img/forum.gif'><a href='".api_get_self(
echo "<tr><td>";
echo Display::return_icon('forum.gif');
echo "<a href='".api_get_self(
)."?content=Forum&category=".$myrow['cat_id']."&forum=".$myrow['forum_id']."&action=$action&lp_id=$learnpath_id&parent_item_id=$chapter_id&originalresource=no'>".$myrow['forum_name']."</td><td>";
showorhide_addresourcelink('Forum', $myrow['forum_id']);
echo "</td></tr>";
@ -908,7 +911,8 @@ if ($content == 'Link') {
if (Database::num_rows($result) > 0) {
echo "<table width=\"100%\"><tr><td bgcolor=\"#E6E6E6\"><i>".get_lang('NoCategory')."</i></td></tr></table>";
while ($myrow = Database::fetch_array($result)) {
echo "<img src='../img/links.gif'>".$myrow['title'];
echo Display::return_icon('links.gif');
echo $myrow['title'];
echo "<br />";
showorhide_addresourcelink($content, $myrow['id']);
echo "<br /><br />";
@ -923,7 +927,8 @@ if ($content == 'Link') {
echo "<table width=\"100%\"><tr><td bgcolor=\"#E6E6E6\"><i>".$myrow['category_title']."</i></td></tr></table>";
$result_links = Database::query($sql_links);
while ($myrow = Database::fetch_array($result_links)) {
echo "<img src='../img/links.gif' />".$myrow['title'];
echo Display::return_icon('links.gif');
echo $myrow['title'];
echo "<br />";
showorhide_addresourcelink($content, $myrow['id']);
echo "<br /><br />";
@ -937,7 +942,8 @@ if (($content == 'Exercise') || ($content == 'HotPotatoes')) {
$TBL_EXERCICES = Database::get_course_table(TABLE_QUIZ_TEST);
$result = Database::query("SELECT * FROM ".$TBL_EXERCICES." WHERE active='1' ORDER BY iid ASC");
while ($myrow = Database::fetch_array($result)) {
echo "<img src='../img/quiz.gif'>".$myrow['title']."<br />";
echo Display::return_icon('quiz.gif');
echo $myrow['title']."<br />";
showorhide_addresourcelink($content, $myrow["id"]);
echo "<br /><br />";
}
@ -950,10 +956,10 @@ if (($content == 'Exercise') || ($content == 'HotPotatoes')) {
$result = Database::query($sql);
while ($myrow = Database::fetch_array($result)) {
$path = $myrow['path'];
echo "<img src='../img/jqz.jpg'>".GetQuizName($path, $documentPath)."<br />";
echo Display::return_icon('jqz.gif');
echo GetQuizName($path, $documentPath)."<br />";
showorhide_addresourcelink('HotPotatoes', $myrow['id']);
echo "<br /><br />";
}
}
}

@ -167,6 +167,6 @@ echo "</form><br />";
// LEGEND
echo '<strong>'.get_lang('Legend').'</strong><br />';
echo '<img src="../img/wrong.gif" /> '.get_lang('UserHasPermissionNot').'<br />';
echo '<img src="../img/checkbox_on2.gif" /> '.get_lang('UserHasPermission').'<br />';
echo '<img src="../img/checkbox_on3.gif" /> '.get_lang('UserHasPermissionByRoleGroup').'<br />';
echo Display::return_icon('wrong.gif').' '.get_lang('UserHasPermissionNot').'<br />';
echo Display::return_icon('checkbox_on2.gif').' '.get_lang('UserHasPermission').'<br />';
echo Display::return_icon('checkbox_on3.gif').' '.get_lang('UserHasPermissionByRoleGroup').'<br />';

@ -2,7 +2,7 @@
/**
* @package chamilo.permissions
*/
/**
/**
* Code
*/
include_once('permissions_functions.inc.php');
@ -134,13 +134,8 @@ if ($setting_visualisation=='checkbox')
echo "<input type=\"Submit\" name=\"StoreGroupPermissions\" value=\"".get_lang('StorePermissions')."\">";
}
echo "</form>";
// ---------------------------------------------------
// LEGEND
// ---------------------------------------------------
echo '<strong>'.get_lang('Legend').'</strong><br />';
echo '<img src="../img/wrong.gif" /> '.get_lang('UserHasPermissionNot').'<br />';
echo '<img src="../img/checkbox_on2.gif" /> '.get_lang('UserHasPermission').'<br />';
echo '<img src="../img/checkbox_on3.gif" /> '.get_lang('UserHasPermissionByRoleGroup').'<br />';
?>
echo Display::return_icon('wrong.gif').' '.get_lang('UserHasPermissionNot').'<br />';
echo Display::return_icon('checkbox_on2.gif').' '.get_lang('UserHasPermission').'<br />';
echo Display::return_icon('checkbox_on3.gif').' '.get_lang('UserHasPermissionByRoleGroup').'<br />';

@ -24,7 +24,7 @@
*/
function store_permissions($content, $id) {
$course_id = api_get_course_int_id();
// Which database are we using (depending on the $content parameter)
if($content=='user')
{
@ -81,7 +81,7 @@ function store_one_permission($content, $action, $id, $tool,$permission) {
//}
// Which database are we using (depending on the $content parameter)
if ($content=='user') {
$table=Database::get_course_table(TABLE_PERMISSION_USER);
$id_field = user_id;
@ -245,12 +245,9 @@ function display_checkbox_matrix($permission_array, $tool, $permission, $inherit
*/
function display_image_matrix($permission_array, $tool, $permission,$inherited_permissions=array(), $course_admin=false, $editable=true)
{
if ($course_admin)
{
if ($course_admin) {
echo "\t\t\t<img src=\"../img/checkbox_on3.gif\" border=\"0\"/ title=\"".get_lang('PermissionGrantedByGroupOrRole')."\">";
}
else
{
} else {
if(in_array($permission,$inherited_permissions[$tool]))
{
echo "\t\t\t<img src=\"../img/checkbox_on3.gif\" border=\"0\"/ title=\"".get_lang('PermissionGrantedByGroupOrRole')."\">";
@ -487,7 +484,7 @@ function display_role_list($current_course_roles, $current_platform_roles)
* @version 1.0
*/
function get_roles($content,$id, $scope='course') {
$course_id = api_get_course_int_id();
$course_id = api_get_course_int_id();
if($content=='user') {
$table=Database::get_course_table(TABLE_ROLE_USER);
$id_field = user_id;
@ -517,7 +514,7 @@ function get_roles($content,$id, $scope='course') {
function get_all_roles($content='course') {
$course_id = api_get_course_int_id();
$course_id_condition = " WHERE c_id = $course_id ";
if($content=='course')
{
$table_role=Database::get_course_table(TABLE_ROLE);
@ -567,7 +564,7 @@ function get_roles_permissions($content,$id, $scope='course') {
if($scope == 'course') {
$table_role = Database::get_course_table(TABLE_ROLE);
$table_role_permissions = Database::get_course_table(TABLE_ROLE_PERMISSION);
$role_condition = " role.c_id = $course_id AND role_permissions.c_id = $course_id AND ";
}
@ -631,7 +628,7 @@ function assign_role($content, $action, $id, $role_id, $scope='course') {
$result_message=get_lang('RoleGranted');
}
}
if($action=='revoke') {
$sql="DELETE FROM $table WHERE c_id = $course_id AND $id_field = '".Database::escape_string($id)."' AND role_id='".Database::escape_string($role_id)."'";
$result=Database::query($sql);

@ -190,12 +190,7 @@ if ($setting_visualisation=='checkbox')
}
echo "</form><br />";
// ---------------------------------------------------
// LEGEND
// ---------------------------------------------------
echo '<strong>'.get_lang('Legend').'</strong><br />';
echo '<img src="../img/wrong.gif" /> '.get_lang('UserHasPermissionNot').'<br />';
echo '<img src="../img/checkbox_on2.gif" /> '.get_lang('UserHasPermission').'<br />';
echo '<img src="../img/checkbox_on3.gif" /> '.get_lang('UserHasPermissionByRoleGroup').'<br />';
?>
echo Display::return_icon('wrong.gif').' '.get_lang('UserHasPermissionNot').'<br />';
echo Display::return_icon('checkbox_on2.gif').' '.get_lang('UserHasPermission').'<br />';
echo Display::return_icon('checkbox_on3.gif').' '.get_lang('UserHasPermissionByRoleGroup').'<br />';

@ -42,10 +42,8 @@ function show_folder_up()
$level = FileManager::get_levels($folder);
if ($level == 1) {
echo "<a href='".api_get_self(
)."?content=Document&amp;source_forum=".$_GET['source_forum']."&amp;source_id=$source_id&amp;action=$action&amp;learnpath_id=$learnpath_id&amp;chapter_id=$chapter_id&amp;originalresource=no'><img src='../img/folder_up.gif' border='0' />".get_lang(
'LevelUp'
)."</a>";
echo "<a href='".api_get_self()."?content=Document&amp;source_forum=".$_GET['source_forum']."&amp;source_id=$source_id&amp;action=$action&amp;learnpath_id=$learnpath_id&amp;chapter_id=$chapter_id&amp;originalresource=no'>
".Display::return_icon('folder_up.gif')." ".get_lang('LevelUp')."</a>";
}
if ($level and $level != 0 and $level != 1) {
$folder_up = $folder;
@ -54,9 +52,8 @@ function show_folder_up()
unset($folder_temp[$last]);
$folder_up = implode('/', $folder_temp);
echo "<a href='".api_get_self(
)."?content=Document&amp;source_forum=".$_GET['source_forum']."&amp;folder=$folder_up&amp;source_id=$source_id&amp;action=$action&amp;learnpath_id=$learnpath_id&amp;chapter_id=$chapter_id&amp;originalresource=no'><img src='../img/folder_up.gif' border='0' />".get_lang(
'LevelUp'
)."</a>";
)."?content=Document&amp;source_forum=".$_GET['source_forum']."&amp;folder=$folder_up&amp;source_id=$source_id&amp;action=$action&amp;learnpath_id=$learnpath_id&amp;chapter_id=$chapter_id&amp;originalresource=no'>
".Display::return_icon('folder_up.gif')." ".get_lang('LevelUp')."</a>";
}
}
@ -86,10 +83,10 @@ function show_documents($folder)
if (FileManager::get_levels($row['path']) - 1 == 1) {
// showing the right icon
if (file_or_folder($row['path'])) {
echo '<img src="../img/file.gif" align="middle" />';
echo Display::return_icon('file.gif');
} else {
$image = FileManager::choose_image($row['path']);
echo "<img src=\"../img/$image\" align=\"middle\" />";
echo Display::return_icon($image);
}
// folders should be clickable
@ -140,10 +137,10 @@ function show_documents($folder)
$good_key = key($good_paths);
// showing the right icon
if (file_or_folder($path)) {
echo '<img src="../img/file.gif" align="middle" />';
echo Display::return_icon('file.gif');
} else {
$image = FileManager::choose_image($path);
echo "<img src=\"../img/$image\" align=\"middle\" />";
echo Display::return_icon($image);
}
// folders should be clickable
@ -234,19 +231,19 @@ function display_addedresource_link($type, $id, $style = '')
$TABLEAGENDA = Database::get_course_table(TABLE_AGENDA);
$result = Database::query("SELECT * FROM $TABLEAGENDA WHERE c_id = $course_id AND id=$id");
$myrow = Database::fetch_array($result);
echo '<img src="../img/agenda.gif" align="middle" /> <a href="../calendar/agenda.php"'.$styling.'>'.$myrow['title']."</a><br />\n";
echo Display::return_icon('agenda.gif').' <a href="../calendar/agenda.php"'.$styling.'>'.$myrow['title']."</a><br />\n";
break;
case 'Ad_Valvas':
$tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT);
$result = Database::query("SELECT * FROM $tbl_announcement WHERE c_id = $course_id AND id=$id");
$myrow = Database::fetch_array($result);
echo '<img src="../img/valves.gif" align="middle" /> <a href="../announcements/announcements.php"'.$styling.'>'.$myrow['title']."</a><br />\n";
echo Display::return_icon('valves.gif').' <a href="../announcements/announcements.php"'.$styling.'>'.$myrow['title']."</a><br />\n";
break;
case 'Link':
Database::get_course_table(TABLE_LINK);
$result = Database::query("SELECT * FROM $TABLETOOLLINK WHERE c_id = $course_id AND id=$id");
$myrow = Database::fetch_array($result);
echo '<img src="../img/links.gif" align="middle" /> <a href="#" onclick="javascript:window.open(\'../link/link_goto.php?link_id='.$myrow['id'].'&amp;link_url='.urlencode(
echo Display::return_icon('links.gif').' <a href="#" onclick="javascript:window.open(\'../link/link_goto.php?link_id='.$myrow['id'].'&amp;link_url='.urlencode(
$myrow['url']
)."','MyWindow','width=500,height=400,top='+((screen.height-400)/2)+',left='+((screen.width-500)/2)+',scrollbars=1,resizable=1,menubar=1'); return false;\"".$styling.'>'.$myrow['title']."</a><br />\n";
break;
@ -254,13 +251,13 @@ function display_addedresource_link($type, $id, $style = '')
$TBL_EXERCICES = Database::get_course_table(TABLE_QUIZ_TEST);
$result = Database::query("SELECT * FROM $TBL_EXERCICES WHERE c_id = $course_id AND id=$id");
$myrow = Database::fetch_array($result);
echo '<img src="../img/quiz.gif" align="middle" /> <a href="../exercice/exercise_submit.php?exerciseId='.$myrow['id'].'"'.$styling.'>'.$myrow['title']."</a><br />\n";
echo Display::return_icon('quiz.gif').' <a href="../exercice/exercise_submit.php?exerciseId='.$myrow['id'].'"'.$styling.'>'.$myrow['title']."</a><br />\n";
break;
case 'Forum':
$TBL_FORUMS = Database::get_course_table(TABLE_FORUM);
$result = Database::query("SELECT * FROM $TBL_FORUMS WHERE c_id = $course_id AND forum_id=$id");
$myrow = Database::fetch_array($result);
echo '<img src="../img/forum.gif" align="middle" /> <a href="../phpbb/viewforum.php?forum='.$myrow['forum_id'].'&amp;md5='.$myrow['md5'].'"'.$styling.'>'.$myrow['forum_name']."</a><br />\n";
echo Display::return_icon('forum.gif').' <a href="../phpbb/viewforum.php?forum='.$myrow['forum_id'].'&amp;md5='.$myrow['md5'].'"'.$styling.'>'.$myrow['forum_name']."</a><br />\n";
break;
case 'Thread': //=topics
//deprecated
@ -275,7 +272,7 @@ function display_addedresource_link($type, $id, $style = '')
$sql_title = "SELECT * FROM $tbl_posts_text WHERE post_id=".$myrow["post_id"];
$result_title = Database::query($sql_title);
$myrow_title = Database::fetch_array($result_title);
echo '<img src="../img/forum.gif" align="middle" /> <a href="../phpbb/viewtopic.php?topic='.$myrow['topic_id'].'&amp;forum='.$myrow['forum_id'].'&amp;md5='.$myrow['md5'].'"'.$styling.'>'.$myrow_title['post_title']."</a><br />\n";
echo Display::return_icon('forum.gif').' <a href="../phpbb/viewtopic.php?topic='.$myrow['topic_id'].'&amp;forum='.$myrow['forum_id'].'&amp;md5='.$myrow['md5'].'"'.$styling.'>'.$myrow_title['post_title']."</a><br />\n";
break;
case 'Post':
//deprecated
@ -284,7 +281,7 @@ function display_addedresource_link($type, $id, $style = '')
$sql = "SELECT * FROM $tbl_post p, $tbl_post_text t WHERE p.post_id = t.post_id AND p.post_id = $id";
$result = Database::query($sql);
$post = Database::fetch_object($result);
echo '<img src="../img/forum.gif" align="middle" /> <a href="../phpbb/viewtopic.php?topic='.$post->topic_id.'&amp;forum='.$post->forum_id.'"'.$styling.'>'.$post->post_title."</a><br />\n";
echo Display::return_icon('forum.gif').' <a href="../phpbb/viewtopic.php?topic='.$post->topic_id.'&amp;forum='.$post->forum_id.'"'.$styling.'>'.$post->post_title."</a><br />\n";
break;
case 'Document':
$dbTable = Database::get_course_table(TABLE_DOCUMENT);
@ -298,10 +295,10 @@ function display_addedresource_link($type, $id, $style = '')
$ext = strtolower($ext[sizeof($ext) - 1]);
$myrow['path'] = rawurlencode($myrow['path']);
$in_frames = in_array($ext, array('htm', 'html', 'gif', 'jpg', 'jpeg', 'png'));
echo '<img src="../img/'.$image.'" align="middle" /> <a href="../document/'.($in_frames ? 'showinframes.php?file=' : 'download.php?doc_url=').$myrow['path'].'"'.$styling.'>'.$filename."</a><br />\n";
echo Display::return_icon($image).' <a href="../document/'.($in_frames ? 'showinframes.php?file=' : 'download.php?doc_url=').$myrow['path'].'"'.$styling.'>'.$filename."</a><br />\n";
break;
case 'Externallink':
echo '<img src="../img/links.gif" align="middle" /> <a href="'.$id.'"'.$styling.'>'.$id."</a><br />\n";
echo Display::return_icon('links.gif').' <a href="'.$id.'"'.$styling.'>'.$id."</a><br />\n";
break;
}
}
@ -361,10 +358,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
//echo "&nbsp;";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
}
}
if (($builder != 'builder') and ($icon != 'wrap')) {
@ -383,7 +379,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($myrow["title"], $length));
}
if ($icon == 'icon') {
echo "<img src='../img/agenda.gif' align=\"absmiddle\" alt='agenda'>";
echo Display::return_icon('agenda.gif');
}
if ($builder != 'builder') {
echo "<a href=\"".api_get_self(
@ -441,9 +437,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
//echo "&nbsp;";
}
}
@ -464,7 +460,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($title, $length));
}
if ($icon == 'icon') {
echo "<img src='../img/valves.gif' align=\"absmiddle\" alt='ad valvas'>";
echo Display::return_icon('valves.gif');
}
if ($builder != 'builder') {
echo "<a href=\"".api_get_self(
@ -514,10 +510,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
//echo "&nbsp;";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
}
}
if (($builder != 'builder') and ($icon != 'wrap')) {
@ -537,9 +532,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon == 'icon') {
if ($linktype == 'Link _self') {
echo "<img src='../img/links.gif' align=\"absmiddle\" alt='links'>";
echo Display::return_icon('links.gif');
} else {
echo "<img src='../img/link_blank.gif' align=\"absmiddle\" alt='blank links'>";
echo Display::return_icon('link_blank.gif');
}
}
$thelink = $myrow["url"];
@ -596,10 +591,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
//echo "&nbsp;";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
}
}
if (($builder != 'builder') and ($icon != 'wrap')) {
@ -618,7 +612,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($myrow["title"], $length));
}
if ($icon == 'icon') {
echo "<img src='../img/quiz.gif' align=\"absmiddle\" alt='quizz'>";
echo Display::return_icon('quiz.gif');
}
if ($builder != 'builder') {
echo "<a href=\"".api_get_self(
@ -676,10 +670,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
//echo "&nbsp;";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
}
}
if (($builder != 'builder') and ($icon != 'wrap')) {
@ -698,7 +691,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($name, $length));
}
if ($icon == 'icon') {
echo "<img src='../img/jqz.gif' align=\"absmiddle\" alt='hot potatoes'>";
echo Display::return_icon('jqz.gif');
}
$cid = $_course['official_code'];
@ -751,9 +744,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
//echo "&nbsp;";
}
}
@ -774,7 +767,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($myrow["forum_name"], $length));
}
if ($icon == 'icon') {
echo "<img src='../img/forum.gif' align=\"absmiddle\" alt='forum'>";
echo Display::return_icon('forum.gif');
}
$forumparameters = "forum=".$myrow["forum_id"]."&md5=".$myrow["md5"];
if ($builder != 'builder') {
@ -829,10 +822,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
//echo "&nbsp;";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
}
}
if (($builder != 'builder') and ($icon != 'wrap')) {
@ -852,7 +844,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($myrow["topic_title"], $length));
}
if ($icon == 'icon') {
echo "<img src='../img/forum.gif' align=\"absmiddle\" alt='forum'>";
echo Display::return_icon('forum.gif');
}
if ($builder != 'builder') {
echo "<a href=\"".api_get_self(
@ -916,10 +908,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
//echo "&nbsp;";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
}
}
if (($builder != 'builder') and ($icon != 'wrap')) {
@ -939,7 +930,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($myrow_titel["post_title"], $length));
}
if ($icon == 'icon') {
echo "<img src='../img/forum.gif' align=\"absmiddle\" alt='forum'>";
echo Display::return_icon('forum.gif');
}
if ($builder != 'builder') {
echo "<a href=\"".api_get_self(
@ -986,9 +977,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
//echo "&nbsp;";
}
}
@ -1017,7 +1008,8 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($filename, $length));
}
if ($icon == 'icon') {
echo "<img src='../img/$image' align=\"absmiddle\" alt='$image'>";
echo Display::return_icon($image);
}
if ($builder != 'builder') {
echo "<a href=\"".api_get_self(
@ -1073,9 +1065,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
//echo "&nbsp;";
}
}
@ -1095,7 +1087,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($name, $length));
}
if ($icon == 'icon') {
echo "<img src='../img/works.gif' align=\"absmiddle\">";
echo Display::return_icon('works.gif');
}
if ($builder != 'builder') {
echo "<a href=\"".api_get_self(
@ -1141,9 +1133,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
//echo "&nbsp;";
}
}
@ -1163,7 +1155,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($name, $length));
}
if ($icon == 'icon') {
echo "<img src='../img/dropbox.gif' align=\"absmiddle\">";
echo Display::return_icon('dropbox.gif');
}
if ($builder != 'builder') {
@ -1210,9 +1202,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
//echo "&nbsp;";
}
}
@ -1232,7 +1224,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($name, $length));
}
if ($icon == 'icon') {
echo "<img src='../img/introduction.gif' align=\"absmiddle\" alt='introduction'>";
echo Display::return_icon('introduction.gif');
}
if ($builder != 'builder') {
@ -1277,9 +1269,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
//echo "&nbsp;";
}
}
@ -1299,7 +1291,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($name, $length));
}
if ($icon == 'icon') {
echo "<img src='../img/info.gif' align=\"absmiddle\" alt='info'>";
echo Display::return_icon('info.gif');
}
if ($builder != 'builder') {
@ -1344,9 +1336,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
//echo "&nbsp;";
}
}
@ -1366,7 +1358,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($name, $length));
}
if ($icon == 'icon') {
echo "<img src='../img/group.gif' align=\"absmiddle\" alt='group'>";
echo Display::return_icon('group.gif');
}
if ($builder != 'builder') {
@ -1413,10 +1405,9 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
}
if ($icon != 'nolink') {
if ($completed == 'completed') {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>";
echo Display::return_icon('checkbox_on2.gif');
} else {
echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>";
//echo "&nbsp;";
echo Display::return_icon('checkbox_on2.gif', 'on', array('style' => 'visibility: hidden'));
}
}
if (($builder != 'builder') and ($icon != 'wrap')) {
@ -1435,7 +1426,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
return (shorten($name, $length));
}
if ($icon == 'icon') {
echo "<img src='../img/members.gif' align=\"absmiddle\" alt='members'>";
echo Display::return_icon('members.gif');
}
if ($builder != 'builder') {
@ -1790,11 +1781,9 @@ function remove_resource($resource_key)
function show_addresource_button($additionalparameters = '')
{
global $charset;
echo '<label for="addresources"><img src="../img/attachment.gif" /></label><input class="link_alike" type="submit" name="addresources" id="addresources" value="'.api_htmlentities(
get_lang('Attachment'),
ENT_QUOTES,
$charset
).'" '.$additionalparameters.' />';
echo '<label for="addresources">
'.Display::return_icon('attachment.gif').'</label>
<input class="link_alike" type="submit" name="addresources" id="addresources" value="'.api_htmlentities(get_lang('Attachment'),ENT_QUOTES, $charset).'" '.$additionalparameters.' />';
}
/**
@ -1901,14 +1890,6 @@ function update_added_resources($type, $id)
*/
function display_added_resources($type, $id, $style = '')
{
// the array containing the icons
$arr_icons = array(
'Agenda' => '../img/agenda.gif',
'Ad Valvas' => '../img/valves.gif',
'Link' => '../img/links.gif',
'Exercise' => '../img/quiz.gif'
);
$_course = api_get_course_info();
global $origin;
$TABLERESOURCE = Database::get_course_table(TABLE_LINKED_RESOURCES, $_course['dbName']);
@ -1983,18 +1964,12 @@ function display_resources($showdeleteimg)
parse_str($test['query'], $output);
if ($showdeleteimg == 1) {
//if (strstr($_SERVER['REQUEST_URI'],"?id="))
// { echo " <a href='".api_get_self()."?id=".$output['id']."&amp;"; }
//else
// { echo " <a href='".api_get_self()."?"; }
//action=$action&id=$id&
//echo "action=$action&amp;id=$id&amp;originalresource=no&amp;resourceaction=removeresource&amp;key=".key($addedresource)."'><img src='../img/delete.gif' border='0' alt='resource ".get_lang('Delete')."' /></a><br />";
echo "<a href=".api_get_self(
)."?showresources=true&amp;source_forum=".$_GET['source_forum']."&amp;resourceaction=removeresource&amp;locationkey=".key(
$addedresource
)."&amp;source_id=$source_id&amp;action=$action&amp;learnpath_id=$learnpath_id&amp;chapter_id=$chapter_id&amp;originalresource=no><img src='../img/delete.gif' border='0' alt='resource ".get_lang(
'Delete'
)."' /></a><br />";
)."&amp;source_id=$source_id&amp;action=$action&amp;learnpath_id=$learnpath_id&amp;chapter_id=$chapter_id&amp;originalresource=no>
".Display::return_icon('delete.gif', get_lang('Delete'))."
</a><br />";
}
echo '</td></tr>';
next($addedresource);

@ -637,7 +637,7 @@ if ($content == "Agenda") {
while ($myrow = Database::fetch_array($result)) {
echo "<table width=\"100%\"><tr><td bgcolor=\"#E6E6E6\">";
echo "<img src='../img/agenda.gif' alt='agenda'>";
echo Display::return_icon('agenda.gif');
echo api_convert_and_format_date($myrow["start_date"], null, date_default_timezone_get())."<br />";
echo "<b>".$myrow["title"]."</b></td></tr><tr><td>";
echo $myrow["content"]."<br />";
@ -688,7 +688,8 @@ if ($content == "Document" OR (empty($content) AND (api_is_allowed_to_edit() OR
// showing the blue bar with the path in it when we are not in the root
if (FileManager::get_levels($folder)) {
echo "<table width=\"100%\"><tr><td bgcolor=\"#4171B5\">";
echo "<img src=\"../img/opendir.gif\" alt='directory'><font color=\"#ffffff\"><b>";
echo Display::return_icon('opendir.gif');
echo "<font color=\"#ffffff\"><b>";
echo $folder."</b></font></td></tr></table>";
}
@ -709,7 +710,7 @@ if ($content == "Ad_Valvas") {
$result = Database::query($sql);
while ($myrow = Database::fetch_array($result)) {
echo "<table width=\"100%\"><tr><td>";
echo "<img src='../img/valves.gif' alt='advalvas'>";
echo Display::return_icon('valves.gif');
echo api_convert_and_format_date($myrow["end_date"], DATE_FORMAT_LONG, date_default_timezone_get());
echo "</td></tr><tr><td>";
echo $myrow["title"]."<br />";
@ -741,7 +742,9 @@ if ($content == "Forum") {
echo "<tr><td bgcolor='#4171B5' colspan='2'><font color='white'><b>".$myrow["cat_title"]."</b></font></td></tr>";
}
$old_cat_title = $myrow["cat_title"];
echo "<tr><td><img src='../img/forum.gif'><a href='".api_get_self(
echo "<tr><td>";
echo Display::return_icon('forum.gif');
echo "<a href='".api_get_self(
)."?content=Forum&category=".$myrow["cat_id"]."&forum=".$myrow["forum_id"]."&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no'>".$myrow["forum_name"]."</td><td>";
showorhide_addresourcelink("Forum", $myrow["forum_id"]);
echo "</td></tr>";
@ -822,7 +825,8 @@ if ($content == "Link") {
if (Database::num_rows($result) > 0) {
echo "<table width=\"100%\"><tr><td bgcolor=\"#E6E6E6\"><i>".get_lang('NoCategory')."</i></td></tr></table>";
while ($myrow = Database::fetch_array($result)) {
echo "<img src='../img/links.gif'>".$myrow["title"];
echo Display::return_icon('links.gif');
echo $myrow["title"];
echo "<br>";
showorhide_addresourcelink($content, $myrow["id"]);
echo "<br><br>";
@ -837,7 +841,8 @@ if ($content == "Link") {
echo "<table width=\"100%\"><tr><td bgcolor=\"#E6E6E6\"><i>".$myrow["category_title"]."</i></td></tr></table>";
$result_links = Database::query($sql_links);
while ($myrow = Database::fetch_array($result_links)) {
echo "<img src='../img/links.gif' />".$myrow["title"];
echo Display::return_icon('links.gif');
echo $myrow["title"];
echo "<br>";
showorhide_addresourcelink($content, $myrow["id"]);
echo "<br><br>";
@ -854,7 +859,8 @@ if (($content == "Exercise") or ($content == "HotPotatoes")) {
$TBL_EXERCICES = Database::get_course_table(TABLE_QUIZ_TEST);
$result = Database::query("SELECT * FROM ".$TBL_EXERCICES." WHERE active='1' ORDER BY id ASC");
while ($myrow = Database::fetch_array($result)) {
echo "<img src='../img/quiz.gif'>".$myrow["title"]."<br>";
echo Display::return_icon('quiz.gif');
echo $myrow["title"]."<br>";
showorhide_addresourcelink($content, $myrow["id"]);
echo "<br><br>";
}
@ -867,7 +873,8 @@ if (($content == "Exercise") or ($content == "HotPotatoes")) {
$result = Database::query($sql);
while ($myrow = Database::fetch_array($result)) {
$path = $myrow["path"];
echo "<img src='../img/jqz.gif'>".GetQuizName($path, $documentPath)."<br>";
echo Display::return_icon('jqz.gif');
echo GetQuizName($path, $documentPath)."<br>";
showorhide_addresourcelink("HotPotatoes", $myrow["id"]);
echo "<br><br>";
@ -1014,11 +1021,6 @@ if ($showresources) {
//echo "<h4>".get_lang('ResourceAdded')."</h4>";
display_resources(1);
}
echo "</td></tr></table>";
/*
FOOTER
*/
Display :: display_footer();
?>

@ -53,26 +53,7 @@ function search_image_social() {
});
}
function show_icon_delete(element_html) {
elem_id=$(element_html).attr("id");
id_elem=elem_id.split("_");
ident="#img_"+id_elem[1];
$(ident).attr("src","../img/delete.png");
$(ident).attr("alt","'.get_lang('Delete', '').'");
$(ident).attr("title","'.get_lang('Delete', '').'");
}
function hide_icon_delete(element_html) {
elem_id=$(element_html).attr("id");
id_elem=elem_id.split("_");
ident="#img_"+id_elem[1];
$(ident).attr("src","../img/blank.gif");
$(ident).attr("alt","");
$(ident).attr("title","");
}
function clear_form () {
function clear_form() {
$("input[@type=radio]").attr("checked", false);
$("div#div_qualify_image").html("");
$("div#div_info_user").html("");
@ -120,7 +101,7 @@ if (count($friends) == 0) {
$friend = $friends[$j];
$user_name = api_xml_http_response_encode($friend['firstName'].' '.$friend['lastName']);
$friends_profile = SocialManager::get_picture_user($friend['friend_user_id'], $friend['image'], 92);
$friend_html .= '<div class="thumbnail" onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$friends[$j]['friend_user_id'].'>';
$friend_html .= '<div class="thumbnail" class="image-social-content" id=div_'.$friends[$j]['friend_user_id'].'>';
$friend_html .= '<img src="'.$friends_profile['file'].'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$user_name.'" /> ';
$friend_html .= '<div class="caption">
<a href="'.$userInfo['profile_url'].'"><h5>'.$user_name.'</h5></a>';

@ -113,7 +113,7 @@ function add_image_form() {
filepaths.appendChild(elem1);
id_elem1 = "filepath_"+counter_image;
id_elem1 = "\'"+id_elem1+"\'";
document.getElementById("filepath_"+counter_image).innerHTML = "<input type=\"file\" name=\"attach_"+counter_image+"\" size=\"20\" />&nbsp;<a href=\"javascript:remove_image_form("+id_elem1+")\"><img src=\"'.api_get_path(WEB_CODE_PATH).'img/delete.gif\"></a>";
document.getElementById("filepath_"+counter_image).innerHTML = "<input type=\"file\" name=\"attach_"+counter_image+"\" size=\"20\" />&nbsp;<a href=\"javascript:remove_image_form("+id_elem1+")\"><img src=\"'.api_get_path(WEB_IMG_PATH).'delete.gif\"></a>";
if (filepaths.childNodes.length == 3) {
var link_attach = document.getElementById("link-more-attach");

@ -62,7 +62,7 @@ function add_image_form() {
filepaths.appendChild(elem1);
id_elem1 = "filepath_"+counter_image;
id_elem1 = "\'"+id_elem1+"\'";
document.getElementById("filepath_"+counter_image).innerHTML = "<input type=\"file\" name=\"attach_"+counter_image+"\" size=\"20\" />&nbsp;<a href=\"javascript:remove_image_form("+id_elem1+")\"><img src=\"'.api_get_path(WEB_CODE_PATH).'img/delete.gif\"></a>";
document.getElementById("filepath_"+counter_image).innerHTML = "<input type=\"file\" name=\"attach_"+counter_image+"\" size=\"20\" />&nbsp;<a href=\"javascript:remove_image_form("+id_elem1+")\"><img src=\"'.api_get_path(WEB_IMG_PATH).'delete.gif\"></a>";
if (filepaths.childNodes.length == 3) {
var link_attach = document.getElementById("link-more-attach");
@ -542,4 +542,4 @@ $tpl->assign('social_right_content', $social_right_content);
$tpl->assign('message', $show_message);
$tpl->assign('content', $content);
$social_layout = $tpl->get_template('layout/social_layout.tpl');
$tpl->display($social_layout);
$tpl->display($social_layout);

@ -162,11 +162,13 @@ function toogle_course (element_html, course_code){
my_image=image_show[2];
var content = \'social_content\' + id_elem[1];
if (my_image=="nolines_plus.gif") {
$(id_button).attr("src","../img/nolines_minus.gif"); var action = "load_course";
$(id_button).attr("src","'.api_get_path(WEB_IMG_PATH).'nolines_minus.gif");
var action = "load_course";
$("div#"+content).show("fast");
} else {
$("div#"+content).hide("fast");
$(id_button).attr("src","../img/nolines_plus.gif"); var action = "unload";
$(id_button).attr("src","'.api_get_path(WEB_IMG_PATH).'nolines_plus.gif");
var action = "unload";
return false;
}

@ -50,7 +50,7 @@ if ($query !='') {
$url = $user_info['profile_url'];
if (empty($user['picture_uri'])) {
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/unknown_180_100.jpg';
$picture['file'] = api_get_path(WEB_IMG_PATH).'unknown_180_100.jpg';
$img = '<img src="'.$picture['file'].'">';
} else {
$picture = UserManager::get_picture_user($user['user_id'], $user['picture_uri'], 80, USER_IMAGE_SIZE_ORIGINAL);

@ -1545,10 +1545,7 @@ class survey_question
*/
function create_form($form_content)
{
global $survey_data;
//$tool_name = '<img src="../img/'.self::icon_question($_GET['type']).'" alt="'.get_lang(ucfirst($_GET['type'])).'" title="'.get_lang(ucfirst($_GET['type'])).'" />';
$tool_name = Display::return_icon(
survey_manager::icon_question(Security::remove_XSS($_GET['type'])),
get_lang(ucfirst(Security::remove_XSS($_GET['type']))),
@ -1875,15 +1872,14 @@ class ch_yesno extends survey_question
$this->html .= ' <table>';
$this->html .= ' <tr>';
$this->html .= ' <td align="right"><label for="answers[0]">1</label></td>';
$this->html .= ' <td width="550">'.api_return_html_area('answers[0]', stripslashes($form_content['answers'][0]), '', '', null, array('ToolbarSet' => 'Survey', 'Width' => '100%', 'Height' => '120')).'</td>';
$this->html .= ' <td><input style="width:22px" src="../img/icons/22/down.png" type="image" class="down" value="move_down[0]" name="move_down[0]"/></td>';
$this->html .= ' <td><input style="width:22px" src="'.api_get_path(WEB_IMG_PATH).'icons/22/down.png" type="image" class="down" value="move_down[0]" name="move_down[0]"/></td>';
$this->html .= ' </tr>';
$this->html .= ' <tr>';
$this->html .= ' <td align="right"><label for="answers[1]">2</label></td>';
//$this->html .= ' <td><input type="text" name="answers[1]" id="answers[1]" value="'.$form_content['answers'][1].'" /></td>';
$this->html .= ' <td width="550">'.api_return_html_area('answers[1]', stripslashes($form_content['answers'][1]), '', '', null, array('ToolbarSet' => 'Survey', 'Width' => '100%', 'Height' => '120')).'</td>';
$this->html .= ' <td><input style="width:22px" type="image" src="../img/icons/22/up.png" value="move_up[1]" name="move_up[1]" /></td>';
$this->html .= ' <td><input style="width:22px" type="image" src="'.api_get_path(WEB_IMG_PATH).'icons/22/up.png" value="move_up[1]" name="move_up[1]" /></td>';
$this->html .= ' </tr>';
$this->html .= ' </table>';
$this->html .= ' </div>';
@ -2274,13 +2270,13 @@ class ch_dropdown extends survey_question
).'" /></td>';
$this->html .= ' <td>';
if ($key < $total_number_of_answers - 1) {
$this->html .= ' <input type="image" style="width:22px" src="../img/icons/22/down.png" value="move_down['.$key.']" name="move_down['.$key.']"/>';
$this->html .= '<input type="image" style="width:22px" src='.api_get_path(WEB_IMG_PATH).'icons/22/down.png" value="move_down['.$key.']" name="move_down['.$key.']"/>';
}
if ($key > 0) {
$this->html .= ' <input type="image" style="width:22px" src="../img/icons/22/up.png" value="move_up['.$key.']" name="move_up['.$key.']"/>';
$this->html .= '<input type="image" style="width:22px" src='.api_get_path(WEB_IMG_PATH).'icons/22/up.png" value="move_up['.$key.']" name="move_up['.$key.']"/>';
}
if ($total_number_of_answers > 2) {
$this->html .= ' <input type="image" style="width:22px" src="../img/icons/22/delete.png" value="delete_answer['.$key.']" name="delete_answer['.$key.']"/>';
$this->html .= '<input type="image" style="width:22px" src='.api_get_path(WEB_IMG_PATH).'icons/22/delete.png" value="delete_answer['.$key.']" name="delete_answer['.$key.']"/>';
}
$this->html .= ' </td>';
$this->html .= ' </tr>';
@ -2492,13 +2488,13 @@ class ch_score extends survey_question
).'</td>';
$this->html .= ' <td>';
if ($key < $total_number_of_answers - 1) {
$this->html .= ' <input type="image" style="width:22px" src="../img/icons/22/down.png" value="move_down['.$key.']" name="move_down['.$key.']"/>';
$this->html .= ' <input type="image" style="width:22px" src='.api_get_path(WEB_IMG_PATH).'icons/22/down.png" value="move_down['.$key.']" name="move_down['.$key.']"/>';
}
if ($key > 0) {
$this->html .= ' <input type="image" style="width:22px" src="../img/icons/22/up.png" value="move_up['.$key.']" name="move_up['.$key.']"/>';
$this->html .= ' <input type="image" style="width:22px" src='.api_get_path(WEB_IMG_PATH).'icons/22/up.png" value="move_up['.$key.']" name="move_up['.$key.']"/>';
}
if ($total_number_of_answers > 2) {
$this->html .= ' <input type="image" style="width:22px" src="../img/icons/22/delete.png" value="delete_answer['.$key.']" name="delete_answer['.$key.']"/>';
$this->html .= ' <input type="image" style="width:22px" src='.api_get_path(WEB_IMG_PATH).'icons/22/delete.png" value="delete_answer['.$key.']" name="delete_answer['.$key.']"/>';
}
$this->html .= ' </td>';
$this->html .= ' </tr>';
@ -5566,4 +5562,4 @@ class SurveyUtil
return false;
}
}
}
}

@ -156,8 +156,10 @@ if ($survey_data['survey_type'] == 0) {
echo '</div>';
} else {
echo '<div class="actionsbig">';
//echo '<a href="group.php?'.api_get_cidreq().'&amp;action=add&amp;survey_id='.$survey_id.'"><img src="../img/yesno.gif" /><br />'.get_lang('Add groups').'</a></div>';
echo '<a style="padding-left:0px;" href="question.php?'.api_get_cidreq().'&amp;action=add&type=personality&amp;survey_id='.$survey_id.'"><img src="../img/yesno.gif" /></a></div>';
echo '<a style="padding-left:0px;" href="question.php?'.api_get_cidreq().'&amp;action=add&type=personality&amp;survey_id='.$survey_id.'">
'.Display::return_icon('yesno.gif').'
</a>
</div>';
echo '</div>';
}
@ -291,4 +293,4 @@ if ($is_survey_type_1) {
}
// Footer
Display :: display_footer();
Display :: display_footer();

@ -1,7 +1,7 @@
<div class="span6">
<div class="span6">
<div class="well_border">
<h4>
<img src="{{ _p.web_main }}img/icons/22/user.png" alt="{{ 'Users' | get_lang }}">
<img src="{{ _p.web_img_path }}icons/22/user.png" alt="{{ 'Users' | get_lang }}">
{{ 'Users' | get_lang }}
</h4>
<div style="list-style-type:none">
@ -43,7 +43,7 @@
<div class="span6">
<div class="well_border ">
<h4>
<img src="{{ _p.web_main }}img/icons/22/session.png" alt="{{ 'Sessions' | trans }}">{{ 'Sessions' | trans }}
<img src="{{ _p.web_img_path }}icons/22/session.png" alt="{{ 'Sessions' | trans }}">{{ 'Sessions' | trans }}
</h4>
<div style="list-style-type:none">
<form method="GET" class="form-search" action="{{ _p.web_main }}session/session_list.php">

@ -1,14 +1,14 @@
<script>
$(document).ready( function() {
$('.toggle_student_view').on('click', function() {
$.ajax({
url: '{{ url('toggle_student_view') }}',
success: function(data) {
location.reload();
}
});
$(document).ready( function() {
$('.toggle_student_view').on('click', function() {
$.ajax({
url: '{{ url('toggle_student_view') }}',
success: function(data) {
location.reload();
}
});
});
});
</script>
{% if breadcrumb %}
@ -30,4 +30,4 @@
{% endif %}
{% endif %}
</ul>
{% endif %}
{% endif %}

@ -177,6 +177,7 @@ $(document).ready( function() {
* */
$(".advanced_options").on("click", function() {
event.preventDefault();
var id = $(this).attr('id') + '_options';
var button = $(this);
$("#"+id).toggle(function() {
@ -190,11 +191,13 @@ $(document).ready( function() {
* <div id="div_id">Div content</div>
* */
$(".advanced_options_open").on("click", function() {
event.preventDefault();
var id = $(this).attr('rel');
$("#"+id).show();
});
$(".advanced_options_close").on("click", function() {
event.preventDefault();
var id = $(this).attr('rel');
$("#"+id).hide();
});

@ -108,7 +108,7 @@
{% if app.breadcrumbs %}
{{ app.breadcrumbs }}
{% else %}
{% include app.template_style ~ "/layout/breadcrumb.tpl" %}
{% include app.template_style ~ "/layout/breadcrumb.tpl" %}
{% endif %}
</header>

@ -2,24 +2,24 @@
{{javascript}}
<script type="text/javascript">
{% if is_allowed_to_edit %}
var sec_token = '{{sec_token}}';
{% endif %}
$(function() {
$('.collapsible .head').click(function(e) {
$(this).toggleClass('collapsed');
$(this).next().toggle();
return true;
});
{% if is_allowed_to_edit %}
$(".categories.sortable" ).sortable({
axis: 'y',
handle: '.handle',
//placeholder: 'ui-state-highlight',
update: function(event, ui) {
update: function(event, ui) {
var c_id = 0;
var ids = [];
var items;
@ -27,8 +27,8 @@ $(function() {
items.each(function(index, li){
li = $(li);
var id;
id = li.attr('data-id');
c_id = li.attr('data-c_id');
id = li.attr('data-id');
c_id = li.attr('data-c_id');
ids.push(id);
});
@ -40,7 +40,7 @@ $(function() {
$(".links.sortable" ).sortable({
axis: 'y',
placeholder: 'ui-state-highlight',
update: function(event, ui) {
update: function(event, ui) {
var c_id = 0;
var ids = [];
var items;
@ -48,8 +48,8 @@ $(function() {
items.each(function(index, li){
li = $(li);
var id;
id = li.attr('data-id');
c_id = li.attr('data-c_id');
id = li.attr('data-id');
c_id = li.attr('data-c_id');
ids.push(id);
});
@ -57,27 +57,27 @@ $(function() {
}
});
$(".links.sortable" ).disableSelection();
{% endif %}
});
function expand_all(){
$('.collapsible .head').removeClass('collapsed').next().show();
}
function collapse_all(){
function collapse_all(){
$('.collapsible .head').addClass('collapsed').next().hide();
}
function delete_category(name){
function delete_category(name){
if(!confirm("{{'ConfirmYourChoice'|get_lang}}")){
return false;
}
}
var item = $('#'+name);
var id = item.attr('data-id');
var c_id = item.attr('data-c_id');
var id = item.attr('data-id');
var c_id = item.attr('data-c_id');
var f = function(data){
if(data.success){
@ -87,12 +87,12 @@ $(function() {
};
LinkCategory.del(c_id, id, f);
}
function delete_all(){
if(!confirm("{{'ConfirmYourChoice'|get_lang}}")){
return false;
}
}
var f = function(data){
if(data.success){
var item = $('.data');
@ -101,22 +101,22 @@ $(function() {
message.update(data);
};
Link.delete_by_course({{c_id}}, {{session_id}}, f);
}
function delete_link(name, btn){
function delete_link(name, btn){
if(!confirm("{{'ConfirmYourChoice'|get_lang}}")){
return false;
}
}
var item = $('#'+name);
var id = item.attr('data-id');
var c_id = item.attr('data-c_id');
var id = item.attr('data-id');
var c_id = item.attr('data-c_id');
var f = function(data){
if(data.success){
item.remove();
}else{
}else{
$(btn).removeClass("loading");
}
message.update(data);
@ -124,12 +124,12 @@ $(function() {
$(btn).addClass("loading");
Link.del(c_id, id, f);
}
function switch_li_visibility(name, btn)
{
var li = $('#'+name);
var id = li.attr('data-id');
var c_id = li.attr('data-c_id');
var id = li.attr('data-id');
var c_id = li.attr('data-c_id');
var is_visible = !li.hasClass('invisible')
@ -161,9 +161,9 @@ function switch_li_visibility(name, btn)
function validate_link(name, btn){
var li = $('#'+name);
var id = li.attr('data-id');
var c_id = li.attr('data-c_id');
var id = li.attr('data-id');
var c_id = li.attr('data-c_id');
var f = function(data){
if(data.success){
li.addClass('valid');
@ -229,10 +229,10 @@ function validate_link(name, btn){
<li id="link_{{link.id}}" class="link {{link_class}}" data-id="{{link.id}}" data-c_id="{{link.c_id}}" data-type="link" >
<a class="icon" target="{{link.target}}" href="{{root}}&amp;action=go&amp;id={{link.id}}&amp;c_id={{link.c_id}}">
<img alt="{{'Links'|get_lang}}" src="../../main/img/link.gif" />
<img alt="{{'Links'|get_lang}}" src="{{ _p.web_img_path }}link.gif" />
</a>
<a class="title" target="{{link.target}}" href="{{root}}&amp;action=go&amp;id={{link.id}}&amp;c_id={{link.c_id}}">
{%if link.title %}{{link.title}}{% else %}{{link.url}}{%endif%}
{%if link.title %}{{link.title}}{% else %}{{link.url}}{%endif%}
</a>
{% if link.session_id %}
{{session_image}}
@ -240,19 +240,19 @@ function validate_link(name, btn){
<div class="status" style="display:inline-block;">&nbsp;</div>
{% if is_allowed_to_edit %}
<div style="float:right;">
<a href="javascript:void(0)" onclick="validate_link('link_{{link.id}}', this);return false;"
title="{{'CheckURL'|get_lang}}"
<a href="javascript:void(0)" onclick="validate_link('link_{{link.id}}', this);return false;"
title="{{'CheckURL'|get_lang}}"
class="btn validate_link">
</a>
<a href="{{root}}&amp;action=edit_link&amp;id={{link.id}}&amp;c_id={{link.c_id}}"
title="{{'Edit'|get_lang}}"
</a>
<a href="{{root}}&amp;action=edit_link&amp;id={{link.id}}&amp;c_id={{link.c_id}}"
title="{{'Edit'|get_lang}}"
class="">
<i class="size-22 icon-edit"></i>
</a>
<a href="javascript:void(0)" onclick="switch_li_visibility('link_{{link.id}}', this);return false;"
</a>
<a href="javascript:void(0)" onclick="switch_li_visibility('link_{{link.id}}', this);return false;"
class="btn visibility {%if link.visibility == 1%}hide{%else%}show{%endif%}">
</a>
<a href="javascript:void(0)" onclick="delete_link('link_{{link.id}}', this);return false;" title="{{'Delete'|get_lang}}" class="">
<i class="size-22 icon-delete"></i>
@ -267,17 +267,17 @@ function validate_link(name, btn){
<ul id="link_categories" class="categories sortable" style="list-style: none; margin-left:0;">
{% for category in categories %}
<li id="category_{{category.id}}" class="link_category collapsible" data-id="{{category.id}}" data-c_id="{{category.c_id}}" data-type="category" >
<div class="head handle collapsed">
<div class="head handle collapsed">
{% if is_allowed_to_edit %}
<div style="float:right;">
<a href="{{root}}&amp;action=edit_category&amp;id={{category.id}}&amp;c_id={{category.c_id}}"
onclick="event.stopPropagation();"
<a href="{{root}}&amp;action=edit_category&amp;id={{category.id}}&amp;c_id={{category.c_id}}"
onclick="event.stopPropagation();"
title="{{'Edit'|get_lang}}"
class="">
<i class="size-22 icon-edit"></i>
</a>
<a href="javascript:void(0)"
onclick="delete_category('category_{{category.id}}');event.stopPropagation();return false;"
</a>
<a href="javascript:void(0)"
onclick="delete_category('category_{{category.id}}');event.stopPropagation();return false;"
title="{{'Delete'|get_lang}}"
class="">
<i class="size-22 icon-delete"></i>
@ -289,7 +289,7 @@ function validate_link(name, btn){
</h3>
{{category.description}}
</div>
<div class="body" style="display:none;">
<div class="body" style="display:none;">
<ul style="list-style: none; margin-left:0;" class="links sortable">
{% for link in category.links %}
{% set link_class %}
@ -301,10 +301,10 @@ function validate_link(name, btn){
<li id="link_{{link.id}}" class="link {{link_class}}" data-id="{{link.id}}" data-c_id="{{link.c_id}}" data-type="link" >
<a class="icon" target="{{link.target}}" href="{{root}}&amp;action=go&amp;id={{link.id}}&amp;c_id={{link.c_id}}">
<img alt="{{'Links'|get_lang}}" src="../../main/img/link.gif" />
<img alt="{{'Links'|get_lang}}" src="{{ _p.web_img_path }}link.gif" />
</a>
<a class ="title" target="{{link.target}}" href="{{root}}&amp;action=go&amp;id={{link.id}}&amp;c_id={{link.c_id}}">
{%if link.title %}{{link.title}}{% else %}{{link.url}}{%endif%}
{%if link.title %}{{link.title}}{% else %}{{link.url}}{%endif%}
</a>
{% if link.session_id %}
{{session_image}}
@ -312,20 +312,20 @@ function validate_link(name, btn){
<div class="status" style="display:inline-block;">&nbsp;</div>
{% if is_allowed_to_edit %}
<div style="float:right;">
<a href="javascript:void(0)" onclick="validate_link('link_{{link.id}}', this);return false;"
title="{{'CheckURL'|get_lang}}"
class="btn validate_link"></a>
<a href="{{root}}&amp;action=edit_link&amp;id={{link.id}}&amp;c_id={{link.c_id}}"
onclick=""
<a href="javascript:void(0)" onclick="validate_link('link_{{link.id}}', this);return false;"
title="{{'CheckURL'|get_lang}}"
class="btn validate_link"></a>
<a href="{{root}}&amp;action=edit_link&amp;id={{link.id}}&amp;c_id={{link.c_id}}"
onclick=""
title="{{'Edit'|get_lang}}"
class="">
<i class="size-22 icon-edit"></i>
</a>
<a href="javascript:void(0)"
onclick="switch_li_visibility('link_{{link.id}}', this);return false;"
</a>
<a href="javascript:void(0)"
onclick="switch_li_visibility('link_{{link.id}}', this);return false;"
class="btn visibility {%if link.visibility == 1%}hide{%else%}show{%endif%}"></a>
<a href="javascript:void(0)"
onclick="delete_link('link_{{link.id}}', this);return false;"
<a href="javascript:void(0)"
onclick="delete_link('link_{{link.id}}', this);return false;"
title="{{'Delete'|get_lang}}"
class="">
<i class="size-22 icon-delete"></i>
@ -340,4 +340,4 @@ function validate_link(name, btn){
</li>
{% endfor%}
</ul>
</div>
</div>

@ -5,7 +5,7 @@
<div class="col-md-1 course-box-thumbnail-box">
<div class="thumbnail">
{{ item.image }}
<img src="http://localhost/chamilo11/main/img/icons/48/folder_yellow.png" alt="aaa" title="aaa">
<img src="{{ _p.web_img_path }}icons/48/folder_yellow.png" alt="aaa" title="aaa">
</div>
</div>
<div class="col-md-6 table_user_course_category course-box-text">
@ -25,23 +25,23 @@
<div class="row">
<div class="col-md-1 course-box-thumbnail-box">
<a class="thumbnail" href="http://localhost/chamilo11/courses/AAAMATHS/?id_session=0">
<img src="http://localhost/chamilo11/main/img/icons/48/blackboard.png" alt="aaa Maths" title="aaa Maths"></a>
<img src="{{ _p.web_img_path }}icons/48/blackboard.png" alt="aaa Maths" title="aaa Maths"></a>
</div>
<div class="col-md-6 course-box-text">
<h3>
<a href="http://localhost/chamilo11/courses/AAAMATHS/?id_session=0"> aaa Maths</a>&nbsp;
</h3>
<h5>
<img src="http://localhost/chamilo11/main/img/icons/16/teacher.png" alt="Trainer" title="Trainer">
<a class="ajax" href="http://localhost/chamilo11/main/inc/ajax/user_manager.ajax.php?a=get_user_popup&amp;resizable=0&amp;height=300&amp;user_id=1"> John Doe</a>
<img src="{{ _p.web_img_path }}icons/16/teacher.png" alt="Trainer" title="Trainer">
<a class="ajax" href="{{ _p.web_main }}inc/ajax/user_manager.ajax.php?a=get_user_popup&amp;resizable=0&amp;height=300&amp;user_id=1"> John Doe</a>
</h5>
</div>
</div>
</div>
<div class="col-md-1 pull-right course-box-actions">
<a href="http://localhost/chamilo11/main/course_info/infocours.php?cidReq=AAAMATHS">
<img src="http://localhost/chamilo11/main/img/icons/22/edit.png" alt="Edit" title="Edit" align="absmiddle">
<a href="{{ _p.web_main }}course_info/infocours.php?cidReq=AAAMATHS">
<img src="{{ _p.web_img_path }}icons/22/edit.png" alt="Edit" title="Edit" align="absmiddle">
</a>
</div>
</div>
</div>
</div>

@ -44,7 +44,6 @@ require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
echo '<div class="actions">';
echo '<a href="../newscorm/lp_controller.php?cidReq='.$_course['sysCode'].'">'.Display::return_icon('back.png', get_lang('ReturnToLearningPaths'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
//style="background-image: url(\'../img/scorm.jpg\'); background-repeat: no-repeat; background-position: 620px;"
$form = new FormValidator('', 'POST', 'upload.php', '', 'id="upload_form" enctype="multipart/form-data" ');
$form->addElement('header', '', $nameTools);
$form->addElement('hidden', 'curdirpath', $path);

@ -85,8 +85,8 @@ $extra_params['height'] = 'auto';
//With this function we can add actions to the jgrid
$action_links = 'function action_formatter (cellvalue, options, rowObject) {
return \''
.' <a href="class.php?action=add_class&id=\'+options.rowId+\'"><img src="../img/icons/22/user_to_class.png" title="'.get_lang('SubscribeUsersToClass').'"></a>'
.' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'"><img title="'.get_lang('Delete').'" src="../img/delete.png"></a>\';
.' <a href="class.php?action=add_class&id=\'+options.rowId+\'"><img src="'.api_get_path(WEB_IMG_PATH).'icons/22/user_to_class.png" title="'.get_lang('SubscribeUsersToClass').'"></a>'
.' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'"><img title="'.get_lang('Delete').'" src="'.api_get_path(WEB_IMG_PATH).'delete.png"></a>\';
}';
?>
<script>

@ -572,14 +572,8 @@ function display_student_publications_list($id, $my_folder_data, $work_parents,
$form_folder->add_html_editor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'work', 'Width' => '80%', 'Height' => '200'));
$there_is_a_end_date = false;
$form_folder -> addElement('advanced_settings',
'<a href="javascript://" onclick="javascript: return plus();" >
<span id="plus">&nbsp;<img style="vertical-align:middle;" src="../img/div_show.gif" alt="" />
&nbsp;'.get_lang('AdvancedParameters').'
</span>
</a>'
);
$form_folder->addElement('html', '<div id="options" style="display: none;">');
$form_folder->addElement('advanced_settings', Display::url(get_lang('AdvancedParameters'), '#', array('id' => 'work', 'class' => 'advanced_options')));
$form_folder->addElement('html', '<div id="work_options" style="display: none;">');
if (empty($default)) {
$default = api_get_local_time();
@ -1416,16 +1410,6 @@ function to_javascript_work() {
$origin = isset($_REQUEST['origin']) && !empty($_REQUEST['origin']) ? api_get_tools_lists($_REQUEST['origin']) : '';
$js = '<script>
function plus() {
if(document.getElementById(\'options\').style.display == \'none\') {
document.getElementById(\'options\').style.display = \'block\';
document.getElementById(\'plus\').innerHTML=\'&nbsp;'.Display::return_icon('div_hide.gif', get_lang('Hide', ''), array('style' => 'vertical-align:middle')).'&nbsp;'.addslashes(get_lang('AdvancedParameters', '')).'\';
} else {
document.getElementById(\'options\').style.display = \'none\';
document.getElementById(\'plus\').innerHTML=\'&nbsp;'.Display::return_icon('div_show.gif', get_lang('Show', ''), array('style' => 'vertical-align:middle')).'&nbsp;'.addslashes(get_lang('AdvancedParameters', '')).'\';
}
}
function updateDocumentTitle(value) {
var temp = value.indexOf("/");
//linux path

@ -315,10 +315,8 @@ switch ($action) {
$form->addRule('new_dir', get_lang('ThisFieldIsRequired'), 'required');
$form->add_html_editor('description', get_lang('Description'), false, false, getWorkDescriptionToolbar());
$form->addElement('advanced_settings', '<a href="javascript: void(0);" onclick="javascript: return plus();"><span id="plus">'.Display::return_icon('div_show.gif',get_lang('AdvancedParameters'), array('style' => 'vertical-align:center')).' '.get_lang('AdvancedParameters').'</span></a>');
$form->addElement('html', '<div id="options" style="display: none;">');
$form->addElement('advanced_settings', Display::url(get_lang('AdvancedParameters'), '#', array('id' => 'add_work', 'class' => 'advanced_options')));
$form->addElement('html', '<div id="add_work_options" style="display: none;">');
//QualificationOfAssignment
$form->addElement('text', 'qualification_value', get_lang('QualificationNumeric'));

@ -307,10 +307,10 @@ EOT;
EOT;
}
$web_path = api_get_path(WEB_PATH);
$web_path = api_get_path(WEB_IMG_PATH);
$subscribe_label = get_lang('Subscribe');
echo <<<EOT
<input type="image" name="unsub" src="$web_path/main/img/enroll.gif" alt="$subscribe_label" />$subscribe_label
<input type="image" name="unsub" src="$web_path/enroll.gif" alt="$subscribe_label" />$subscribe_label
</form>
EOT;
return true;

@ -10,7 +10,7 @@ var src=document.getElementsByTagName('script');
var src=src[src.length-1].getAttribute('src');
// remove the inc/lib/javascript/thickbox.js part (30 characters)
var src=src.substr(0,src.length-30);
var tb_pathToImage = src+"img/loadingAnimation.gif";
var tb_pathToImage = "";
var close_image = src+"img/close.png";
@ -139,10 +139,10 @@ function tb_show(caption, url, imageGroup) {
TB_WIDTH = imageWidth + 30;
TB_HEIGHT = imageHeight + 60;
$("#TB_window").append("<div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton'><img src='"+close_image+"'/></a></div>");
$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>");
$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>");
$("#TB_window").append("<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div>")
$("#TB_closeWindowButton").click(tb_remove);

@ -59,8 +59,8 @@ function upload(latency){
this.start = start;
this.startRealUpload = startRealUpload;
var __progress_bar_domid = '';
var __progress_bar_img = '../img/progress_bar.gif';
var __progress_bar_img = 'indicator.gif';
var __progress_bar_text = 'Uploading... Please wait';
var __progress_bar_interval = 1;
var __upload_form_domid = '';
}
}

Loading…
Cancel
Save