Fix icon paths (needed for v2.0)

1.10.x
jmontoya 10 years ago
parent 9237518495
commit 3d39554195
  1. 4
      main/attendance/index.php
  2. 45
      main/document/create_audio.php
  3. 22
      main/gradebook/lib/fe/displaygradebook.php
  4. 6
      main/gradebook/lib/fe/scoredisplayform.class.php
  5. 6
      main/inc/lib/display.lib.php
  6. 11
      main/inc/lib/exercise.lib.php
  7. 8
      main/inc/lib/grade_model.lib.php
  8. 2
      main/mySpace/myStudents.php
  9. 50
      main/newscorm/learnpath.class.php
  10. 2
      main/newscorm/lp_view.php
  11. 19
      main/survey/ch_personality.php

@ -106,7 +106,7 @@ $(function() {
$(".row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#F9F9F9", "border-left":"none","border-right":"none"}); $(".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"}); $(".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); $(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",true);
$(this).attr("src","'.api_get_path(WEB_CODE_PATH).'img/icons/22/lock-closed.png"); $(this).attr("src","'.Display::returnIconPath('lock-closed.png').'");
$(this).attr("title","'.get_lang('DateUnLock').'"); $(this).attr("title","'.get_lang('DateUnLock').'");
$(this).attr("alt","'.get_lang('DateUnLock').'"); $(this).attr("alt","'.get_lang('DateUnLock').'");
$(this).attr("class","img_lock"); $(this).attr("class","img_lock");
@ -134,7 +134,7 @@ $(function() {
}); });
$(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",false); $(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",false);
$(this).attr("src","'.api_get_path(WEB_CODE_PATH).'img/icons/22/lock-open.png"); $(this).attr("src","'.Display::returnIconPath('lock-open.png').'");
$(this).attr("title","'.get_lang('DateLock').'"); $(this).attr("title","'.get_lang('DateLock').'");
$(this).attr("alt","'.get_lang('DateLock').'"); $(this).attr("alt","'.get_lang('DateLock').'");
$(this).attr("class","img_unlock"); $(this).attr("class","img_unlock");

