|
|
|
|
@ -4448,7 +4448,18 @@ class learnpath { |
|
|
|
|
//$return .= '<hr />'; |
|
|
|
|
|
|
|
|
|
if($row['item_type'] == TOOL_DOCUMENT) |
|
|
|
|
{ |
|
|
|
|
$tbl_doc = Database :: get_course_table(TABLE_DOCUMENT); |
|
|
|
|
$sql_doc = "SELECT path FROM " . $tbl_doc . " WHERE id = " . $row['path']; |
|
|
|
|
$result=api_sql_query($sql_doc); |
|
|
|
|
$path_file=mysql_result($result,0,0); |
|
|
|
|
$path_parts = pathinfo($path_file); |
|
|
|
|
|
|
|
|
|
if(in_array($path_parts['extension'],array('html','txt'))) |
|
|
|
|
{ |
|
|
|
|
$return .= $this->display_document($row['path'], true, true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$return .= '</div>'; |
|
|
|
|
} |
|
|
|
|
@ -5591,14 +5602,14 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '') |
|
|
|
|
|
|
|
|
|
$return .= '</div>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
if($no_display_add==true){ |
|
|
|
|
$return .= '<div class="lp_message" style="margin-bottom:15px;">'; |
|
|
|
|
$return .= get_lang("CantEditDocument"); |
|
|
|
|
$return .= '</div>'; |
|
|
|
|
return $return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'); |
|
|
|
|
|
|
|
|
|
$form = new FormValidator('form','POST',$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]); |
|
|
|
|
@ -5671,7 +5682,8 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '') |
|
|
|
|
if($action != 'move'){ |
|
|
|
|
$form->addElement('text','title', get_lang('Title').' :','id="idTitle" style="background:#F8F8F8; border:1px solid #999999; font-family:Arial, Verdana, Helvetica, sans-serif; font-size:12px; padding:1px 2px; width:300px;"'); |
|
|
|
|
//$form->addElement('textarea','description',get_lang("Description").' :', 'id="idDescription" style="background:#F8F8F8; border:1px solid #999999; font-family:Arial, Verdana, Helvetica, sans-serif; font-size:12px; padding:1px 2px; width:300px;"'); |
|
|
|
|
|
|
|
|
|
if(!$no_display_add) |
|
|
|
|
{ |
|
|
|
|
if(($extra_info == 'new' || $extra_info['item_type'] == TOOL_DOCUMENT || $_GET['edit'] == 'true')) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
@ -5693,10 +5705,6 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '') |
|
|
|
|
$form->addElement('html_editor','content_lp',get_lang("Content")." :"); |
|
|
|
|
$defaults["content_lp"]=$content; |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
$return = $this->display_document($extra_info['path'], false, true); |
|
|
|
|
$form->addElement('html',$return); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -5705,6 +5713,7 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '') |
|
|
|
|
$return = $this->display_document($extra_info, true, true, true); |
|
|
|
|
$form->addElement('html',$return); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|