Using Display::return_icon and using WEB_IMG_PATH see #6903

Removing unused CSS code
1.10.x
Julio Montoya 12 years ago
parent da97e30aa9
commit 2cd7fa0559
  1. 4
      main/admin/calendar_view.php
  2. 5
      main/admin/calendar_view_print.php
  3. 2
      main/admin/group_edit.php
  4. 3
      main/admin/languages.php
  5. 2
      main/admin/user_edit.php
  6. 2
      main/admin/user_list.php
  7. 8
      main/attendance/index.php
  8. 2
      main/calendar/agenda.php
  9. 1
      main/calendar/calendar.php
  10. 7
      main/calendar/print.php
  11. 48
      main/chat/header_frame.inc.php
  12. 4
      main/cron/img/list_used_img.php
  13. 4
      main/document/document.inc.php
  14. 2
      main/document/slideshow.php
  15. 2
      main/dropbox/dropbox_init.inc.php
  16. 3
      main/exercice/exercice.php
  17. 4
      main/exercice/exercise.lib.php
  18. 24
      main/exercice/export/scorm/scorm_export.php
  19. 5
      main/exercice/hotspot.class.php
  20. 2
      main/exercice/hotspot_admin.inc.php
  21. 4
      main/forum/forumfunction.inc.php
  22. 26
      main/gradebook/lib/fe/displaygradebook.php
  23. 34
      main/gradebook/lib/fe/resulttable.class.php
  24. 3
      main/gradebook/lib/gradebook_functions.inc.php
  25. 8
      main/inc/lib/glossary.lib.php
  26. 5
      main/metadata/playscormmdset.inc.php
  27. 2
      src/ChamiloLMS/Controller/IndexController.php

@ -28,9 +28,7 @@ $MonthsLong = api_get_months_long();
<head>
<title>Calendar</title>
<style type="text/css">
@import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
.data_table th
{
.data_table th {
font-size: 10px;
}
.data_table td

@ -34,11 +34,6 @@ $result = Database::query($sql);
<html>
<head>
<title><?php echo get_lang('Print'); ?></title>
<style type="text/css" media="screen, projection">
/*<![CDATA[*/
@import "../css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
/*]]>*/
</style>
</head>
<body style="margin: 15px; padding: 0px;">

@ -138,7 +138,7 @@ Display::display_header($tool_name);
$image_path = GroupPortalManager::get_group_picture_path_by_id($group_id, 'web');
$image_dir = $image_path['dir'];
$image = $image_path['file'];
$image_file = ($image != '' ? $image_dir.$image : api_get_path(WEB_CODE_PATH).'img/unknown_group.jpg');
$image_file = ($image != '' ? $image_dir.$image : api_get_path(WEB_IMG_PATH).'unknown_group.jpg');
$image_size = api_getimagesize($image_file);
$img_attributes = 'src="'.$image_file.'?rand='.time().'" '

@ -81,9 +81,6 @@ $htmlHeadXtra[] = '<script>
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("#id_content_message").html("<div class=\"normal-message\"><img src=\"' . api_get_path(WEB_PATH) . 'main/img/loading1.gif\" /></div>");
},
type: "POST",
url: "../admin/languages.php",
data: "id="+link_id+"&visibility="+my_visibility+"&sent_http_request=1",

