Julio Montoya 14 年之前
父节点
当前提交
a5d78f46ff
共有 4 个文件被更改,包括 83 次插入77 次删除
  1. 24 6
      main/inc/banner.inc.php
  2. 0 11
      main/inc/header.inc.php
  3. 58 59
      main/newscorm/learnpath.class.php
  4. 1 1
      main/newscorm/openoffice_presentation.class.php

+ 24 - 6
main/inc/banner.inc.php

@@ -13,8 +13,31 @@ require_once api_get_path(LIBRARY_PATH).'banner.lib.php';
 $session_id     = api_get_session_id();
 $session_name   = api_get_session_name($my_session_id);
 ?>
+
 <div id="wrapper">
 
+  <ul id="navigation">
+<?php 
+if (!empty($help)) { 
+?>
+        <li class="help"><a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>"><img src="<?php echo api_get_path(WEB_CSS_PATH).$my_style;?>/images/help2.png" alt="<?php echo get_lang('Help');?>" title="<?php echo get_lang('Help');?>" /></a> </li>
+<?php 
+}
+if (api_get_setting('show_link_bug_notification') == 'true') { 
+?>
+    <li class="report"><a href="http://support.chamilo.org/projects/chamilo-18/wiki/How_to_report_bugs" target="_blank"><img src="<?php echo api_get_path(WEB_IMG_PATH) ?>splash.png" style="vertical-align: middle;" alt="<?php echo get_lang('ReportABug') ?>" title="<?php echo get_lang('ReportABug');?>"/></a></li>
+<?php
+}
+/*
+        <li class="student">            <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
+        <li class="user-online">        <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
+        <li class="user-connect">       <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
+        <li class="student-connect">    <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
+<?php } 
+*/
+?>
+  </ul>
+
 <div id="header">
 	<div id="header1">
 		<div id="top_corner"></div>
@@ -135,11 +158,6 @@ if ($_user['user_id'] && isset($_cid)) {
 	}
 }
 