@ -291,55 +291,10 @@ if (Security::remove_XSS($_GET['dt2a']) == 'pediaphon') {
<?php <?php
}//end pediaphon }//end pediaphon
//vozMe services
//disabled for a time
/*
echo '<div>&nbsp;</div><input type="checkbox" value="1" name="checktext2voice" onclick="javascript: if(this.checked){document.getElementById(\'option3\').style.display=\'block\';}else{document.getElementById(\'option3\').style.display=\'none\';}"/>&nbsp;<img src="../img/file_sound.gif" title="'.get_lang('HelpvozMe').'" alt="'.get_lang('vozMe').'"/>&nbsp;'.get_lang('vozMe').'';
echo '&nbsp;&nbsp;&nbsp;<span id="msg_error3" style="display:none;color:red"></span>';
echo '<div id="option3" style="padding:4px; margin:5px; border:1px dotted; display:none;">';
echo '<form id="form3" name="form3" method="post" action="http://vozme.com/text2voice.php" target="mymp3" class="formw">';
echo '<br/>';
echo '<label>'.get_lang('Language').': ';
$tbl_admin_languages = Database :: get_main_table(TABLE_MAIN_LANGUAGE);
$sql_select = "SELECT * FROM $tbl_admin_languages";
$result_select = Database::query($sql_select);
echo '<select name="lang" id="select">';
while ($row = Database::fetch_array($result_select)) {
if (in_array($row['isocode'], array('ca', 'en', 'es', 'hi', 'it', 'pt'))) {
if (api_get_setting('platformLanguage')==$row['english_name']){
echo '<option value="'.$row['isocode'].'" selected="selected">'.$row['original_name'].' ('.$row['english_name'].')</option>';
} else {
echo '<option value="'.$row['isocode'].'">'.$row['original_name'].' ('.$row['english_name'].')</option>';
}
}
}
echo '</select>';
echo '</label>';
echo '<label>&nbsp;&nbsp;'.get_lang('Voice').': ';
echo '<select name="gn" id="select1">';
echo '<option value="ml">'.get_lang('Male').'</option>';
echo '<option value="fm">'.get_lang('Female').'</option>';
echo '</select>';
echo '</label>';
echo '<br/><br/>';
echo '<div>'.get_lang('InsertText2Audio').'</div>';
echo '<br/>';
echo '<label>';
echo '<textarea name="text" id="textarea" cols="70" rows="10"></textarea>';
echo '</label>';
echo '<br/><br/>';
echo '<button class="save" type="submit" name="SendText2Audio">'.get_lang('BuildMP3').'</button>';
echo '<br/>';
echo '</form>';
echo '</div>';
*/
echo '</div>'; echo '</div>';
Display :: display_footer(); Display :: display_footer();
//Functions. TODO:all at one
/** /**
* This function save a post into a file mp3 from google services * This function save a post into a file mp3 from google services
* *

@ -148,11 +148,18 @@ class DisplayGradebook
$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() . '"><img src="../img/gradebook.gif" border="0" alt="' . get_lang('Up') . '" /></a></td>';
} }
$header .= '<td style="vertical-align: top;">' . $simple_search_form->toHtml() . '</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;">
$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>'; <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'), [], ICON_SIZE_MEDIUM).'
' . 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'), [], ICON_SIZE_MEDIUM).'
' . get_lang('Print') . '</a>';
$header .= '</td></tr></table>'; $header .= '</td></tr></table>';
if (!$catobj->get_id() == '0') { 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 .= '<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 .= '<input type="checkbox" name="showlink" onclick="document.itemfilter.submit()" ' . (($showlink == '1') ? 'checked' : '') . '>' . get_lang('ShowLinks') . '</form></td></tr></table>';
} }
if (isset($_GET['search'])) { if (isset($_GET['search'])) {
@ -293,7 +300,9 @@ 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>'; //$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 { } 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'), [], ICON_SIZE_MEDIUM).'
' . get_lang('ExportPDF') . '</a>';
} }
$header .= '</td></tr>'; $header .= '</td></tr>';
} }
@ -532,10 +541,11 @@ class DisplayGradebook
} }
} else { } else {
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"> $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'), [], ICON_SIZE_MEDIUM).'
' . get_lang('ExportPDF') . '</a>';
} }
$header .= '</td></tr>'; $header .= '</td></tr>';
$header.='</table></div>'; $header .= '</table></div>';
} }
// for course admin & platform admin add item buttons are added to the header // for course admin & platform admin add item buttons are added to the header

@ -112,8 +112,10 @@ class ScoreDisplayForm extends FormValidator
{element} {element}
</div> </div>
<div class="col-sm-1"> <div class="col-sm-1">
<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:plusItem(' . ($counter+1) . ')">
<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> <img style="display: '.(($counter>=$nr_items)?'inline':'none').';" id="plus-' . ($counter+1) . '" src="'.Display::returnIconPath('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="'.Display::returnIconPath('delete.png').'" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'"></a>
</div> </div>
</div> </div>
</div>'; </div>';

@ -700,11 +700,13 @@ class Display
* Gets the path of an icon * Gets the path of an icon
* *
* @param string $icon * @param string $icon
* @param string $size
*
* @return string * @return string
*/ */
public static function returnIconPath($icon) public static function returnIconPath($icon, $size = ICON_SIZE_SMALL)
{ {
return Display::return_icon($icon, null, null, null, null, true, false); return Display::return_icon($icon, null, null, $size, null, true, false);
} }
/** /**

@ -1940,14 +1940,11 @@ HOTSPOT;
date('Y-m-d h:i:s'), date('Y-m-d h:i:s'),
false false
); );
$actions .= '<a href="http://www.whatsmyip.org/ip-geo-location/?ip=' . $ip . '" target="_blank"><img src="' . api_get_path( $actions .= '<a href="http://www.whatsmyip.org/ip-geo-location/?ip=' . $ip . '" target="_blank">
WEB_CODE_PATH '.Display::return_icon('info.png', $ip).'
) . 'img/icons/22/info.png" title="' . $ip . '" /></a>'; </a>';
$delete_link = '<a href="exercise_report.php?' . api_get_cidreq( $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 . '"
) . '&filter_by_user=' . intval(
$_GET['filter_by_user']
) . '&filter=' . $filter . '&exerciseId=' . $exercise_id . '&delete=delete&did=' . $id . '"
onclick="javascript:if(!confirm(\'' . sprintf( onclick="javascript:if(!confirm(\'' . sprintf(
get_lang('DeleteAttempt'), get_lang('DeleteAttempt'),
$results[$i]['username'], $results[$i]['username'],

@ -142,16 +142,16 @@ class GradeModel extends Model
$template_title = $template_title =
'&nbsp{element} <!-- BEGIN error --> <span class="form_error">{error}</span><!-- END error --> '&nbsp{element} <!-- BEGIN error --> <span class="form_error">{error}</span><!-- END error -->
<a href="javascript:plusItem(' . ($counter+1) . ')"> <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> <img style="display: '.(($counter>=$nr_items)?'inline':'none').';" id="plus-' . ($counter+1) . '" src="'.Display::return_icon('add.png').'" alt="'.get_lang('Add').'" title="'.get_lang('Add').'">
</a> </a>
<a href="javascript:minItem(' . ($counter) . ')"> <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> <img style="display: '.(($counter>=$nr_items)?'inline':'none').';" id="min-' . $counter . '" src="'.Display::return_icon('delete.png').'" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'">
</a> </a>
</div></p></div>'; </div></p></div>';
$renderer->setElementTemplate($template_title, 'components['.$i.'][title]'); $renderer->setElementTemplate($template_title, 'components['.$i.'][title]');
$renderer->setElementTemplate($template_percentage , 'components['.$i.'][percentage]'); $renderer->setElementTemplate($template_percentage, 'components['.$i.'][percentage]');
$renderer->setElementTemplate($template_acronym , 'components['.$i.'][acronym]'); $renderer->setElementTemplate($template_acronym, 'components['.$i.'][acronym]');
if ($i == 0) { if ($i == 0) {
$form->addRule('components['.$i.'][percentage]', get_lang('ThisFieldIsRequired'), 'required'); $form->addRule('components['.$i.'][percentage]', get_lang('ThisFieldIsRequired'), 'required');

@ -951,7 +951,7 @@ if (!empty($student_id)) {
$from ='&from=myspace'; $from ='&from=myspace';
} }
$link = Display::url( $link = Display::url(
'<img src="../img/icons/22/2rightarrow.png" border="0" />', Display::return_icon('2rightarrow.png'),
'lp_tracking.php?cidReq='.Security::remove_XSS($_GET['course']).'&course='.Security::remove_XSS($_GET['course']).$from.'&origin='.$origin.'&lp_id='.$learnpath->getId().'&student_id='.$user_info['user_id'].'&id_session='.$sessionId 'lp_tracking.php?cidReq='.Security::remove_XSS($_GET['course']).'&course='.Security::remove_XSS($_GET['course']).$from.'&origin='.$origin.'&lp_id='.$learnpath->getId().'&student_id='.$user_info['user_id'].'&id_session='.$sessionId
); );
echo Display::tag('td', $link); echo Display::tag('td', $link);

@ -5604,12 +5604,12 @@ class learnpath
$icon_name = str_replace(' ', '', $arrLP[$i]['item_type']); $icon_name = str_replace(' ', '', $arrLP[$i]['item_type']);
if (file_exists('../img/lp_' . $icon_name . '.png')) { if (file_exists('../img/lp_' . $icon_name . '.png')) {
$icon = '<img src="../img/lp_' . $icon_name . '.png" />'; $icon = Display::return_icon('lp_'.$icon_name.'.png');
} else { } else {
if (file_exists('../img/lp_' . $icon_name . '.gif')) { if (file_exists('../img/lp_' . $icon_name . '.gif')) {
$icon = '<img src="../img/lp_' . $icon_name . '.gif" />'; $icon = Display::return_icon('lp_'.$icon_name.'.gif');
} else { } else {
$icon = '<img src="../img/folder_document.gif" />'; $icon = Display::return_icon('folder_document.gif');
} }
} }
@ -5620,14 +5620,6 @@ class learnpath
if (!$update_audio || $update_audio <> 'true') { if (!$update_audio || $update_audio <> 'true') {
if (!empty($arrLP[$i]['audio'])) { if (!empty($arrLP[$i]['audio'])) {
/*$audio .= '<span id="container'.$i.'"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</span>';
$audio .= '<script type="text/javascript" src="../inc/lib/mediaplayer/swfobject.js"></script>';
$audio .= '<script type="text/javascript">
var s1 = new SWFObject("../inc/lib/mediaplayer/player.swf","ply","250","20","9","#FFFFFF");
s1.addParam("allowscriptaccess","always");
s1.addParam("flashvars","file=../../courses/' . $_course['path'] . '/document/audio/' . $arrLP[$i]['audio'] . '");
s1.write("container' . $i . '");
</script>';*/
} else { } else {
$audio .= ''; $audio .= '';
} }
@ -8499,14 +8491,15 @@ class learnpath
$icon_name = str_replace(' ', '', $item['item_type']); $icon_name = str_replace(' ', '', $item['item_type']);
if (file_exists('../img/lp_' . $icon_name . '.png')) { if (file_exists('../img/lp_' . $icon_name . '.png')) {
$return .= '<img alt="" src="../img/lp_' . $icon_name . '.png" style="margin-right:5px;" title="" />'; $return .= Display::return_icon('lp_' . $icon_name . '.png');
} else { } else {
if (file_exists('../img/lp_' . $icon_name . '.gif')) { if (file_exists('../img/lp_' . $icon_name . '.gif')) {
$return .= '<img alt="" src="../img/lp_' . $icon_name . '.gif" style="margin-right:5px;" title="" />'; $return .= Display::return_icon('lp_' . $icon_name . '.gif');
} else { } else {
$return .= Display::return_icon('folder_document.gif','',array('style'=>'margin-right:5px;')); $return .= Display::return_icon('folder_document.gif', '', array('style'=>'margin-right:5px;'));
} }
} }
$return .= $item['title'] . '</label>'; $return .= $item['title'] . '</label>';
$return .= '</td>'; $return .= '</td>';
@ -8660,7 +8653,7 @@ class learnpath
$return .= Display::return_icon('move_everywhere.png', get_lang('Move'), array(), ICON_SIZE_TINY); $return .= Display::return_icon('move_everywhere.png', get_lang('Move'), array(), ICON_SIZE_TINY);
$return .= '</a> '; $return .= '</a> ';
$return .= '<img src="../img/hotpotatoes_s.png" style="margin-right:5px;" title="" width="16px" />'; $return .= Display::return_icon('hotpotatoes_s.png');
$return .= '<a href="' . api_get_self() . '?' . api_get_cidreq().'&action=add_item&type=' . TOOL_HOTPOTATOES . '&file=' . $row_hot['id'] . '&lp_id=' . $this->lp_id . '">'. $return .= '<a href="' . api_get_self() . '?' . api_get_cidreq().'&action=add_item&type=' . TOOL_HOTPOTATOES . '&file=' . $row_hot['id'] . '&lp_id=' . $this->lp_id . '">'.
((!empty ($row_hot['comment'])) ? $row_hot['comment'] : Security :: remove_XSS($row_hot['title'])) . '</a>'; ((!empty ($row_hot['comment'])) ? $row_hot['comment'] : Security :: remove_XSS($row_hot['title'])) . '</a>';
$return .= '</li>'; $return .= '</li>';
@ -8671,7 +8664,7 @@ class learnpath
$return .= '<a class="moved" href="#">'; $return .= '<a class="moved" href="#">';
$return .= Display::return_icon('move_everywhere.png', get_lang('Move'), array(), ICON_SIZE_TINY); $return .= Display::return_icon('move_everywhere.png', get_lang('Move'), array(), ICON_SIZE_TINY);
$return .= '</a> '; $return .= '</a> ';
$return .= '<img alt="" src="../img/quizz_small.gif" style="margin-right:5px;" title="" />'; $return .= Display::return_icon('quizz_small.gif', '', array(), ICON_SIZE_TINY);
$return .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&action=add_item&type=' . TOOL_QUIZ . '&file=' . $row_quiz['id'] . '&lp_id=' . $this->lp_id . '">' . $return .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&action=add_item&type=' . TOOL_QUIZ . '&file=' . $row_quiz['id'] . '&lp_id=' . $this->lp_id . '">' .
Security :: remove_XSS(cut($row_quiz['title'], 80)). Security :: remove_XSS(cut($row_quiz['title'], 80)).
'</a>'; '</a>';
@ -8679,6 +8672,7 @@ class learnpath
} }
$return .= '</ul>'; $return .= '</ul>';
return $return; return $return;
} }
@ -8733,23 +8727,25 @@ class learnpath
} }
} }
</script> </script>
<ul class="lp_resource"> <ul class="lp_resource">
<li class="lp_resource_element"> <li class="lp_resource_element">
<img alt="" src="'.Display::returnIconPath('linksnew.gif').' style="margin-right:5px;width:16px"/> '.Display::return_icon('linksnew.gif').'
<a href="'.api_get_path(WEB_CODE_PATH).'link/link.php?'.$courseIdReq.'&action=addlink&lp_id='.$this->lp_id.'" title="'.get_lang('LinkAdd').'">'. <a href="'.api_get_path(WEB_CODE_PATH).'link/link.php?'.$courseIdReq.'&action=addlink&lp_id='.$this->lp_id.'" title="'.get_lang('LinkAdd').'">'.
get_lang('LinkAdd').'</a> get_lang('LinkAdd').'
</a>
</li>'; </li>';
foreach ($categorizedLinks as $categoryId => $links) { foreach ($categorizedLinks as $categoryId => $links) {
$linkNodes = null; $linkNodes = null;
foreach ($links as $key => $title) { foreach ($links as $key => $title) {
if (api_get_item_visibility($course, TOOL_LINK, $key, $session_id) != 2) { if (api_get_item_visibility($course, TOOL_LINK, $key, $session_id) != 2) {
$linkNodes .= $linkNodes .=
'<li class="lp_resource_element" data_id="'.$key. '<li class="lp_resource_element" data_id="'.$key.'" data_type="'.TOOL_LINK.'" title="'.$title.'" >
'" data_type="'.TOOL_LINK.'" title="'.$title.'" >
<a class="moved" href="#">'. <a class="moved" href="#">'.
$moveEverywhereIcon. $moveEverywhereIcon.
'</a> '</a>
<img alt="" src="../img/lp_link.gif" style="margin-right:5px;width:16px"/> '.Display::return_icon('lp_link.png').'
<a href="'.$selfUrl.'?'.$courseIdReq.'&action=add_item&type='. <a href="'.$selfUrl.'?'.$courseIdReq.'&action=add_item&type='.
TOOL_LINK.'&file='.$key.'&lp_id='.$this->lp_id.'">'. TOOL_LINK.'&file='.$key.'&lp_id='.$this->lp_id.'">'.
Security::remove_XSS($title). Security::remove_XSS($title).
@ -8759,8 +8755,7 @@ class learnpath
} }
$linksHtmlCode .= $linksHtmlCode .=
'<li> '<li>
<a style="cursor:hand" onclick="javascript: toggle_tool(\''.TOOL_LINK.'\','.$categoryId.')" <a style="cursor:hand" onclick="javascript: toggle_tool(\''.TOOL_LINK.'\','.$categoryId.')" style="vertical-align:middle">
style="vertical-align:middle">
<img src="'.Display::returnIconPath('add.gif').'" id="'.TOOL_LINK.'_'.$categoryId.'_opener" <img src="'.Display::returnIconPath('add.gif').'" id="'.TOOL_LINK.'_'.$categoryId.'_opener"
align="absbottom" /> align="absbottom" />
</a> </a>
@ -8781,7 +8776,7 @@ class learnpath
{ {
$return = '<div class="lp_resource" >'; $return = '<div class="lp_resource" >';
$return .= '<div class="lp_resource_element">'; $return .= '<div class="lp_resource_element">';
$return .= '<img align="left" alt="" src="../img/works_small.gif" style="margin-right:5px;" title="" />'; $return .= Display::return_icon('works_small.gif', '', array(), ICON_SIZE_TINY);
$return .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=add_item&type=' . TOOL_STUDENTPUBLICATION . '&lp_id=' . $this->lp_id . '">' . get_lang('AddAssignmentPage') . '</a>'; $return .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=add_item&type=' . TOOL_STUDENTPUBLICATION . '&lp_id=' . $this->lp_id . '">' . get_lang('AddAssignmentPage') . '</a>';
$return .= '</div>'; $return .= '</div>';
$return .= '</div>'; $return .= '</div>';
@ -8798,13 +8793,12 @@ class learnpath
require_once '../forum/forumconfig.inc.php'; require_once '../forum/forumconfig.inc.php';
$a_forums = get_forums(); $a_forums = get_forums();
$return = '<ul class="lp_resource">'; $return = '<ul class="lp_resource">';
//First add link //First add link
$return .= '<li class="lp_resource_element">'; $return .= '<li class="lp_resource_element">';
$return .= '<img alt="" src="../img/forum_new_small.gif" style="margin-right:5px;" title="" />'; $return .= Display::return_icon('forum_new_small.gif');
$return .= '<a href="' . api_get_path(REL_CODE_PATH) . 'forum/index.php?' . api_get_cidreq() . '&action=add&content=forum&origin=learnpath&lp_id=' . $this->lp_id . '" title="' . get_lang('CreateANewForum') . '">' . get_lang('CreateANewForum') . '</a>'; $return .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'forum/index.php?' . api_get_cidreq() . '&action=add&content=forum&origin=learnpath&lp_id=' . $this->lp_id . '" title="' . get_lang('CreateANewForum') . '">' . get_lang('CreateANewForum') . '</a>';
$return .= '</li>'; $return .= '</li>';
$return .= '<script> $return .= '<script>
@ -8825,7 +8819,7 @@ class learnpath
$return .= '<a class="moved" href="#">'; $return .= '<a class="moved" href="#">';
$return .= Display::return_icon('move_everywhere.png', get_lang('Move'), array(), ICON_SIZE_TINY); $return .= Display::return_icon('move_everywhere.png', get_lang('Move'), array(), ICON_SIZE_TINY);
$return .= ' </a>'; $return .= ' </a>';
$return .= '<img alt="" src="../img/lp_forum.gif" style="margin-right:5px;" title="" />'; $return .= Display::return_icon('lp_forum.png', '', array(), ICON_SIZE_TINY);
$return .= '<a style="cursor:hand" onclick="javascript: toggle_forum(' . $forum['forum_id'] . ')" style="vertical-align:middle"> $return .= '<a style="cursor:hand" onclick="javascript: toggle_forum(' . $forum['forum_id'] . ')" style="vertical-align:middle">
<img src="' . Display::returnIconPath('add.gif').'" id="forum_' . $forum['forum_id'] . '_opener" align="absbottom" /> <img src="' . Display::returnIconPath('add.gif').'" id="forum_' . $forum['forum_id'] . '_opener" align="absbottom" />
</a> </a>

@ -426,7 +426,7 @@ if (api_get_course_setting('lp_return_link') == 1) {
$buttonHomeText = get_lang('LearningPathList'); $buttonHomeText = get_lang('LearningPathList');
} }
$lpPreviewImagePath = api_get_path(WEB_CODE_PATH).'img/icons/64/unknown.png'; $lpPreviewImagePath = Display::returnIconPath('unknown.png', ICON_SIZE_BIG);
if ($_SESSION['oLP']->get_preview_image()) { if ($_SESSION['oLP']->get_preview_image()) {
$lpPreviewImagePath = $_SESSION['oLP']->get_preview_image_path(); $lpPreviewImagePath = $_SESSION['oLP']->get_preview_image_path();
} }

@ -58,27 +58,26 @@ class ch_personality extends survey_question
$count = 0; $count = 0;
if (is_array($form_content['answers'])) { if (is_array($form_content['answers'])) {
foreach ($form_content['answers'] as $key => & $value) { foreach ($form_content['answers'] as $key => & $value) {
$this->html .= ' <tr>'; $this->html .= '<tr>';
$this->html .= ' <td align="right"><label for="answers['.$key.']">'.($key+1).'</label></td>'; $this->html .= '<td align="right"><label for="answers['.$key.']">'.($key + 1).'</label></td>';
//$this->html .= ' <td><input type="text" name="answers['.$key.']" id="answers['.$key.']" value="'.$form_content['answers'][$key].'" /></td>'; $this->html .= '<td width="550">'.api_return_html_area('answers['.$key.']', api_html_entity_decode(stripslashes($form_content['answers'][$key])), '', '', null, array('ToolbarSet' => 'Survey', 'Width' => '100%', 'Height' => '120')).'</td>';
$this->html .= ' <td width="550">'.api_return_html_area('answers['.$key.']', api_html_entity_decode(stripslashes($form_content['answers'][$key])), '', '', null, array('ToolbarSet' => 'Survey', 'Width' => '100%', 'Height' => '120')).'</td>'; $this->html .= '<td>';
$this->html .= ' <td>';
if ($total_number_of_answers > 2) { if ($total_number_of_answers > 2) {
$this->html .= $question_values[$count]; $this->html .= $question_values[$count];
} }
if ($key < $total_number_of_answers - 1) { 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="'.Display::returnIconPath('down.png').'" value="move_down['.$key.']" name="move_down['.$key.']"/>';
} }
if ($key > 0) { 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="'.Display::returnIconPath('up.png').'" value="move_up['.$key.']" name="move_up['.$key.']"/>';
} }
if ($total_number_of_answers > 2) { 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="'.Display::returnIconPath('delete.png').'" value="delete_answer['.$key.']" name="delete_answer['.$key.']"/>';
} }
$this->html .= ' </td>'; $this->html .= '</td>';
$this->html .= ' </tr>'; $this->html .= '</tr>';
$count++; $count++;
} }
} }

Loading…
Cancel
Save