[svn r16124] LP's menu improvements see FS#2841

skala
Julio Montoya 18 years ago
parent 1d9aafd7d5
commit 2981707d3d
  1. BIN
      main/css/public_admin/images/bar_1.gif
  2. BIN
      main/css/public_admin/images/bar_1m.gif
  3. BIN
      main/css/public_admin/images/bar_1r.gif
  4. BIN
      main/css/public_admin/images/bar_1u.gif
  5. 6
      main/css/public_admin/scorm.css
  6. BIN
      main/img/lp_arrow.gif
  7. BIN
      main/img/lp_author_background.gif
  8. BIN
      main/img/unknown_250_100.jpg
  9. 58
      main/newscorm/learnpath.class.php
  10. 27
      main/newscorm/lp_author_image.php
  11. 9
      main/newscorm/lp_edit.php
  12. 8
      main/newscorm/lp_header.php
  13. 2
      main/newscorm/lp_nav.php
  14. 2
      main/newscorm/lp_view.php

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 804 B

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 B

After

Width:  |  Height:  |  Size: 88 B

@ -178,9 +178,9 @@
clear: both;
}
#preview_image
{
text-align:center;
#author_name
{
padding-left: 17px;
}
#msg_div_id{

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

@ -1963,7 +1963,7 @@ class learnpath {
$text = $percentage.$text_add;
//Default progress bar config
$factor=1.5;
$factor=1.4;
if ($from_lp)
$progress_height='25';
else
@ -8489,7 +8489,7 @@ EOD;
}
/**
* Uploads a new image to the learning path image upload directory
* Uploads an author image to the upload/learning_path/images directory
* @param array The image array, coming from the $_FILES superglobal
* @return boolean True on success, false on error
*/
@ -8512,14 +8512,16 @@ EOD;
{
$courseDir = api_get_course_path().'/upload/learning_path/images';
$sys_course_path = api_get_path(SYS_COURSE_PATH);
$updir = $sys_course_path.$courseDir;
$updir = $sys_course_path.$courseDir;
// Try to add an extension to the file if it hasn't one
$new_file_name = add_ext_on_mime(stripslashes($image_array['name']), $image_array['type']);
// user's file name
$file_name =$image_array['name'];
if (!filter_extension($new_file_name))
{
//Display :: display_error_message(get_lang('UplUnableToSaveFileFilteredExtension'));
@ -8531,14 +8533,50 @@ EOD;
$file_extension = strtolower($file_extension[sizeof($file_extension) - 1]);
$new_file_name = uniqid('').'.'.$file_extension;
$new_path=$updir.'/'.$new_file_name;
$result= @move_uploaded_file($image_array['tmp_name'], $new_path);
//$result= @move_uploaded_file($image_array['tmp_name'], $new_path);
// resize the image
include_once (api_get_path(LIBRARY_PATH).'image.lib.php');
$temp = new image($image_array['tmp_name']);
$picture_infos=getimagesize($image_array['tmp_name']); // $picture_infos[0]-> width
if ($picture_infos[0]>240)
$thumbwidth=240;
else
$thumbwidth=$picture_infos[0];
if ($picture_infos[1]>100)
$new_height=100;
else
$new_height = $picture_infos[1];
//$new_height = round(($thumbwidth/$picture_infos[0])*$picture_infos[1]);
$temp->resize($thumbwidth,$new_height,0);
$type=$picture_infos[2];
switch ($type) {
case 2 : $temp->send_image('JPG',$new_path);
break;
case 3 : $temp->send_image('PNG',$new_path);
break;
case 1 : $temp->send_image('GIF',$new_path);
break;
}
// Storing the attachments if any
if ($result)
if (1)
{
$image_moved=true;
$this->set_preview_image($new_file_name);
return true;
}
//return true;
}
}
}
}

@ -32,13 +32,26 @@ include_once('../inc/reduced_header.inc.php');
echo '<html>
<body>';
echo '<div id="preview_image">';
if ($_SESSION['oLP']->get_preview_image()!='')
echo '<img alt="'.$_SESSION['oLP']->get_author().'" src="'.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/upload/learning_path/images/'.$_SESSION['oLP']->get_preview_image().'">';
else
echo Display::display_icon('unknown.jpg',$_SESSION['oLP']->get_author());
echo '</div>';
$image = '../img/lp_author_background.gif';
echo '<div id="author_name">';
echo '<table STYLE="width:250px;height:110px;background-image: url('.$image.');">';
echo '<tr><td align="center">';
if ($_SESSION['oLP']->get_preview_image()!='')
echo '<img alt="'.$_SESSION['oLP']->get_author().'" src="'.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/upload/learning_path/images/'.$_SESSION['oLP']->get_preview_image().'">';
else
echo Display::display_icon('unknown_250_110.jpg',$_SESSION['oLP']->get_author());
echo '</td></tr>';
echo '</table>';
echo '<br />';
echo $_SESSION['oLP']->get_author();
echo '</div>';
?>
</body>
</html>

@ -96,13 +96,20 @@ if( strlen($_SESSION['oLP']->get_preview_image() ) > 0)
'.$show_preview_image.'
</div>
</div>';
$form->addElement('html', $div .'<br/>');
$form->addElement('checkbox', 'remove_picture', null, get_lang('DelImage'));
}
$form->addElement('file', 'lp_preview_image', ($_SESSION['oLP']->get_preview_image() != '' ? get_lang('UpdateImage') : get_lang('AddImage')));
$div = '<div class="row">
<div class="label"></div>
<div class="formw"> '.get_lang('ImageWillResizeMsg').'
</div>
</div>';
$form->addElement('html', $div);
$form->addRule('lp_preview_image', get_lang('OnlyImagesAllowed'), 'mimetype', array('image/gif', 'image/jpeg', 'image/png'));

@ -59,8 +59,14 @@ $interbreadcrumb[] = array("url"=>"./lp_controller.php?action=view&lp_id=".$path
$noPHP_SELF = true;
$lp_theme_css=$_SESSION['oLP']->get_theme();
include('../inc/reduced_header.inc.php');
echo '<div style="padding-top: 10px; padding-left: 17px;">';
echo '<div style="font-size:14px;padding-left: 17px;">';
echo '<table ><tr><td>';
echo '<a href="./lp_controller.php?action=return_to_course_homepage" target="_top" onclick="window.parent.API.save_asset();">';
echo '<img src="../img/lp_arrow.gif">';
echo '<a>';
echo '</td><td>';
echo '<a class="link" href="./lp_controller.php?action=return_to_course_homepage" target="_top" onclick="window.parent.API.save_asset();">'.get_lang('CourseHomepageLink').'</a>';
echo '</td></tr><table>';
echo '</div>';
?>
</body>

@ -58,7 +58,7 @@ if(isset($_SESSION['lpobject']))
$lp_theme_css=$my_style;
}
//$progress_bar = $_SESSION['oLP']->get_progress_bar();
//$progress_bar = $_SESSION['oLP']->get_progress_bar();
$progress_bar = $_SESSION['oLP']->get_progress_bar('',-1,'',true);
$navigation_bar = $_SESSION['oLP']->get_navigation_bar(); }

@ -183,7 +183,7 @@ else
?>
<frameset cols="270,*">
<frameset rows="30,120,<?php echo $audio_record_width; ?>60,20,500,20">
<frameset rows="57,240,<?php echo $audio_record_width; ?>60,20,500,20">
<frame id="header" src="lp_header.php" border="0" frameborder="0" scrolling="no"/>
<frame id="author_image" name="author_image" class="lp_author_image" src="lp_author_image.php" border="0" frameborder="0" />
<?php

Loading…
Cancel
Save