Adding a new course home page view (activity big ) see #2963

skala
Julio Montoya 14 years ago
parent bcde16ebe5
commit bd51cec74a
  1. 7
      main/course_home/course_home.php
  2. 12
      main/course_home/vertical_activity.php
  3. 13
      main/css/base.css
  4. BIN
      main/img/icons/64/agenda.png
  5. BIN
      main/img/icons/64/agenda_na.png
  6. BIN
      main/img/icons/64/attendance.png
  7. BIN
      main/img/icons/64/attendance_na.png
  8. BIN
      main/img/icons/64/backup.png
  9. BIN
      main/img/icons/64/blog.png
  10. BIN
      main/img/icons/64/blog_admin.png
  11. BIN
      main/img/icons/64/blog_na.png
  12. BIN
      main/img/icons/64/certificate.png
  13. BIN
      main/img/icons/64/chat.png
  14. BIN
      main/img/icons/64/chat_na.png
  15. BIN
      main/img/icons/64/clock.png
  16. BIN
      main/img/icons/64/course_progress.png
  17. BIN
      main/img/icons/64/course_progress_na.png
  18. BIN
      main/img/icons/64/dropbox.png
  19. BIN
      main/img/icons/64/dropbox_na.png
  20. BIN
      main/img/icons/64/file_html.png
  21. BIN
      main/img/icons/64/folder_document.png
  22. BIN
      main/img/icons/64/folder_document_na.png
  23. BIN
      main/img/icons/64/forum.png
  24. BIN
      main/img/icons/64/forum_na.png
  25. BIN
      main/img/icons/64/glossary.png
  26. BIN
      main/img/icons/64/glossary_na.png
  27. BIN
      main/img/icons/64/gradebook.png
  28. BIN
      main/img/icons/64/gradebook_na.png
  29. BIN
      main/img/icons/64/group.png
  30. BIN
      main/img/icons/64/group_na.png
  31. BIN
      main/img/icons/64/info.png
  32. BIN
      main/img/icons/64/info_na.png
  33. BIN
      main/img/icons/64/links.png
  34. BIN
      main/img/icons/64/links_na.png
  35. BIN
      main/img/icons/64/members.png
  36. BIN
      main/img/icons/64/members_na.png
  37. BIN
      main/img/icons/64/notebook.png
  38. BIN
      main/img/icons/64/notebook_na.png
  39. BIN
      main/img/icons/64/quiz.png
  40. BIN
      main/img/icons/64/quiz_na.png
  41. BIN
      main/img/icons/64/reference.png
  42. BIN
      main/img/icons/64/reference_na.png
  43. BIN
      main/img/icons/64/scorm.png
  44. BIN
      main/img/icons/64/scorms.png
  45. BIN
      main/img/icons/64/scorms_na.png
  46. BIN
      main/img/icons/64/statistics.png
  47. BIN
      main/img/icons/64/survey.png
  48. BIN
      main/img/icons/64/survey_na.png
  49. BIN
      main/img/icons/64/user.png
  50. BIN
      main/img/icons/64/user_na.png
  51. BIN
      main/img/icons/64/valves.png
  52. BIN
      main/img/icons/64/valves_na.png
  53. BIN
      main/img/icons/64/works.png
  54. BIN
      main/img/icons/64/works_na.png
  55. 12
      main/inc/ajax/course_home.ajax.php
  56. 2
      main/inc/header.inc.php
  57. 71
      main/inc/lib/course_home.lib.php
  58. 3
      main/install/db_main.sql
  59. 4
      main/install/migrate-db-1.8.7-1.8.8-pre.sql

