Replacing "../img" with Display::return_icon()

skala
jmontoya 13 years ago
parent 49356090a0
commit 0802b13b01
  1. 10
      main/admin/usergroups.php
  2. 17
      main/coursecopy/classes/CourseSelectForm.class.php
  3. 4
      main/link/link.php
  4. 5
      main/tracking/course_session_report.php
  5. 3
      main/user/user.php
  6. 8
      main/work/work.lib.php

@ -69,11 +69,11 @@ $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="add_users_to_usergroup.php?id=\'+options.rowId+\'"><img src="../img/icons/22/user_to_class.png" title="'.get_lang('SubscribeUsersToClass').'"></a>'
.' <a href="add_courses_to_usergroup.php?id=\'+options.rowId+\'"><img src="../img/icons/22/course_to_class.png" title="'.get_lang('SubscribeClassToCourses').'"></a>'
.' <a href="add_sessions_to_usergroup.php?id=\'+options.rowId+\'"><img src="../img/icons/22/sessions_to_class.png" title="'.get_lang('SubscribeClassToSessions').'"></a>'
.' <a href="?action=edit&id=\'+options.rowId+\'"><img width="20px" src="../img/edit.png" title="'.get_lang('Edit').'" ></a>'
.' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'"><img title="'.get_lang('Delete').'" src="../img/delete.png"></a>\';
.' <a href="add_users_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('user_to_class.png', get_lang('SubscribeUsersToClass')).'</a>'
.' <a href="add_courses_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('course_to_class.png', get_lang('SubscribeClassToCourses')).'</a>'
.' <a href="add_sessions_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('sessions_to_class.png', get_lang('SubscribeClassToSessions')).'</a>'
.' <a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit')).'</a>'
.' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete')).'</a>\';
}';
?>
<script>