-if (api_get_setting('show_link_bug_notification') == 'true') { ?>
-    <li>|<a href="http://support.chamilo.org/projects/chamilo-18/wiki/How_to_report_bugs" target="_blank"><img src="<?php echo api_get_path(WEB_IMG_PATH) ?>splash.png" style="vertical-align: middle;" alt="<?php echo get_lang('ReportABug') ?>"/>&nbsp;<?php echo get_lang('ReportABug') ?></a></li>
-<?php
-}
-
 
 if (api_is_allowed_to_edit()) {
 		if (!empty($help)) {			
@@ -149,7 +167,7 @@ if (api_is_allowed_to_edit()) {
 			echo '|';	
 		}
 		//echo get_lang('Help');
-	?>	<?php /*	
+                /*	
 			<a href="#" onclick="javascript: MyWindow=window.open('<?php echo api_get_path(WEB_CODE_PATH).'help/help.php'; ?>?open=<?php echo $help; ?>','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=620,height=600,left=200,top=20'); return false;">
 			<img src="<?php echo api_get_path(WEB_IMG_PATH); ?>help.png" style="vertical-align: middle;" title="<?php echo get_lang('Help'); ?>" alt="<?php echo get_lang('Help'); ?>"/></a>			
 		 */?>

+ 0 - 11
main/inc/header.inc.php

@@ -119,17 +119,6 @@ if ($navigator_info['name']=='Internet Explorer' &&  $navigator_info['version']=
 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>" />
 <script src= "<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/jquery.menu.js" type="text/javascript"></script>
 
-<?php if (!empty($help)) { ?>
-    <ul id="navigation">
-        <li class="help">               <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600", class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
-        <li class="report">             <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600", class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
-        <li class="student">            <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600", class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
-        <li class="user-online">        <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600", class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
-        <li class="user-connect">       <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600", class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
-        <li class="student-connect">    <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600", class="thickbox" title="<?php echo get_lang('Help'); ?>"></a> </li>
-</ul>
-<?php } ?>
-
 <script type="text/javascript">
 //<![CDATA[
 // This is a patch for the "__flash__removeCallback" bug, see FS#4378.

+ 58 - 59
main/newscorm/learnpath.class.php

@@ -342,7 +342,7 @@ class learnpath {
      * @param int $parent
      * @param int $previous
      * @param string $type
-     * @param int $id
+     * @param int  resource ID (ref)
      * @param string $title
      * @param string $description
      * @return int
@@ -428,66 +428,65 @@ class learnpath {
 
         if ($prerequisites != 0) {
             $sql_ins = "
-                            INSERT INTO " . $tbl_lp_item . " (
-                                lp_id,
-                                item_type,
-                                ref,
-                                title,
-                                description,
-                                path,
-                                max_score,
-                                parent_item_id,
-                                previous_item_id,
-                                next_item_id,
-                                display_order,
-                                prerequisite,
-                                max_time_allowed
-
-                            ) VALUES (
-                                " . $this->get_id() . ",
-                                '" . $type . "',
-                                '',
-                                '" . $title . "',
-                                '" . $description . "',
-                                '" . $id . "',
-                                '" . $max_score . "',
-                                " . $parent . ",
-                                " . $previous . ",
-                                " . $next . ",
-                                " . ($display_order +1) . ",
-                                " . $prerequisites . ",
-                                " . $max_time_allowed . "
-                            )";
+                            INSERT INTO " . $tbl_lp_item . " ( ".
+                                "lp_id, ".
+                                "item_type, ".
+                                "ref, ".
+                                "title, ".
+                                "description, ".
+                                "path, ".
+                                "max_score, ".
+                                "parent_item_id, ".
+                                "previous_item_id, ".
+                                "next_item_id, ".
+                                "display_order, ".
+                                "prerequisite, ".
+                                "max_time_allowed ".
+                            ") VALUES ( ".
+                                $this->get_id() . ", ".
+                                "'" . $type . "', ".
+                                "'', ".
+                                "'" . $title . "', ".
+                                "'" . $description . "', ".
+                                "'" . $id . "', ".
+                                "'" . $max_score . "', ".
+                                $parent . ", ".
+                                $previous . ", ".
+                                $next . ", ".
+                                ($display_order +1) . ", ".
+                                $prerequisites . ", ".
+                                $max_time_allowed .
+                            ")";
         } else {
             // Insert new item.
             $sql_ins = "
-                            INSERT INTO " . $tbl_lp_item . " (
-                                lp_id,
-                                item_type,
-                                ref,
-                                title,
-                                description,
-                                path,
-                                max_score,
-                                parent_item_id,
-                                previous_item_id,
-                                next_item_id,
-                                display_order,
-                                max_time_allowed
-                            ) VALUES (
-                                " . $this->get_id() . ",
-                                '" . $type . "',
-                                '',
-                                '" . $title . "',
-                                '" . $description . "',
-                                '" . $id . "',
-                                '" . $max_score . "',
-                                " . $parent . ",
-                                " . $previous . ",
-                                " . $next . ",
-                                " . ($display_order +1) . ",
-                                " . $max_time_allowed . "
-                            )";
+                            INSERT INTO " . $tbl_lp_item . " ( ".
+                                "lp_id, ".
+                                "item_type, ".
+                                "ref, ".
+                                "title, ".
+                                "description, ".
+                                "path, ".
+                                "max_score, ".
+                                "parent_item_id, ".
+                                "previous_item_id, ".
+                                "next_item_id, ".
+                                "display_order, ".
+                                "max_time_allowed ".
+                            ") VALUES (".
+                                $this->get_id() . ",".
+                                "'" . $type . "',".
+                                "'',".
+                                "'" . $title . "',".
+                                "'" . $description . "',".
+                                "'" . $id . "',".
+                                "'" . $max_score . "',".
+                                $parent . ",".
+                                $previous . ",".
+                                $next . ",".
+                                ($display_order +1) . ",".
+                                $max_time_allowed .
+                            ")";
         }
 
         if ($this->debug > 2) {
@@ -8495,4 +8494,4 @@ if (!function_exists('trim_value')) {
     function trim_value(& $value) {
         $value = trim($value);
     }
-}
+}

+ 1 - 1
main/newscorm/openoffice_presentation.class.php

@@ -115,7 +115,7 @@ class OpenofficePresentation extends OpenofficeDocument {
                 // Put the document in item_property update.
                 api_item_property_update($_course, TOOL_DOCUMENT, $document_id, 'DocumentAdded', api_get_user_id(), 0, 0, null, null, api_get_session_id());
 
-                $previous = learnpath::add_item(0, $previous, 'document', $document_id, $slide_name, '');
+                $previous = $this->add_item(0, $previous, 'document', $document_id, $slide_name, '');
                 if ($this->first_item == 0) {
                     $this->first_item = $previous;
                 }