@ -66,10 +66,10 @@ $(document).ready(function() {
data: "id=" + my_tool_id + "&sent_http_request=1",
success: function(data) {
eval("var info=" + data);
new_current_tool_image = "'.api_get_path(WEB_IMG_PATH).'" + info.image;
new_current_tool_image = info.image;
new_current_view = "'.api_get_path(WEB_IMG_PATH).'" + info.view;
//eyes
$("#" + tool_id).attr("src", new_current_view);
$("#" + tool_id).attr("src", new_current_view);
//tool
$("#toolimage_" + my_tool_id).attr("src", new_current_tool_image);
//clase
@ -270,8 +270,7 @@ Display::display_introduction_section(TOOL_COURSE_HOMEPAGE, array(
if ($show_autolunch_lp_warning) {
Display::display_warning_message(get_lang('TheLPAutoLaunchSettingIsONStudentsWillBeRedirectToAnSpecificLP'));
}
if (api_get_setting('homepage_view') == 'activity') {
//require 'activity_big.php';
if (api_get_setting('homepage_view') == 'activity' || api_get_setting('homepage_view') == 'activity_big') {
require 'activity.php';
} elseif (api_get_setting('homepage_view') == '2column') {
require '2column.php';

@ -119,21 +119,21 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
<?php
$my_list = CourseHome::get_tools_category(TOOL_AUTHORING);
CourseHome::show_tools_category($my_list, 'vertical_activity');
CourseHome::show_tools_category($my_list);
?>
</div>
<div class="courseadminview-activity-3col">
<span class="viewcaption"><?php echo get_lang('Interaction'); ?></span>
<?php
$my_list = CourseHome::get_tools_category(TOOL_INTERACTION);
CourseHome::show_tools_category($my_list, 'vertical_activity');
CourseHome::show_tools_category($my_list);
?>
</div>
<div class="courseadminview-activity-3col">
<span class="viewcaption"><?php echo get_lang('Administration'); ?></span>
<?php
$my_list = CourseHome::get_tools_category(TOOL_ADMIN_PLATEFORM);
CourseHome::show_tools_category($my_list, 'vertical_activity');
CourseHome::show_tools_category($my_list);
?>
</div>
<?php
@ -155,7 +155,7 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
<div class="Authoringview">
<?php
$my_list = CourseHome::get_tools_category(TOOL_STUDENT_VIEW);
CourseHome::show_tools_category($my_list, 'vertical_activity');
CourseHome::show_tools_category($my_list);
?>
</div>
<?php
@ -188,8 +188,8 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
}
$i++;
}
CourseHome::show_tools_category($my_list1, 'vertical_activity');
CourseHome::show_tools_category($my_list2, 'vertical_activity');
CourseHome::show_tools_category($my_list1);
CourseHome::show_tools_category($my_list2);
echo '</div>';
}
}

@ -12,4 +12,17 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
input.maininput:focus {
box-shadow:0 0 0px #fff;
border:none;
}
.big_icon {
width:205px;
padding:10px;
}
.big_icon img {
margin:0 auto 0 auto;
}
.courseadminview .big_icon a {
font-size:12px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -16,7 +16,17 @@ switch ($action) {
$tool_info = api_get_tool_information($tool_id);
$tool_visibility = $tool_info['visibility'];
$tool_image = $tool_info['image'];
$new_image = str_replace('.gif','_na.gif',$tool_image);
if (api_get_setting('homepage_view') != 'activity_big') {
$new_image = api_get_path(WEB_IMG_PATH).str_replace('.gif','_na.gif',$tool_image);
$tool_image = api_get_path(WEB_IMG_PATH).$tool_image;
} else {
$tool_image = $tool_info['image'];
$tool_image = (substr($tool_info['image'], 0, strpos($tool_info['image'], '.'))).'.png';
$new_image = str_replace('.png','_na.png',$tool_image);
$new_image = api_get_path(WEB_IMG_PATH).'icons/64/'.$new_image;
$tool_image = api_get_path(WEB_IMG_PATH).'icons/64/'.$tool_image;
}
$requested_image = ($tool_visibility == 0 ) ? $tool_image : $new_image;
$requested_clase = ($tool_visibility == 0 ) ? 'visible' : 'invisible';
$requested_message = ($tool_visibility == 0 ) ? 'is_active' : 'is_inactive';

@ -108,7 +108,7 @@ if ($navigator_info['name']=='Internet Explorer' && $navigator_info['version']=
<style type="text/css" media="print">
/*<![CDATA[*/
<?php
echo '@import "'.api_get_path(WEB_CSS_PATH).$my_style.'/print.css";'."\n";
echo '@import "'.api_get_path(WEB_CSS_PATH).$my_style.'/print.css";';
?>
/*]]>*/
</style>

@ -588,8 +588,9 @@ class CourseHome {
* @param array List of tools as returned by get_tools_category()
* @return void
*/
public static function show_tools_category($all_tools_list, $theme = 'activity') {
public static function show_tools_category($all_tools_list) {
global $_user;
$theme = api_get_setting('homepage_view');
if ($theme == 'vertical_activity') {
//ordering by get_lang name
$order_tool_list = array();
@ -679,7 +680,7 @@ class CourseHome {
$tool['link'] = $web_code_path.$tool['link'];
}
if ($tool['visibility'] == '0' && $tool['admin'] != '1') {
$class = 'class="invisible"';
$class = 'invisible';
$info = pathinfo($tool['image']);
$basename = basename($tool['image'], '.'.$info['extension']); // $file is set to "index"
$tool['image'] = $basename.'_na.'.$info['extension'];
@ -694,22 +695,35 @@ class CourseHome {
} else {
$tool['link'] = $tool['link'].$qm_or_amp.api_get_cidreq();
}
if (strpos($tool['name'],'visio_') !== false) {
$toollink = '<a id="tooldesc_'.$tool["id"].'" ' . $class . ' href="javascript: void(0);" onclick="javascript: window.open(\'' . htmlspecialchars($tool['link']) . '\',\'window_visio'.$_SESSION['_cid'].'\',config=\'height=\'+730+\', width=\'+1020+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="' . $tool['target'] . '">';
$my_tool_link = '<a id="istooldesc_'.$tool["id"].'" ' . $class . ' href="javascript: void(0);" onclick="javascript: window.open(\'' . htmlspecialchars($tool['link']) . '\',\'window_visio'.$_SESSION['_cid'].'\',config=\'height=\'+730+\', width=\'+1020+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="' . $tool['target'] . '">';
} elseif (strpos($tool['name'], 'chat') !== false && api_get_course_setting('allow_open_chat_window')) {
$toollink = '<a id="tooldesc_'.$tool["id"].'" ' . $class . ' href="javascript: void(0);" onclick="javascript: window.open(\'' . htmlspecialchars($tool['link']) . '\',\'window_chat'.$_SESSION['_cid'].'\',config=\'height=\'+380+\', width=\'+625+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="' . $tool['target'] . '">';
$my_tool_link= '<a id="istooldesc_'.$tool["id"].'" ' . $class . ' href="javascript: void(0);" onclick="javascript: window.open(\'' . htmlspecialchars($tool['link']) . '\',\'window_chat'.$_SESSION['_cid'].'\',config=\'height=\'+380+\', width=\'+625+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="' . $tool['target'] . '">';
$tool_link_params = array();
if (strpos($tool['name'],'visio_') !== false) {
$tool_link_params = array('id' => 'tooldesc_'.$tool["id"],
'href' => '"javascript: void(0);"',
'class' => $class,
'onclick' => 'javascript: window.open(\'' . htmlspecialchars($tool['link']) . '\',\'window_visio'.$_SESSION['_cid'].'\',config=\'height=\'+730+\', width=\'+1020+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')',
'target' => $tool['target']);
} elseif (strpos($tool['name'], 'chat') !== false && api_get_course_setting('allow_open_chat_window')) {
$tool_link_params = array('id' => 'tooldesc_'.$tool["id"],
'class' => $class,
'href' => 'javascript: void(0);',
'onclick' => 'javascript: window.open(\'' . htmlspecialchars($tool['link']) . '\',\'window_chat'.$_SESSION['_cid'].'\',config=\'height=\'+380+\', width=\'+625+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')',
'target' => $tool['target']);
} else {
if (count(explode('type=classroom',$tool['link'])) == 2 || count(explode('type=conference', $tool['link'])) == 2) {
$toollink = '<a id="tooldesc_'.$tool["id"].'" ' . $class . ' href="' . $tool['link'] . '" target="_blank">';
$my_tool_link = '<a id="istooldesc_'.$tool["id"].'" ' . $class . ' href="' . $tool['link'] . '" target="_blank">';
} else {
$toollink = '<a id="tooldesc_'.$tool["id"].'" ' . $class . ' href="' . htmlspecialchars($tool['link']) . '" target="' . $tool['target'] . '">';
$my_tool_link = '<a id="istooldesc_'.$tool["id"].'" ' . $class . ' href="' . htmlspecialchars($tool['link']) . '" target="' . $tool['target'] . '">';
if (count(explode('type=classroom',$tool['link'])) == 2 || count(explode('type=conference', $tool['link'])) == 2) {
$tool_link_params = array('id' => 'tooldesc_'.$tool["id"],
'href' => $tool['link'],
'class' => $class,
'target' => '_blank');
} else {
$tool_link_params = array('id' => 'tooldesc_'.$tool["id"],
'href' => htmlspecialchars($tool['link']),
'class' => $class,
'target' => $tool['target']);
}
}
$tool_name = self::translate_tool_name($tool);
@ -717,10 +731,14 @@ class CourseHome {
// Validacion when belongs to a session
$session_img = api_get_session_image($tool['session_id'], $_user['status']);
$item['url_params'] = $tool_link_params;
$item['icon'] = Display::url($icon, $tool_link_params['href'], $tool_link_params);
$item['tool'] = $tool;
$item['name'] = $tool_name;
$tool_link_params['id'] = 'is'.$tool_link_params['id'];
$item['link'] = Display::url($tool_name.$session_img, $tool_link_params['href'], $tool_link_params);
$item['icon'] = $toollink.$icon.'</a>';
$item['link'] = $my_tool_link.$tool_name.$session_img.'</a>';
$item['id'] = $tool['image'];
$items[] = $item;
@ -729,12 +747,12 @@ class CourseHome {
}
$i = 0;
//$theme = 'activity_big';
if (!empty($items))
foreach($items as $item) {
switch($theme) {
case 'activity_big':
$data = '';
if ($i == 0) {
echo '<table width="100%">';
}
@ -742,10 +760,11 @@ class CourseHome {
echo '<tr valign="top">';
}
echo '<td width="33%">';
echo $item['extra'];
echo $item['visibility'];
echo $item['icon'];
echo $item['link'];
$image = (substr($item['tool']['image'], 0, strpos($item['tool']['image'], '.'))).'.png';
$image = Display::return_icon($image, $item['name'], array('id'=>'toolimage_'.$item['tool']['id']), 64);
$data .= Display::url($image , $item['url_params']['href'], $item['url_params']);
$data .=Display::div($item['visibility'].$item['extra'].$item['link'], array('class'=>'content'));
echo Display::div($data, array('class'=>'big_icon'));
echo '</td>';
if ($i % 3 == 2) {

@ -821,7 +821,7 @@ VALUES
('accessibility_font_resize',NULL,'radio','Platform','false','EnableAccessibilityFontResizeTitle','EnableAccessibilityFontResizeComment',NULL,NULL, 1),
('hide_courses_in_sessions',NULL,'radio', 'Platform','false','HideCoursesInSessionsTitle', 'HideCoursesInSessionsComment','platform',NULL, 1),
('enable_quiz_scenario', NULL,'radio','Course','false','EnableQuizScenarioTitle','EnableQuizScenarioComment',NULL,NULL, 1),
('chamilo_database_version',NULL,'textfield',NULL, '1.8.8.14082','DokeosDatabaseVersion','', NULL, NULL, 0);
('chamilo_database_version',NULL,'textfield',NULL, '1.8.8.14269','DokeosDatabaseVersion','', NULL, NULL, 0);
UNLOCK TABLES;
/*!40000 ALTER TABLE settings_current ENABLE KEYS */;
@ -862,6 +862,7 @@ VALUES
('homepage_view','2column','HomepageView2column'),
('homepage_view','3column','HomepageView3column'),
('homepage_view','vertical_activity','HomepageViewVerticalActivity'),
('homepage_view','activity_big','HomepageViewActivityBig'),
('show_toolshortcuts','true','Yes'),
('show_toolshortcuts','false','No'),
('allow_group_categories','true','Yes'),

@ -183,7 +183,9 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('enable_qui
UPDATE settings_current SET category='Search' WHERE variable='search_enable';
UPDATE settings_current SET selected_value = '1.8.8.14082' WHERE variable = 'chamilo_database_version';
INSERT INTO settings_options (variable, value, display_text) VALUES ('homepage_view', 'activity_big', 'HomepageViewActivityBig');
UPDATE settings_current SET selected_value = '1.8.8.14269' WHERE variable = 'chamilo_database_version';
-- xxSTATSxx
ALTER TABLE track_e_exercices ADD COLUMN orig_lp_item_view_id INT NOT NULL DEFAULT 0;

Loading…
Cancel
Save