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 .= '
' . 'Nuevo documento ' . get_lang('NewDocument') . '
'; // TODO: A hardcoded Spanish text is here. - $return .= '
' . get_lang('UseAnExistingResource') . '
'; - $return .= '
'; - - /* Get all the docs. */ - $return .= $this->get_documents(); + /*$return .= '
' . get_lang('CreateNewStep') . '
'; + $return .= '
' . 'Nuevo documento ' . get_lang('NewDocument') . '
'; + $return .= '
' . get_lang('UseAnExistingResource') . '
';*/ + + $new_document = Display::return_message(Display::url(get_lang('NewDocument') , api_get_self().'?'.api_get_cidreq().'&action=add_item&type='.TOOL_DOCUMENT.'&lp_id='.$_SESSION['oLP']->lp_id)); - /* Get all the exercises. */ - $return .= $this->get_exercises(); + //Get all the docs + $documents = $this->get_documents(); - /* Get all the links. */ - $return .= $this->get_links(); + //Get all the exercises + $exercises = $this->get_exercises(); - /* Get al the student publications. */ - $return .= $this->get_student_publications(); + // Get all the links + $links = $this->get_links(); - /* Get al the forums. */ - $return .= $this->get_forums(); + //Get al the student publications + $works = $this->get_student_publications(); - $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 = '
'.Display::return_icon('folder_document.gif',get_lang('Documents'),array('style'=>'margin-right:5px;', 'height' => '16px')).' '. get_lang('Documents') . '
'; - $return .= '
'; + //$return = '
'.Display::return_icon('folder_document.gif',get_lang('Documents'),array('style'=>'margin-right:5px;', 'height' => '16px')).' '. get_lang('Documents') . '
'; + $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 .= '
' . get_lang('Quiz') . '
'; - $return .= '
'; + //$return .= '
' . get_lang('Quiz') . '
'; + $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 .= '
' . get_lang('Links') . '
'; - $return .= '