@ -414,7 +414,7 @@ if ($error_drh) {
$image_path = UserManager::get_user_picture_path_by_id($user_id, 'web');
$image_dir = $image_path['dir'];
$image = $image_path['file'];
$image_file = ($image != '' ? $image_dir.$image : api_get_path(WEB_CODE_PATH).'img/unknown.jpg');
$image_file = ($image != '' ? $image_dir.$image : api_get_path(WEB_IMG_PATH).'unknown.jpg');
$image_size = api_getimagesize($image_file);
$img_attributes = 'src="'.$image_file.'?rand='.time().'" '

@ -64,8 +64,6 @@ function active_user(element_div) {
if (confirm("'.get_lang('AreYouSureToEditTheUserStatus', '').'")) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$(ident).attr("src","'.api_get_path(WEB_IMG_PATH).'loading1.gif'.'"); }, //candy eye stuff
type: "GET",
url: "'.api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=active_user",
data: "user_id="+user_id[1]+"&status="+status,

@ -100,7 +100,7 @@ $(function() {
$(".row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#F9F9F9", "border-left":"none","border-right":"none"});
$(".row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#FFF", "border-left":"none","border-right":"none"});
$(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",true);
$(this).attr("src","'.api_get_path(WEB_CODE_PATH).'img/lock.gif");
$(this).attr("src","'.api_get_path(WEB_IMG_PATH).'lock.gif");
$(this).attr("title","'.get_lang('DateUnLock').'");
$(this).attr("alt","'.get_lang('DateUnLock').'");
$(this).attr("class","img_lock");
@ -135,9 +135,7 @@ $(function() {
$(".checkboxes_col_"+calendar_id).find(".switch").each(function(index) {
$(this).removeClass("disabled");
});
$(this).attr("src","'.api_get_path(WEB_CODE_PATH).'img/unlock.gif");
$(this).attr("src","'.api_get_path(WEB_IMG_PATH).'unlock.gif");
$(this).attr("title","'.get_lang('DateLock').'");
$(this).attr("alt","'.get_lang('DateLock').'");
$(this).attr("class","img_unlock");
@ -299,4 +297,4 @@ switch ($action) {
break;
default :
$attendance_controller->attendance_list();
}
}

@ -90,8 +90,6 @@ if (!empty($group_id)) {
Display::display_header($nameTools, 'Agenda');
} elseif (empty($origin) or $origin != 'learnpath') {
Display::display_header($nameTools, 'Agenda');
} else {
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"".api_get_path(WEB_CODE_PATH)."css/default.css\"/>";
}
/*

@ -30,7 +30,6 @@ header('Content-Type: text/html; charset='. api_get_system_encoding());
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>">
<style type="text/css">
/*<![CDATA[*/
@import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
.data_table th
{
font-size: 10px;

@ -32,11 +32,6 @@ $result = Database::query($sql);
<html>
<head>
<title><?php echo get_lang('Print'); ?></title>
<style type="text/css" media="screen, projection">
/*<![CDATA[*/
@import "../css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
/*]]>*/
</style>
</head>
<body style="margin: 15px; padding: 0px;">
@ -68,4 +63,4 @@ while($row=Database::fetch_array($result)) {
<input type="button" value="<?php echo api_htmlentities(get_lang('Print'), ENT_QUOTES); ?>" onClick="javascript: window.print();" />
</center>
</body>
</html>
</html>

@ -35,56 +35,33 @@ if (empty($mycourseid)) {
* Choose CSS style (platform's, user's, or course's)
*/
$my_style = api_get_visual_theme();
?><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo api_get_language_isocode(); ?>" lang="<?php echo api_get_language_isocode(); ?>">
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>">
<title>Chat</title>
<link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CSS_PATH).$my_style; ?>/default.css">
<style>
a{
font-size: 12px;
}
.background_submit{
background: url(../img/chat_little.gif) 2px 2px no-repeat;
padding: 2px 1px 1px 20px;
}
TH{
font-size: 12px;
}
</style>
<script type="text/javascript" language="javascript">
<!--
function updateChat()
{
function updateChat() {
if ('<?php echo $chat_size_old; ?>' != '<?php echo $chat_size_new; ?>')
{
parent.chat_chat.location.href='chat_chat.php?size=<?php echo $chat_size_new.'&'.api_get_cidreq(); ?>#bottom';
}
}
function updateConnected()
{
function updateConnected() {
if ('<?php echo $connected_old; ?>' != '<?php echo $connected_new; ?>')
{
parent.chat_whoisonline.location.href='chat_whoisonline.php?size=<?php echo $connected_new; ?>';
}
}
function submitHiddenForm()
{
function submitHiddenForm() {
document.formHidden.submit();
}
function eventMessage()
{
function eventMessage() {
<?php if($chat_size): ?>
parent.chat_hidden.document.formHidden.chat_size_old.value='<?php echo $chat_size; ?>';
parent.chat_chat.location.href='chat_chat.php?size=<?php echo $chat_size.'&'.api_get_cidreq(); ?>#bottom';
@ -92,20 +69,15 @@ function eventMessage()
document.formMessage.message.focus();
}
function send_message(evenement){
for (prop in evenement)
{
function send_message(evenement) {
for (prop in evenement) {
if(prop == 'which') touche = evenement.which; else touche = evenement.keyCode;
}
if (touche == 13)
{
if (touche == 13) {
document.formMessage.submit();
}
}
//-->
</script>
</head>
<body <?php echo $bodyXtra; ?> >

@ -8,7 +8,7 @@
*/
if (PHP_SAPI!='cli') { die('Run this script through the command line or comment this line in the code'); }
require_once '../../inc/global.inc.php';
$path = api_get_path(SYS_CODE_PATH).'img/';
$path = api_get_path(SYS_IMG_PATH);
ini_set('memory_limit','128M');
ini_set('max_execution_time','240');
/**
@ -93,7 +93,7 @@ function get_all_php_files($base_path) {
if (in_array($ext,array('.php','html','.htm','.css'))) {
$files[] = $base_path.$item;
}
}
}
}
$list = null;
return $files;

@ -895,7 +895,9 @@ function build_edit_icons($document_data, $id, $is_template, $is_read_only = 0,
$modify_icons .= '&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq(
).'&amp;curdirpath='.$curdirpath.'&amp;selectcat='.Security::remove_XSS(
$_GET['selectcat']
).'&amp;set_certificate='.$id.$req_gid.'&amp;'.$sort_params.'"><img src="../img/'.$visibility_icon_certificate.'.png" border="0" title="'.$certificate.'" alt="" /></a>';
).'&amp;set_certificate='.$id.$req_gid.'&amp;'.$sort_params.'">
'.Display::return_icon($visibility_icon_certificate.'.png', $certificate).'
</a>';
if ($is_preview) {
$modify_icons .= '&nbsp;<a target="_blank" href="'.api_get_self().'?'.api_get_cidreq(
).'&amp;curdirpath='.$curdirpath.'&amp;set_preview='.$id.$req_gid.'&amp;'.$sort_params.'" >'.

@ -498,7 +498,7 @@ if ($slide_id != 'all') {
echo '<tr>';
echo '<td align="center">';
echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$row['id'].'&origin=slideshow&amp;origin_opt='.$edit_slide_id.'&amp;">
<img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="'.get_lang('Modify').'" /></a><br />';
'.Display::return_icon('edit.gif', get_lang('Modify')).'</a><br />';
$aux = explode('.', htmlspecialchars($image_files_only[$slide]));
$ext = $aux[count($aux) - 1];
echo $image_files_only[$slide].' <br />';

@ -361,7 +361,7 @@ if ($view == 'sent' OR empty($view)) {
if (isset($origin) && $origin == 'learnpath') {
// if we come from the learning path we have to include the stylesheet and the required javascripts manually.
echo '<link rel="stylesheet" type="text/css" href="', api_get_path(WEB_CODE_PATH), 'css/default.css">';
//echo '<link rel="stylesheet" type="text/css" href="', api_get_path(WEB_CODE_PATH), 'css/default.css">';
echo $javascript;
} else {
Display::display_header($nameTools, 'Dropbox');

@ -940,7 +940,8 @@ if (isset($attribute['path']) && is_array($attribute['path'])) {
if ($is_allowedToEdit) {
$item = Display::tag(
'td',
'<img src="../img/hotpotatoes_s.png" alt="HotPotatoes" /> <a href="showinframes.php?file='.$path.'&cid='.api_get_course_id(
Display::return_icon('hotpotatoes_s.png').'
<a href="showinframes.php?file='.$path.'&cid='.api_get_course_id(
).'&uid='.api_get_user_id().'"'.(!$active ? 'class="invisible"' : '').'>'.$title.'</a> '
);
$item .= Display::tag('td', '-');

@ -472,8 +472,8 @@ function get_exam_results_data($from, $number_of_items, $column, $direction, $ex
//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);

@ -36,7 +36,7 @@ class ScormAssessmentItem
$this->question = $question;
//$this->answer = new Answer($question->id);
$this->question->setAnswer();
$this->questionIdent = "QST_" . $question->id ;
$this->standalone = $standalone;
//echo "<pre>".print_r($this,1)."</pre>";
@ -68,7 +68,7 @@ class ScormAssessmentItem
if($this->standalone){return '</html>';}
return '';
}
/**
* Start document header
*/
@ -76,7 +76,7 @@ class ScormAssessmentItem
if($this->standalone){return '<head>'. "\n";}
return '';
}
/**
* Print CSS inclusion
*/
@ -85,14 +85,12 @@ class ScormAssessmentItem
if ($this->standalone) {
$css = '<style type="text/css" media="screen, projection">'."\n";
$css .= '/*<![CDATA[*/'."\n";
//$css .= '@import "'.api_get_path(WEB_PATH).'main/css/public_admin/default.css";'."\n";
$css .= '/*]]>*/'."\n";
$css .= '</style>'."\n";
$css .= '<style type="text/css" media="print">'."\n";
$css .= '/*<![CDATA[*/'."\n";
//$css .= '@import "'.api_get_path(WEB_PATH).'main/css/public_admin/print.css";'."\n";
$css .= '/*]]>*/'."\n";
$css .= '</style>'."\n";
$css .= '</style>'."\n";
}
return $css;
}
@ -281,21 +279,21 @@ class ScormSection
function end_page() {
return '</html>';
}
/**
* Start document header
*/
function start_header() {
return '<head>'. "\n";
}
/**
* Print CSS inclusion
*/
function css() {
$css = '<style type="text/css" media="screen, projection">'."\n";
$css .= '/*<![CDATA[*/'."\n";
//$css .= '@import "'.api_get_path(WEB_PATH).'main/css/public_admin/default.css";'."\n";
//$css .= '@import "'.api_get_path(WEB_PATH).'main/css/public_admin/default.css";'."\n";
$css .= '/*]]>*/'."\n";
$css .= '</style>'."\n";
$css .= '<style type="text/css" media="print">'."\n";
@ -312,7 +310,7 @@ class ScormSection
function end_header() {
return '</head>'. "\n";
}
/**
* Start the itemBody
*
@ -320,7 +318,7 @@ class ScormSection
function start_js() {
return '<script type="text/javascript" language="javascript">'. "\n";
}
/**
* Common JS functions
*/
@ -495,7 +493,7 @@ class ScormSection
function end_js() {
return '</script>'. "\n";
}
/**
* Start the itemBody
*
@ -614,4 +612,4 @@ function export_question($questionId, $standalone = true, $js_id) {
$assessmentItem = new ScormAssessmentItem($question, $standalone);
//echo "<pre>".print_r($scorm,1)."</pre>";exit;
return $assessmentItem->export();
}
}

@ -32,11 +32,12 @@ class HotSpot extends Question {
function display() {
}
function createForm (&$form, $fck_config=0) {
function createForm (&$form, $fck_config=0)
{
parent::createForm ($form, $fck_config);
if(!isset($_GET['editQuestion'])) {
$renderer = $form->defaultRenderer();
$form->addElement('file','imageUpload',array('<img src="../img/hotspots.png" />', get_lang('UploadJpgPicture')) );
$form->addElement('file','imageUpload' , array(Display::return_icon('hotspots.png'), get_lang('UploadJpgPicture')) );
// setting the save button here and not in the question class.php
// Saving a question

@ -496,7 +496,7 @@ if ($modifyAnswers) {
"#F7BDE2");
}
Display::tag('h3', get_lang('Question') . ": " . $questionName . ' <img src="../img/info3.gif" title="' . strip_tags(get_lang('HotspotChoose')) . '" alt="' . strip_tags(get_lang('HotspotChoose')) . '" />');
Display::tag('h3', get_lang('Question') . ": " . $questionName.' '.Display::return_icon('info3.gif', get_lang('HotspotChoose')));
if (!empty($msgErr)) {
Display::display_normal_message($msgErr); //main API
}

@ -3195,9 +3195,7 @@ function display_user_image($user_id, $name, $origin = '')
return $link.'<img src="'.$friends_profile['file'].'" '.$friends_profile['style'].' alt="'.$name.'" title="'.$name.'" /></a>';
} else {
return $link.'<img src="'.api_get_path(
WEB_CODE_PATH
)."img/unknown.jpg".'" alt="'.$name.'" title="'.$name.'" /></a>';
return $link.Display::return_icon('unknown.jpg', $name).'</a>';
}
}

@ -23,7 +23,7 @@ class DisplayGradebook
if ($page != 'statistics') {
$header .= '<a href="'.Security::remove_XSS($_SESSION['gradebook_dest']).'?selectcat=' . $selectcat . '">'. Display::return_icon(('back.png'),get_lang('FolderView'),'',ICON_SIZE_MEDIUM).'</a>';
if ($evalobj->get_course_code() == null) {
//Disabling code when course code is null see issue #2705
// Disabling code when course code is null see issue #2705
//$header .= '<a href="gradebook_add_user.php?selecteval=' . $evalobj->get_id() . '"><img src="../img/add_user_big.gif" alt="' . get_lang('AddStudent') . '" align="absmiddle" /> ' . get_lang('AddStudent') . '</a>';
} elseif (!$evalobj->has_results()) {
$header .= '<a href="gradebook_add_result.php?selectcat=' . $selectcat . '&selecteval=' . $evalobj->get_id() . '">
@ -105,7 +105,7 @@ class DisplayGradebook
$evalinfo .= '<br /><a href="gradebook_statistics.php?selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '.Display::return_icon(('statistics.png'),get_lang('ViewStatistics'),'',ICON_SIZE_MEDIUM).'</a>';
}
}
$evalinfo .= '</td><td><img style="float:right; position:relative;" src="../img/tutorial.gif"></td></table>';
$evalinfo .= '</td><td>'.Display::return_icon('tutorial.gif').'</td></table>';
echo $evalinfo;
echo $header;
}
@ -136,15 +136,20 @@ class DisplayGradebook
}
$header .= '</td></select></form>';
if (!$catobj->get_id() == '0') {
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '"><img src="../img/gradebook.gif" border="0" alt="'.get_lang('Up').'" /></a></td>';
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">
'.Display::return_icon('gradebook.gif', get_lang('Up')).'</a></td>';
}
$header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>';
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search=' . Security::remove_XSS($_GET['search']).'&selectcat=' . $catobj->get_id() . '"><img src=../img/icons/32/pdf.png alt=' . get_lang('ExportPDF') . '/> ' . get_lang('ExportPDF') . '</a>';
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?print=&selectcat=' . $catobj->get_id() . '" target="_blank"><img src="../img/icons/32/printer.png" alt=' . get_lang('Print') . '/> ' . get_lang('Print') . '</a>';
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search=' . Security::remove_XSS($_GET['search']).'&selectcat=' . $catobj->get_id() . '">
'.Display::return_icon('pdf.png', get_lang('ExportPDF')).' '.get_lang('ExportPDF').'</a>';
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?print=&selectcat=' . $catobj->get_id() . '" target="_blank">
'.Display::return_icon('printer.png', get_lang('Print')).' '. get_lang('Print') . '</a>';
$header .= '</td></tr></table>';
if (!$catobj->get_id() == '0') {
$header .= '<table border="0" cellpadding="5"><tr><td><form name="itemfilter" method="post" action="' . api_get_self() . '?selectcat=' . $catobj->get_id() . '"><input type="checkbox" name="showeval" onclick="document.itemfilter.submit()" ' . (($showeval == '1') ? 'checked' : '') . '>Show Evaluations &nbsp;';
$header .= '<input type="checkbox" name="showlink" onclick="document.itemfilter.submit()" ' . (($showlink == '1') ? 'checked' : '') . '>'.get_lang('ShowLinks').'</form></td></tr></table>';
$header .= '<table border="0" cellpadding="5"><tr><td><form name="itemfilter" method="post" action="' . api_get_self() . '?selectcat=' . $catobj->get_id() . '">
<input type="checkbox" name="showeval" onclick="document.itemfilter.submit()" ' . (($showeval == '1') ? 'checked' : '') . '>Show Evaluations &nbsp;';
$header .= '<input type="checkbox" name="showlink" onclick="document.itemfilter.submit()" ' . (($showlink == '1') ? 'checked' : '') . '>'.get_lang('ShowLinks').'</form>
</td></tr></table>';
}
if (isset ($_GET['search'])) {
$header .= '<b>'.get_lang('SearchResults').' :</b>';
@ -269,7 +274,8 @@ class DisplayGradebook
//$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat=' . $catobj->get_id() . '"><img src="../img/view_list.gif" alt="' . get_lang('FlatView') . '" /> ' . get_lang('FlatView') . '</a>';
}
} else {
$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"><img src="../img/icons/32/pdf.png" alt="' . get_lang('ExportPDF') . '" /> ' . get_lang('ExportPDF') . '</a>';
$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank">
'.Display::return_icon('pdf.png', get_lang('ExportPDF')).' ' . get_lang('ExportPDF') . '</a>';
}
$header .= '</td></tr>';
}
@ -284,8 +290,6 @@ class DisplayGradebook
$courseInfo = api_get_course_info($course_code);
$status_user = api_get_status_of_user_in_course($user_id, $courseInfo['real_id']);
//$header .= '<a href="gradebook_add_cat.php?'.api_get_cidreq().'&selectcat=0"><img src="../img/folder_new.gif" alt="' . get_lang('AddGradebook') . '" /></a></td>';
if (api_is_allowed_to_edit(null, true)) {
if ($selectcat == '0') {
if ($show_add_qualification === true) {
@ -458,7 +462,7 @@ class DisplayGradebook
}
} else {
$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank">
<img src="../img/icons/32/pdf.png" alt="' . get_lang('ExportPDF') . '" /> ' . get_lang('ExportPDF') . '</a>';
'.Display::return_icon('pdf.png', get_lang('ExportPDF')).' '. get_lang('ExportPDF') . '</a>';
}
$header .= '</td></tr>';
$header.='</table></div>';

@ -81,7 +81,7 @@ class ResultTable extends SortableTable
// determine sorting type
$col_adjust = $this->iscourse == '1' ? 1 : 0;
switch ($this->column) {
// first name or last name
case (0 + $col_adjust):
@ -101,23 +101,23 @@ class ResultTable extends SortableTable
break;
//Score
case (2 + $col_adjust):
$sorting = ResultsDataGenerator :: RDG_SORT_SCORE;
$sorting = ResultsDataGenerator :: RDG_SORT_SCORE;
break;
case (3 + $col_adjust):
$sorting = ResultsDataGenerator :: RDG_SORT_MASK;
break;
}
if ($this->direction == 'DESC') {
$sorting |= ResultsDataGenerator :: RDG_SORT_DESC;
} else {
$sorting |= ResultsDataGenerator :: RDG_SORT_ASC;
}
$data_array = $this->datagen->get_data($sorting, $from, $this->per_page);
// generate the data to display
$sortable_data = array();
$sortable_data = array();
foreach ($data_array as $item) {
$row = array ();
if ($this->iscourse == '1') {
@ -130,9 +130,9 @@ class ResultTable extends SortableTable
$row[] = $item['lastname'];
$row[] = $item['firstname'];
}
$row[] = Display::bar_progress($item['percentage_score'], false, $item['score'], true);
//$row[] = Display::bar_progress($item['percentage_score'], true);
//$row[] = Display::bar_progress($item['percentage_score'], true);
if ($scoredisplay->is_custom()) {
$row[] = $item['display'];
}
@ -144,8 +144,8 @@ class ResultTable extends SortableTable
return $sortable_data;
}
private function build_edit_column ($item) {
private function build_edit_column ($item) {
$status=CourseManager::get_user_in_course_status(api_get_user_id(), api_get_course_id());
$locked_status = $this->evaluation->get_locked();
if (api_is_allowed_to_edit(null, true) && $locked_status == 0) {//api_is_course_admin()
@ -153,19 +153,19 @@ class ResultTable extends SortableTable
$edit_column .= ' <a href="' . api_get_self() . '?delete_mark=' . $item['result_id'] . '&selecteval=' . $this->evaluation->get_id() . '">'.Display::return_icon('delete.png', get_lang('Delete'),'','22').'</a>';
}
if ($this->evaluation->get_course_code() == null) {
$edit_column.= '&nbsp;<a href="' . api_get_self() . '?resultdelete=' . $item['result_id'] . '&selecteval=' . $this->evaluation->get_id() . '" onclick="return confirmationuser();"><img src="../img/delete.gif" border="0" title="' . get_lang('Delete') . '" alt="" /></a>';
$edit_column.= '&nbsp;<a href="user_stats.php?userid=' . $item['id'] . '&selecteval=' . $this->evaluation->get_id() . '"><img src="../img/statistics.gif" width="17px" border="0" title="' . get_lang('Statistics') . '" alt="" /></a>';
$edit_column.= '&nbsp;<a href="' . api_get_self() . '?resultdelete=' . $item['result_id'] . '&selecteval=' . $this->evaluation->get_id() . '" onclick="return confirmationuser();">
'.Display::return_icon('delete.png', get_lang('Delete')).' </a>';
$edit_column.= '&nbsp;<a href="user_stats.php?userid=' . $item['id'] . '&selecteval=' . $this->evaluation->get_id() . '">
'.Display::return_icon('statistics.gif', get_lang('Statistics')).'</a>';
}
// Evaluation's origin is a link
// Evaluation's origin is a link
if ($this->evaluation->get_category_id() < 0) {
$link = LinkFactory :: get_evaluation_link ($this->evaluation->get_id());
$doc_url = $link->get_view_url($item['id']);
if ($doc_url != null) {
$edit_column .= '&nbsp;<a href="'. $doc_url . '" target="_blank">'
.'<img src="'. api_get_path(WEB_CODE_PATH) . 'img/link.gif" border="0" title="' . get_lang('OpenDocument') . '" alt="" />'
.'</a>';
$edit_column .= '&nbsp;<a href="'. $doc_url . '" target="_blank">'.Display::return_icon('link.gif', get_lang('OpenDocument')).'</a>';
}
}
return $edit_column;

@ -599,7 +599,8 @@ function get_user_certificate_content($user_id, $course_code, $is_preview = fals
//add print header
if ($hide_print_button == false) {
$print = '<style media="print" type="text/css">#print_div {visibility:hidden;}</style>';
$print .= '<a href="javascript:window.print();" style="float:right; padding:4px;" id="print_div"><img src="'.api_get_path(WEB_CODE_PATH).'img/printmgr.gif" alt="' . get_lang('Print') . '" /> ' . get_lang('Print') . '</a>';
$print .= '<a href="javascript:window.print();" style="float:right; padding:4px;" id="print_div">
'.Display::return_icon('printmgr.gif', get_lang('Print')).'</a>';
}
//add header

@ -695,13 +695,7 @@ class GlossaryManager
$html .= '</body></html>';
$course_code = api_get_course_id();
$pdf = new PDF();
//$pdf->set_custom_header($title);
/*$css_file = api_get_path(SYS_CODE_PATH).'css/print.css';
if (file_exists($css_file)) {
$css = @file_get_contents($css_file);
} else {
$css = '';
}*/
$css = null;
$pdf->content_to_pdf($html, $css, get_lang('Glossary').'_'.$course_code, $course_code);
}
}

@ -1,5 +1,5 @@
<?php
/**
<?php
/**
* Chamilo metadata/playscormmdset.inc.php
* 2005/11/16
* Copyright (C) 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php
@ -170,7 +170,6 @@ else
<title>Scorm package
</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>">
<link rel="stylesheet" href="<?php echo api_get_path(WEB_CODE_PATH); ?>css/default.css" type="text/css" media="screen,projection" />
<style type="text/css" media="screen, projection">
/*<![CDATA[*/
@import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/default.css";

@ -291,7 +291,7 @@ class IndexController extends CommonController
}
/**
* @todo move all this getDocument* Actions into another controller
* @todo move all this getDocument* actions into another controller
* @param Application $app
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse|void
*/

Loading…
Cancel
Save