diff --git a/main/css/base.css b/main/css/base.css
index fbf27bbe2a..f73559859c 100644
--- a/main/css/base.css
+++ b/main/css/base.css
@@ -339,3 +339,11 @@ button:hover {
.session_course_item {
padding: 6px 0px 6px 5px ;
}
+
+div.lp_resource {
+ background:#FAFAFA;
+ border:1px solid #ccc;
+ padding:5px 10px;
+ width:450px;
+ font
+}
\ No newline at end of file
diff --git a/main/inc/lib/javascript/jquery-ui/default.css b/main/inc/lib/javascript/jquery-ui/default.css
index 4de870ae8b..84d390ff3b 100644
--- a/main/inc/lib/javascript/jquery-ui/default.css
+++ b/main/inc/lib/javascript/jquery-ui/default.css
@@ -78,11 +78,23 @@
height:15px;
}
+/* LP add items */
+#resource_tab.ui-tabs .ui-tabs-nav {
+ height: 77px;
+}
+
+#resource_tab.ui-tabs .ui-tabs-nav li {
+ height: 75px;
+ border:1px solid #ccc;
+
+}
+
+#resource_tab.ui-tabs-nav li {
+
+}
+
/* cupertino */
/* ui-lightness */
-
- *
- */
\ No newline at end of file
diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php
index de1da12fbf..07d54d2407 100755
--- a/main/newscorm/learnpath.class.php
+++ b/main/newscorm/learnpath.class.php
@@ -5098,28 +5098,36 @@ class learnpath {
public function display_resources() {
global $_course; // TODO: Don't use globals.
- $return .= '
' . get_lang('CreateNewStep') . '
';
- $return .= ''; // TODO: A hardcoded Spanish text is here.
- $return .= '' . get_lang('UseAnExistingResource') . '
';
- $return .= '';
+ //Get al the forums
+ $forums = $this->get_forums();
+ $headers = array( Display::return_icon('new_doc.png', get_lang('NewDocument'), array(), 64),
+ Display::return_icon('folder_document.png', get_lang('Documents'), array(), 64),
+ Display::return_icon('quiz.png', get_lang('Exercises'), array(), 64),
+ Display::return_icon('links.png', get_lang('Links'), array(), 64),
+ Display::return_icon('works.png', get_lang('Works'), array(), 64),
+ Display::return_icon('forum.png', get_lang('Forums'), array(), 64),
+ );
+
+ echo Display::tabs($headers, array($new_document, $documents, $exercises, $links, $works, $forums), 'resource_tab');
return $return;
}
@@ -7404,7 +7412,7 @@ class learnpath {
$added_slash = ($path == '/') ? '' : '/';
//condition for the session
- $current_session_id = api_get_session_id();
+ $current_session_id = api_get_session_id();
$condition_session = " AND (id_session = '$current_session_id' OR (id_session = '0' AND insert_date <= (SELECT creation_date FROM $tbl_course WHERE code = '{$_course[id]}')))";
$sql_doc = "SELECT docs.*
@@ -7414,12 +7422,10 @@ class learnpath {
AND docs.path NOT LIKE '%_DELETED_%'
AND last.tool = '".TOOL_DOCUMENT."' $condition_session ORDER BY docs.path ASC";
- //$sql_doc = "SELECT * FROM $tbl_doc WHERE path NOT LIKE '%_DELETED_%' ORDER BY path ASC";
-
$res_doc = Database::query($sql_doc);
- $return = '';
- $return .= '';
+ //$return = '';
+ $return = '
';
$resources = Database::store_result($res_doc);
$resources_sorted = array();
@@ -7448,13 +7454,11 @@ class learnpath {
} else {
eval ('$resources_sorted' . $path_to_eval . '["' . $last_path . '"]["id"]=' . $resource['id'] . ';');
}
-
}
$return .= $this->write_resources_tree($resources_sorted);
if (Database :: num_rows($res_doc) == 0) {
$return .= '
' . get_lang('NoDocuments') . '
';
}
-
$return .= '
';
return $return;
}
@@ -7536,21 +7540,14 @@ class learnpath {
$session_id = api_get_session_id();
$condition_session = api_get_session_condition($session_id);
- $sql_quiz = "
- SELECT *
- FROM " . $tbl_quiz . "
- WHERE active<>'-1' $condition_session
- ORDER BY title ASC";
-
- $sql_hot = "SELECT * FROM " . $tbl_doc . " " .
- " WHERE path LIKE '" . $uploadPath . "/%/%htm%' $condition_session " .
- " ORDER BY id ASC";
+ $sql_quiz = "SELECT * FROM " . $tbl_quiz . " WHERE active<>'-1' $condition_session ORDER BY title ASC";
+ $sql_hot = "SELECT * FROM $tbl_doc WHERE path LIKE '" . $uploadPath . "/%/%htm%' $condition_session ORDER BY id ASC";
$res_quiz = Database::query($sql_quiz);
$res_hot = Database::query($sql_hot);
- $return .= '';
- $return .= '
';
+ //$return .= '';
+ $return .= '
';
while ($row_hot = Database :: fetch_array($res_hot)) {
$return .= '
';
@@ -7593,8 +7590,8 @@ class learnpath {
$sql_link = "SELECT * FROM $tbl_link $condition_session ORDER BY title ASC";
$res_link = Database::query($sql_link);
- $return .= '';
- $return .= '
';
+ //$return .= '';
+ $return .= '
';
while ($row_link = Database :: fetch_array($res_link)) {
$return .= '
';
@@ -7627,8 +7624,8 @@ class learnpath {
$condition_session = api_get_session_condition($session_id, false);
$sql_student = "SELECT * FROM $tbl_student $condition_session ORDER BY title ASC";
$res_student = Database::query($sql_student);
- $return .= '';
- $return .= '
';
+ //$return .= '';
+ $return .= '
';
$return .= '
';
$return .= '

';
$return .= '
' . get_lang('AddAssignmentPage') . '';
@@ -7642,8 +7639,8 @@ class learnpath {
* @return string
*/
public function get_forums() {
- include '../forum/forumfunction.inc.php';
- include '../forum/forumconfig.inc.php';
+ require_once '../forum/forumfunction.inc.php';
+ require_once '../forum/forumconfig.inc.php';
global $table_forums, $table_threads, $table_posts, $table_item_property, $table_users;
$table_forums = Database :: get_course_table(TABLE_FORUM);
$table_threads = Database :: get_course_table(TABLE_FORUM_THREAD);
@@ -7652,8 +7649,8 @@ class learnpath {
$table_users = Database :: get_main_table(TABLE_MAIN_USER);
$a_forums = get_forums();
- $return .= '';
- $return .= '
';
+ //$return .= '';
+ $return .= '
';
foreach ($a_forums as $forum) {
$return .= '
';
@@ -7668,8 +7665,7 @@ class learnpath {
document.getElementById("forum_"+forum_id+"_opener").src = "' . api_get_path(WEB_IMG_PATH) . 'add.gif";
}
}
-
- ';
+ ';
if (!empty($forum['forum_id'])) {
$return .= '

';
diff --git a/main/newscorm/lp_add_item.php b/main/newscorm/lp_add_item.php
index 3aa9afe27e..178c1da253 100755
--- a/main/newscorm/lp_add_item.php
+++ b/main/newscorm/lp_add_item.php
@@ -33,6 +33,8 @@ $language_file = 'learnpath';
/* Header and action code */
+
+
$htmlHeadXtra[] = '
';
+$htmlHeadXtra[] = api_get_jquery_ui_js(); //jQuery
/* Constants and variables */
@@ -221,7 +224,6 @@ $suredel = trim(get_lang('AreYouSureToDelete'));
//$suredelstep = trim(get_lang('AreYouSureToDeleteSteps'));
?>
@@ -47,10 +47,10 @@ if (api_get_setting('show_glossary_in_documents') == 'ismanual' || api_get_setti
$htmlHeadXtra[] = '';