@ -16,7 +16,8 @@ class CourseSelectForm
* @param array $hidden_fiels Hidden fields to add to the form.
* @param boolean the document array will be serialize. This is used in the course_copy.php file
*/
static function display_form($course, $hidden_fields = null, $avoid_serialize=false) {
static function display_form($course, $hidden_fields = null, $avoid_serialize=false)
{
global $charset;
$resource_titles[RESOURCE_EVENT] = get_lang('Events');
$resource_titles[RESOURCE_ANNOUNCEMENT] = get_lang('Announcements');
@ -34,17 +35,19 @@ class CourseSelectForm
$resource_titles[RESOURCE_WIKI] = get_lang('Wiki');
$resource_titles[RESOURCE_THEMATIC] = get_lang('Thematic');
$resource_titles[RESOURCE_ATTENDANCE] = get_lang('Attendance');
?>
$iconPath = api_get_path(WEB_IMG_PATH);
?>
<script>
function exp(item) {
el = document.getElementById('div_'+item);
if (el.style.display=='none'){
el.style.display='';
document.getElementById('img_'+item).src='../img/1.gif';
document.getElementById('img_'+item).src='<?php echo $iconPath; ?>1.gif';
}
else{
el.style.display='none';
document.getElementById('img_'+item).src='../img/0.gif';
document.getElementById('img_'+item).src='<?php echo $iconPath; ?>0.gif';
}
}
@ -190,7 +193,7 @@ class CourseSelectForm
case RESOURCE_SCORM:
break;
default :
echo '<img id="img_'.$type.'" src="../img/1.gif" onclick="javascript:exp('."'$type'".');" />&nbsp;';
echo '<img id="img_'.$type.'" src="'.$iconPath.'1.gif" onclick="javascript:exp('."'$type'".');" />&nbsp;';
echo '<b onclick="javascript:exp('."'$type'".');" >'.$resource_titles[$type].'</b><br />';
echo '<div id="div_'.$type.'">';
if ($type == RESOURCE_LEARNPATH) {
@ -229,7 +232,7 @@ class CourseSelectForm
if (!empty($forum_categories)) {
$type = RESOURCE_FORUMCATEGORY;
echo '<img id="img_'.$type.'" src="../img/1.gif" onclick="javascript:exp('."'$type'".');" />&nbsp;';
echo '<img id="img_'.$type.'" src="'.$iconPath.'1.gif" onclick="javascript:exp('."'$type'".');" />&nbsp;';
echo '<b onclick="javascript:exp('."'$type'".');" >'.$resource_titles[RESOURCE_FORUM].'</b><br />';
echo '<div id="div_'.$type.'">';
@ -573,7 +576,7 @@ class CourseSelectForm
foreach ($list_course as $course){
foreach ($course->resources as $type => $resources) {
if (count($resources) > 0) {
echo '<img id="img_'.$course->code.'" src="../img/1.gif" onclick="javascript:exp('."'$course->code'".');" />';
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 '<div id="div_'.$course->code.'">';
echo '<blockquote>';

@ -480,7 +480,7 @@ if (empty($_GET['action']) || ($_GET['action'] != 'editlink' && $_GET['action']
echo '<tr>';
echo '<th width="81%" style="font-weight: bold; text-align:left;padding-left: 5px;">';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;urlview='.Security::remove_XSS($newurlview).'">';
echo '<img src="../img/icons/22/view_remove.png" />&nbsp;&nbsp;'.Security::remove_XSS($myrow['category_title']).'</a><br />&nbsp;&nbsp;&nbsp;'.$myrow['description'];
echo Display::return_icon('view_remove.png').'&nbsp;&nbsp;'.Security::remove_XSS($myrow['category_title']).'</a><br />&nbsp;&nbsp;&nbsp;'.$myrow['description'];
echo '</th>';
if (api_is_allowed_to_edit(null, true)) {
if ($session_id == $myrow['session_id']) {
@ -501,7 +501,7 @@ if (empty($_GET['action']) || ($_GET['action'] != 'editlink' && $_GET['action']
echo '<tr>';
echo '<th width="81%" style="font-weight: bold; text-align:left;padding-left: 5px;"><a href="'.api_get_self().'?'.api_get_cidreq().'&amp;urlview=';
echo is_array($view) ? implode('', $view) : $view;
echo '"><img src="../img/icons/22/view_tree.png" />&nbsp;&nbsp;'.Security::remove_XSS($myrow['category_title']).$session_img;
echo '">'.Display::return_icon('view_tree.png').' &nbsp;&nbsp;'.Security::remove_XSS($myrow['category_title']).$session_img;
echo'</a><br />&nbsp;&nbsp;&nbsp;';
echo $myrow['description'];
if (api_is_allowed_to_edit(null, true)) {

@ -105,11 +105,6 @@ if (!$export_to_xls) {
echo '<h2>'.get_lang('LPExerciseResultsBySession').'</h2>';
$form->display();
Display::display_normal_message(get_lang('StudentScoreAverageIsCalculatedBaseInAllLPsAndAllAttempts'));
//echo '<h3>'.sprintf(get_lang('FilteringWithScoreX'), $filter_score).'%</h3>';
// echo '<a href="'.api_get_self().'?export=1&score='.$filter_score.'&exercise_id='.$exercise_id.'"><img align="absbottom" src="../img/excel.gif">&nbsp;'.get_lang('ExportAsXLS').'</a><br /><br />';
}

@ -602,7 +602,8 @@ function modify_filter($user_id) {
$result = "";
if ($is_allowed_to_track) {
$result .= '<a href="../mySpace/myStudents.php?'.api_get_cidreq().'&student='.$user_id.'&amp;details=true&amp;course='.$_course['id'].'&amp;origin=user_course&amp;id_session='.api_get_session_id().'" title="'.get_lang('Tracking').'" ><img border="0" alt="'.get_lang('Tracking').'" src="../img/icons/22/stats.png" /></a>';
$result .= '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?'.api_get_cidreq().'&student='.$user_id.'&amp;details=true&amp;course='.$_course['id'].'&amp;origin=user_course&amp;id_session='.api_get_session_id().'" title="'.get_lang('Tracking').'" >
'.Display::return_icon('stats.png', get_lang('Tracking')).'</a>';
}
//if platform admin, show the login_as icon (this drastically shortens

@ -625,10 +625,10 @@ function display_student_publications_list(
$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>'
<span id="plus">&nbsp;'.Display::return_icon('div_show.gif').'
&nbsp;'.get_lang('AdvancedParameters').'
</span>
</a>'
);
$form_folder->addElement('html', '<div id="options" style="display: none;">');

Loading…
Cancel
Save