Просмотр исходного кода

[svn r14477] Enabled optional learning path -level CSS (see FS#576)

Julio Montoya 17 лет назад
Родитель
Сommit
d9c9153aa3
62 измененных файлов с 2113 добавлено и 555 удалено
  1. 19 3
      main/course_info/infocours.php
  2. BIN
      main/css/academica/images/bar_1.gif
  3. BIN
      main/css/academica/images/bar_1m.gif
  4. BIN
      main/css/academica/images/bar_1r.gif
  5. BIN
      main/css/academica/images/bar_1u.gif
  6. 82 0
      main/css/academica/learnpath.css
  7. 129 0
      main/css/academica/scorm.css
  8. 83 0
      main/css/academica/scormfs.css
  9. BIN
      main/css/baby/images/bar_1.gif
  10. BIN
      main/css/baby/images/bar_1m.gif
  11. BIN
      main/css/baby/images/bar_1r.gif
  12. BIN
      main/css/baby/images/bar_1u.gif
  13. 82 0
      main/css/baby/learnpath.css
  14. 129 0
      main/css/baby/scorm.css
  15. 83 0
      main/css/baby/scormfs.css
  16. BIN
      main/css/corporativa/images/bar_1.gif
  17. BIN
      main/css/corporativa/images/bar_1m.gif
  18. BIN
      main/css/corporativa/images/bar_1r.gif
  19. BIN
      main/css/corporativa/images/bar_1u.gif
  20. 82 0
      main/css/corporativa/learnpath.css
  21. 129 0
      main/css/corporativa/scorm.css
  22. 83 0
      main/css/corporativa/scormfs.css
  23. BIN
      main/css/default/images/bar_1.gif
  24. BIN
      main/css/default/images/bar_1m.gif
  25. BIN
      main/css/default/images/bar_1r.gif
  26. BIN
      main/css/default/images/bar_1u.gif
  27. 83 0
      main/css/default/scormfs.css
  28. BIN
      main/css/default_with_tabs/images/bar_1.gif
  29. BIN
      main/css/default_with_tabs/images/bar_1m.gif
  30. BIN
      main/css/default_with_tabs/images/bar_1r.gif
  31. BIN
      main/css/default_with_tabs/images/bar_1u.gif
  32. 83 0
      main/css/default_with_tabs/scormfs.css
  33. BIN
      main/css/dokeosgrey/images/bar_1.gif
  34. BIN
      main/css/dokeosgrey/images/bar_1m.gif
  35. BIN
      main/css/dokeosgrey/images/bar_1r.gif
  36. BIN
      main/css/dokeosgrey/images/bar_1u.gif
  37. 82 0
      main/css/dokeosgrey/learnpath.css
  38. 129 0
      main/css/dokeosgrey/scorm.css
  39. 83 0
      main/css/dokeosgrey/scormfs.css
  40. 40 9
      main/inc/header.inc.php
  41. 1 0
      main/inc/lib/add_course.lib.inc.php
  42. 1 1
      main/inc/lib/display.lib.php
  43. 88 3
      main/inc/reduced_header.inc.php
  44. 18 0
      main/newscorm/aicc.class.php
  45. 59 10
      main/newscorm/learnpath.class.php
  46. 409 411
      main/newscorm/lp_add_item.php
  47. 3 10
      main/newscorm/lp_admin_view.php
  48. 5 10
      main/newscorm/lp_build.php
  49. 2 1
      main/newscorm/lp_controller.php
  50. 15 1
      main/newscorm/lp_edit.php
  51. 3 5
      main/newscorm/lp_edit_item.php
  52. 4 10
      main/newscorm/lp_edit_item_prereq.php
  53. 2 0
      main/newscorm/lp_header.php
  54. 21 0
      main/newscorm/lp_list.php
  55. 4 6
      main/newscorm/lp_log.php
  56. 3 14
      main/newscorm/lp_message.php
  57. 4 6
      main/newscorm/lp_move_item.php
  58. 27 24
      main/newscorm/lp_nav.php
  59. 3 6
      main/newscorm/lp_toc.php
  60. 17 20
      main/newscorm/lp_view.php
  61. 4 5
      main/newscorm/lp_view_item.php
  62. 19 0
      main/newscorm/scorm.class.php

+ 19 - 3
main/course_info/infocours.php

@@ -1,5 +1,5 @@
 <?php
-// $Id: infocours.php 14425 2008-02-28 22:33:09Z yannoo $
+// $Id: infocours.php 14477 2008-03-03 21:42:03Z juliomontoya $
 /*
 ==============================================================================
 	Dokeos - elearning and course management software
@@ -201,9 +201,17 @@ $form->addElement('radio', 'allow_user_image_forum', get_lang('AllowUserImageFor
 $form->addElement('radio', 'allow_user_image_forum', null, get_lang('AllowUserImageForumDeactivate'), 0);
 $form -> addElement('html',$linebreak);
 
+
+
 // Course theme picker
 if (api_get_setting('allow_course_theme') == 'true')
-{
+{	
+	//Allow Learning path 
+	$form->addElement('radio', 'allow_learning_path_theme', get_lang('AllowLearningPathTheme'), get_lang('AllowLearningPathThemeActivate'), 1);
+	$form->addElement('radio', 'allow_learning_path_theme', null, get_lang('AllowLearningPathThemeDectivate'), 0);
+	$form -> addElement('html',$linebreak);
+	
+	
 	$form->addElement('select_theme', 'course_theme', get_lang('Theme'));
 	$form->applyFilter('course_theme', 'trim');
 	$form -> addElement('html',$linebreak);
@@ -255,6 +263,9 @@ $values['allow_user_edit_announcement'] = api_get_course_setting('allow_user_edi
 $values['allow_user_image_forum'] = api_get_course_setting('allow_user_image_forum');
 // get course_theme from table
 $values['course_theme'] = api_get_course_setting('course_theme');
+// get allow_learning_path_theme from table
+$values['allow_learning_path_theme'] = api_get_course_setting('allow_learning_path_theme');
+
 
 $form->setDefaults($values);
 // Validate form
@@ -309,7 +320,12 @@ if ($form->validate() && is_settings_editable())
 	if($update_values['course_theme'] != $values['course_theme']){
 		$sql = "UPDATE $table_course_setting SET value = '".$update_values['course_theme']."' WHERE variable = 'course_theme' ";
 		api_sql_query($sql,__FILE__,__LINE__); 
-	}	
+	}
+	if($update_values['allow_learningpath_theme'] != $values['allow_learning_path_theme']){
+		$sql = "UPDATE $table_course_setting SET value = ".(int)$update_values['allow_learning_path_theme']." WHERE variable = 'allow_learning_path_theme' ";
+		api_sql_query($sql,__FILE__,__LINE__);
+	}
+	
 
 	$cidReset = true;
 	$cidReq = $course_code;

BIN
main/css/academica/images/bar_1.gif


BIN
main/css/academica/images/bar_1m.gif


BIN
main/css/academica/images/bar_1r.gif


BIN
main/css/academica/images/bar_1u.gif


+ 82 - 0
main/css/academica/learnpath.css

@@ -0,0 +1,82 @@
+div.lp_actions{background:#F8F8F8; border-bottom:1px solid #999999; padding:3px;}
+
+div.lp_actions img{margin-right:5px;}
+
+
+div.lp_small_form{background:#F8F8F8; border:1px solid #999999; padding:10px;}
+
+div.lp_small_form input{font-size:10px;}
+
+
+div.lp_manipulate{background:#F8F8F8; border-bottom:1px dotted #999999; margin-bottom:0px; padding:3px 0 3px 10px;}
+
+div.lp_manipulate a{padding-right:10px;}
+
+
+div.lp_message{background:#FEC880; border:1px solid #E28C15; font-size:12px; padding:10px;}
+
+
+div.lp_resource_header{background:#F0F0F0; border:1px solid #999999; border-bottom:0; font-weight:bold; padding:10px; width:350px;}
+div.lp_resource_header_end{background:#F0F0F0; border:1px solid #999999; font-weight:bold; padding:10px; width:350px;}
+div.lp_resource_elements{background:#FAFAFA; border:1px solid #999999; border-bottom:0; display:none; padding:5px 10px; width:350px;}
+div.lp_resource_elements_end{background:#FAFAFA; border:1px solid #999999; border-top: 0px; display:none; padding:5px 10px; width:350px;}
+div.lp_resource_elements div{padding:3px;}
+
+div.lp_tree{height:400px; padding:3px 10px 3px 0; overflow-x : auto; overflow-y : scroll; width:230px;}
+
+
+hr{background:#999999; border:0; color:#999999; height:1px; margin:10px auto; width:75%;}
+
+
+option.bottom{border-top:1px solid #999999; margin-top:2px; padding-top:2px;}
+option.top{border-bottom:1px solid #999999; margin-bottom:2px; padding-bottom:2px;}
+
+p.lp_action{margin:5px 0;}
+p.lp_text{margin-top:0px;}
+p.lp_title{font-weight:bold; margin-top:0px;}
+
+
+table.lp_build{font-size:12px; height:400px; width:100%;}
+
+table.lp_build td{vertical-align:top;}
+table.lp_build td.tree{border-right:1px solid #999999; width:240px;}
+table.lp_build td.workspace{padding:0; width:auto;}
+
+
+table.lp_form{font-size:12px; margin:0 10px; width:100%;}
+
+table.lp_form td{height:25px; padding:5px; vertical-align:top; width:auto;}
+table.lp_form td.label{padding-top:7px; text-align:right; width:75px;}
+table.lp_form td.radio{width:300px;}
+table.lp_form td.exercise{width:50px;}
+
+table.lp_form th{background:#F8F8F8; border-bottom:1px solid #999999; border-top:1px solid #999999;}
+table.lp_overview th.exercise{width:50px;}
+
+table.lp_form input,
+	table.lp_form select,
+	table.lp_form textarea{background:#F8F8F8; border:1px solid #999999; font-family:Arial, Verdana, Helvetica, sans-serif; font-size:12px; padding:1px 2px; width:300px;}
+
+table.lp_form td.radio input,
+	table.lp_form td.exercise input{width:auto;}	
+	
+table.lp_form .small_form{background:#FFFFFF;}	
+	
+table.lp_form select{padding:0;}
+
+table.lp_form input.button{width:75px;}
+
+
+table.lp_overview{font-size:12px; width:100%;}
+
+table.lp_overview td{border-bottom:1px solid #999999; border-top:1px solid #999999; height:20px; padding:3px; vertical-align:middle; width:auto;}
+table.lp_overview td.title{width:200px;}
+table.lp_overview td.actions{text-align:center; width:100px;}
+table.lp_overview td.move{text-align:center; width:50px;}
+
+table.lp_overview th{background:#FFFFFF; padding-left:3px; text-align:center;}
+
+table.lp_overview tr{background:#F8F8F8;}
+table.lp_overview tr:hover{background:#E5EDF9;}
+
+table.lp_overview img{margin-left:3px;}

+ 129 - 0
main/css/academica/scorm.css

@@ -0,0 +1,129 @@
+.scormpage{
+height: 100%;
+}
+.scormpage .menu{
+width: 180px;
+float: left;
+margin: 1px;
+padding: 0px;
+margin-top: 0px;
+padding-top: 0px;
+font-size: small;
+}
+.lp_toc{
+background-color: white;
+height: 380px;
+width: 99%;
+border-right: 1px none;
+}
+.inner_lp_toc{
+overflow: auto;
+background-color: white;
+height: 325px;
+width: 99%;
+border-right: 1px #999999 solid;
+}
+.inner_lp_toc .scorm_item{
+font-size: 11px;
+margin-left: 10px;
+margin-right:10px;
+padding-bottom: 2px;
+text-decoration: none;
+}
+
+	.inner_lp_toc .scorm_item A{
+		font-weight: normal;
+	}
+	
+		.inner_lp_toc .scorm_item A.chapter_module{
+			font-weight: normal;
+		}
+
+.inner_lp_toc .scorm_item_highlight{
+font-size: 11px;
+margin-left: 10px;
+margin-right: 10px;
+padding-bottom: 2px;
+text-decoration: none;
+background:#F8F8F8; border:1px dashed #999999;
+}
+
+	.inner_lp_toc .scorm_item_highlight A{
+		font-weight: normal;
+	}
+	
+.inner_lp_toc .scorm_item_highlight .highlight{
+	font-weight: normal;
+	background:#F3F3F3; border:1px dashed #949494;
+	margin-right: 1px;
+}
+
+.inner_lp_toc .scorm_status_img{
+margin:0px;
+margin-left: -10px;
+width:10px;
+}
+
+
+.lp_navigation{
+overflow: auto;
+background-color: white;
+height: 44px;
+width:180px;
+padding-top: 4px;
+padding-bottom:0px;
+border: none;
+margin-top: -18px;
+border-top: 1px dotted black;
+border-bottom: 1px dotted black;
+}
+
+.lp_navigation_elem{
+	padding-left: 40px;
+	padding-top: 0px;
+}
+/*.scormpage .menu */
+.lp_navigation_elem .progresstext{
+	margin-top: -12px;
+	margin-left: 4em;
+	font-size: smaller;
+}
+
+/*.scormpage .menu */
+.lp_navigation_elem .buttons{
+margin-left: 5px;
+margin-right: 0em;
+margin-top: 0.4em;
+}
+
+.scormpage .menu .notification{
+background-color: white;
+height: 50px;
+}
+.scormpage .menu .notification .message{
+background-color: white;
+height: 50px;
+width: 180px;
+border: none;
+}
+
+.scormpage .content{
+/*float: left;
+width: 60%;*/
+margin-top: 0px;
+padding-top: 0px;
+padding-left: 180px;
+background-color: white;
+}
+.iframe{
+border: 0px solid black;
+height: 580px;
+width: 95%;
+margin: 0px;
+padding-right: 0px;
+overflow: auto;
+vertical-align: top;
+}
+.scormpage .footer{
+clear: both;
+}

+ 83 - 0
main/css/academica/scormfs.css

@@ -0,0 +1,83 @@
+.scormpage{
+}
+.scormpage .menu{
+	width: 180px;
+	padding: 0px;
+	font-size: small;
+	position: absolute;
+	background-color: white;
+/*
+	filter:alpha(opacity=50);
+	opacity: 0.50;
+	-moz-border-radius: 25px;
+	margin-right: 5%;
+	margin-left: 75%;
+	margin-top: 10px;
+*/
+}
+.scormpage .menu .lp_nav{
+	height: 50px;
+	width: 160px;
+	padding-top: 4px;
+	padding-bottom:0px;
+/*	
+	margin-left: 10px;
+	margin-right: 10px;
+*/
+	margin-top: 0px;
+}
+.lp_navigation_elem{
+	padding-top: 2px;
+	position: absolute;
+	left: 50%;
+	margin-left: -70px;
+}
+.lp_navigation_elem .progresstext{
+	margin-top: -12px;
+	margin-left: 4em;
+	font-size: smaller;
+}
+.lp_navigation_elem .buttons{
+	margin-left: 1em;
+	margin-right: 0em;
+	margin-top: 0.4em;
+}
+#msg_div_id{
+	padding-left: 10px;
+	padding-top: 4px;
+}
+.scormpage .menu .notification{
+	height: 50px;
+	margin-left: 15px;
+	margin-right: 15px;
+}
+.scormpage .menu .notification .message{
+	height: 50px;
+	width: 140px;
+	border: none;
+}
+.scormpage .menu .notification .lp_log{
+	height: 100px;
+	width: 180px;
+	border: none;
+	overflow: auto;
+}
+.scormpage .content .iframe{
+	/*
+	border: none;
+	height: 700px;
+	margin: 0px;
+	padding-right: 0px;
+	margin-right: 0%;
+	margin-left: 0%;
+	*/
+	/* trying the absolute mode */
+	position: fixed;
+	bottom:0;
+	left:0;
+	width: 100%;
+	height: 100%;
+}
+.scormpage .footer{
+	clear: both;
+}

BIN
main/css/baby/images/bar_1.gif


BIN
main/css/baby/images/bar_1m.gif


BIN
main/css/baby/images/bar_1r.gif


BIN
main/css/baby/images/bar_1u.gif


+ 82 - 0
main/css/baby/learnpath.css

@@ -0,0 +1,82 @@
+div.lp_actions{background:#F8F8F8; border-bottom:1px solid #999999; padding:3px;}
+
+div.lp_actions img{margin-right:5px;}
+
+
+div.lp_small_form{background:#F8F8F8; border:1px solid #999999; padding:10px;}
+
+div.lp_small_form input{font-size:10px;}
+
+
+div.lp_manipulate{background:#F8F8F8; border-bottom:1px dotted #999999; margin-bottom:0px; padding:3px 0 3px 10px;}
+
+div.lp_manipulate a{padding-right:10px;}
+
+
+div.lp_message{background:#FEC880; border:1px solid #E28C15; font-size:12px; padding:10px;}
+
+
+div.lp_resource_header{background:#F0F0F0; border:1px solid #999999; border-bottom:0; font-weight:bold; padding:10px; width:350px;}
+div.lp_resource_header_end{background:#F0F0F0; border:1px solid #999999; font-weight:bold; padding:10px; width:350px;}
+div.lp_resource_elements{background:#FAFAFA; border:1px solid #999999; border-bottom:0; display:none; padding:5px 10px; width:350px;}
+div.lp_resource_elements_end{background:#FAFAFA; border:1px solid #999999; border-top: 0px; display:none; padding:5px 10px; width:350px;}
+div.lp_resource_elements div{padding:3px;}
+
+div.lp_tree{height:400px; padding:3px 10px 3px 0; overflow-x : auto; overflow-y : scroll; width:230px;}
+
+
+hr{background:#999999; border:0; color:#999999; height:1px; margin:10px auto; width:75%;}
+
+
+option.bottom{border-top:1px solid #999999; margin-top:2px; padding-top:2px;}
+option.top{border-bottom:1px solid #999999; margin-bottom:2px; padding-bottom:2px;}
+
+p.lp_action{margin:5px 0;}
+p.lp_text{margin-top:0px;}
+p.lp_title{font-weight:bold; margin-top:0px;}
+
+
+table.lp_build{font-size:12px; height:400px; width:100%;}
+
+table.lp_build td{vertical-align:top;}
+table.lp_build td.tree{border-right:1px solid #999999; width:240px;}
+table.lp_build td.workspace{padding:0; width:auto;}
+
+
+table.lp_form{font-size:12px; margin:0 10px; width:100%;}
+
+table.lp_form td{height:25px; padding:5px; vertical-align:top; width:auto;}
+table.lp_form td.label{padding-top:7px; text-align:right; width:75px;}
+table.lp_form td.radio{width:300px;}
+table.lp_form td.exercise{width:50px;}
+
+table.lp_form th{background:#F8F8F8; border-bottom:1px solid #999999; border-top:1px solid #999999;}
+table.lp_overview th.exercise{width:50px;}
+
+table.lp_form input,
+	table.lp_form select,
+	table.lp_form textarea{background:#F8F8F8; border:1px solid #999999; font-family:Arial, Verdana, Helvetica, sans-serif; font-size:12px; padding:1px 2px; width:300px;}
+
+table.lp_form td.radio input,
+	table.lp_form td.exercise input{width:auto;}	
+	
+table.lp_form .small_form{background:#FFFFFF;}	
+	
+table.lp_form select{padding:0;}
+
+table.lp_form input.button{width:75px;}
+
+
+table.lp_overview{font-size:12px; width:100%;}
+
+table.lp_overview td{border-bottom:1px solid #999999; border-top:1px solid #999999; height:20px; padding:3px; vertical-align:middle; width:auto;}
+table.lp_overview td.title{width:200px;}
+table.lp_overview td.actions{text-align:center; width:100px;}
+table.lp_overview td.move{text-align:center; width:50px;}
+
+table.lp_overview th{background:#FFFFFF; padding-left:3px; text-align:center;}
+
+table.lp_overview tr{background:#F8F8F8;}
+table.lp_overview tr:hover{background:#E5EDF9;}
+
+table.lp_overview img{margin-left:3px;}

+ 129 - 0
main/css/baby/scorm.css

@@ -0,0 +1,129 @@
+.scormpage{
+height: 100%;
+}
+.scormpage .menu{
+width: 180px;
+float: left;
+margin: 1px;
+padding: 0px;
+margin-top: 0px;
+padding-top: 0px;
+font-size: small;
+}
+.lp_toc{
+background-color: white;
+height: 380px;
+width: 99%;
+border-right: 1px none;
+}
+.inner_lp_toc{
+overflow: auto;
+background-color: white;
+height: 325px;
+width: 99%;
+border-right: 1px #999999 solid;
+}
+.inner_lp_toc .scorm_item{
+font-size: 11px;
+margin-left: 10px;
+margin-right:10px;
+padding-bottom: 2px;
+text-decoration: none;
+}
+
+	.inner_lp_toc .scorm_item A{
+		font-weight: normal;
+	}
+	
+		.inner_lp_toc .scorm_item A.chapter_module{
+			font-weight: normal;
+		}
+
+.inner_lp_toc .scorm_item_highlight{
+font-size: 11px;
+margin-left: 10px;
+margin-right: 10px;
+padding-bottom: 2px;
+text-decoration: none;
+background:#F8F8F8; border:1px dashed #999999;
+}
+
+	.inner_lp_toc .scorm_item_highlight A{
+		font-weight: normal;
+	}
+	
+.inner_lp_toc .scorm_item_highlight .highlight{
+	font-weight: normal;
+	background:#F3F3F3; border:1px dashed #949494;
+	margin-right: 1px;
+}
+
+.inner_lp_toc .scorm_status_img{
+margin:0px;
+margin-left: -10px;
+width:10px;
+}
+
+
+.lp_navigation{
+overflow: auto;
+background-color: white;
+height: 44px;
+width:180px;
+padding-top: 4px;
+padding-bottom:0px;
+border: none;
+margin-top: -18px;
+border-top: 1px dotted black;
+border-bottom: 1px dotted black;
+}
+
+.lp_navigation_elem{
+	padding-left: 40px;
+	padding-top: 0px;
+}
+/*.scormpage .menu */
+.lp_navigation_elem .progresstext{
+	margin-top: -12px;
+	margin-left: 4em;
+	font-size: smaller;
+}
+
+/*.scormpage .menu */
+.lp_navigation_elem .buttons{
+margin-left: 5px;
+margin-right: 0em;
+margin-top: 0.4em;
+}
+
+.scormpage .menu .notification{
+background-color: white;
+height: 50px;
+}
+.scormpage .menu .notification .message{
+background-color: white;
+height: 50px;
+width: 180px;
+border: none;
+}
+
+.scormpage .content{
+/*float: left;
+width: 60%;*/
+margin-top: 0px;
+padding-top: 0px;
+padding-left: 180px;
+background-color: white;
+}
+.iframe{
+border: 0px solid black;
+height: 580px;
+width: 95%;
+margin: 0px;
+padding-right: 0px;
+overflow: auto;
+vertical-align: top;
+}
+.scormpage .footer{
+clear: both;
+}

+ 83 - 0
main/css/baby/scormfs.css

@@ -0,0 +1,83 @@
+.scormpage{
+}
+.scormpage .menu{
+	width: 180px;
+	padding: 0px;
+	font-size: small;
+	position: absolute;
+	background-color: white;
+/*
+	filter:alpha(opacity=50);
+	opacity: 0.50;
+	-moz-border-radius: 25px;
+	margin-right: 5%;
+	margin-left: 75%;
+	margin-top: 10px;
+*/
+}
+.scormpage .menu .lp_nav{
+	height: 50px;
+	width: 160px;
+	padding-top: 4px;
+	padding-bottom:0px;
+/*	
+	margin-left: 10px;
+	margin-right: 10px;
+*/
+	margin-top: 0px;
+}
+.lp_navigation_elem{
+	padding-top: 2px;
+	position: absolute;
+	left: 50%;
+	margin-left: -70px;
+}
+.lp_navigation_elem .progresstext{
+	margin-top: -12px;
+	margin-left: 4em;
+	font-size: smaller;
+}
+.lp_navigation_elem .buttons{
+	margin-left: 1em;
+	margin-right: 0em;
+	margin-top: 0.4em;
+}
+#msg_div_id{
+	padding-left: 10px;
+	padding-top: 4px;
+}
+.scormpage .menu .notification{
+	height: 50px;
+	margin-left: 15px;
+	margin-right: 15px;
+}
+.scormpage .menu .notification .message{
+	height: 50px;
+	width: 140px;
+	border: none;
+}
+.scormpage .menu .notification .lp_log{
+	height: 100px;
+	width: 180px;
+	border: none;
+	overflow: auto;
+}
+.scormpage .content .iframe{
+	/*
+	border: none;
+	height: 700px;
+	margin: 0px;
+	padding-right: 0px;
+	margin-right: 0%;
+	margin-left: 0%;
+	*/
+	/* trying the absolute mode */
+	position: fixed;
+	bottom:0;
+	left:0;
+	width: 100%;
+	height: 100%;
+}
+.scormpage .footer{
+	clear: both;
+}

BIN
main/css/corporativa/images/bar_1.gif


BIN
main/css/corporativa/images/bar_1m.gif


BIN
main/css/corporativa/images/bar_1r.gif


BIN
main/css/corporativa/images/bar_1u.gif


+ 82 - 0
main/css/corporativa/learnpath.css

@@ -0,0 +1,82 @@
+div.lp_actions{background:#F8F8F8; border-bottom:1px solid #999999; padding:3px;}
+
+div.lp_actions img{margin-right:5px;}
+
+
+div.lp_small_form{background:#F8F8F8; border:1px solid #999999; padding:10px;}
+
+div.lp_small_form input{font-size:10px;}
+
+
+div.lp_manipulate{background:#F8F8F8; border-bottom:1px dotted #999999; margin-bottom:0px; padding:3px 0 3px 10px;}
+
+div.lp_manipulate a{padding-right:10px;}
+
+
+div.lp_message{background:#FEC880; border:1px solid #E28C15; font-size:12px; padding:10px;}
+
+
+div.lp_resource_header{background:#F0F0F0; border:1px solid #999999; border-bottom:0; font-weight:bold; padding:10px; width:350px;}
+div.lp_resource_header_end{background:#F0F0F0; border:1px solid #999999; font-weight:bold; padding:10px; width:350px;}
+div.lp_resource_elements{background:#FAFAFA; border:1px solid #999999; border-bottom:0; display:none; padding:5px 10px; width:350px;}
+div.lp_resource_elements_end{background:#FAFAFA; border:1px solid #999999; border-top: 0px; display:none; padding:5px 10px; width:350px;}
+div.lp_resource_elements div{padding:3px;}
+
+div.lp_tree{height:400px; padding:3px 10px 3px 0; overflow-x : auto; overflow-y : scroll; width:230px;}
+
+
+hr{background:#999999; border:0; color:#999999; height:1px; margin:10px auto; width:75%;}
+
+
+option.bottom{border-top:1px solid #999999; margin-top:2px; padding-top:2px;}
+option.top{border-bottom:1px solid #999999; margin-bottom:2px; padding-bottom:2px;}
+
+p.lp_action{margin:5px 0;}
+p.lp_text{margin-top:0px;}
+p.lp_title{font-weight:bold; margin-top:0px;}
+
+
+table.lp_build{font-size:12px; height:400px; width:100%;}
+
+table.lp_build td{vertical-align:top;}
+table.lp_build td.tree{border-right:1px solid #999999; width:240px;}
+table.lp_build td.workspace{padding:0; width:auto;}
+
+
+table.lp_form{font-size:12px; margin:0 10px; width:100%;}
+
+table.lp_form td{height:25px; padding:5px; vertical-align:top; width:auto;}
+table.lp_form td.label{padding-top:7px; text-align:right; width:75px;}
+table.lp_form td.radio{width:300px;}
+table.lp_form td.exercise{width:50px;}
+
+table.lp_form th{background:#F8F8F8; border-bottom:1px solid #999999; border-top:1px solid #999999;}
+table.lp_overview th.exercise{width:50px;}
+
+table.lp_form input,
+	table.lp_form select,
+	table.lp_form textarea{background:#F8F8F8; border:1px solid #999999; font-family:Arial, Verdana, Helvetica, sans-serif; font-size:12px; padding:1px 2px; width:300px;}
+
+table.lp_form td.radio input,
+	table.lp_form td.exercise input{width:auto;}	
+	
+table.lp_form .small_form{background:#FFFFFF;}	
+	
+table.lp_form select{padding:0;}
+
+table.lp_form input.button{width:75px;}
+
+
+table.lp_overview{font-size:12px; width:100%;}
+
+table.lp_overview td{border-bottom:1px solid #999999; border-top:1px solid #999999; height:20px; padding:3px; vertical-align:middle; width:auto;}
+table.lp_overview td.title{width:200px;}
+table.lp_overview td.actions{text-align:center; width:100px;}
+table.lp_overview td.move{text-align:center; width:50px;}
+
+table.lp_overview th{background:#FFFFFF; padding-left:3px; text-align:center;}
+
+table.lp_overview tr{background:#F8F8F8;}
+table.lp_overview tr:hover{background:#E5EDF9;}
+
+table.lp_overview img{margin-left:3px;}

+ 129 - 0
main/css/corporativa/scorm.css

@@ -0,0 +1,129 @@
+.scormpage{
+height: 100%;
+}
+.scormpage .menu{
+width: 180px;
+float: left;
+margin: 1px;
+padding: 0px;
+margin-top: 0px;
+padding-top: 0px;
+font-size: small;
+}
+.lp_toc{
+background-color: white;
+height: 380px;
+width: 99%;
+border-right: 1px none;
+}
+.inner_lp_toc{
+overflow: auto;
+background-color: white;
+height: 325px;
+width: 99%;
+border-right: 1px #999999 solid;
+}
+.inner_lp_toc .scorm_item{
+font-size: 11px;
+margin-left: 10px;
+margin-right:10px;
+padding-bottom: 2px;
+text-decoration: none;
+}
+
+	.inner_lp_toc .scorm_item A{
+		font-weight: normal;
+	}
+	
+		.inner_lp_toc .scorm_item A.chapter_module{
+			font-weight: normal;
+		}
+
+.inner_lp_toc .scorm_item_highlight{
+font-size: 11px;
+margin-left: 10px;
+margin-right: 10px;
+padding-bottom: 2px;
+text-decoration: none;
+background:#F8F8F8; border:1px dashed #999999;
+}
+
+	.inner_lp_toc .scorm_item_highlight A{
+		font-weight: normal;
+	}
+	
+.inner_lp_toc .scorm_item_highlight .highlight{
+	font-weight: normal;
+	background:#F3F3F3; border:1px dashed #949494;
+	margin-right: 1px;
+}
+
+.inner_lp_toc .scorm_status_img{
+margin:0px;
+margin-left: -10px;
+width:10px;
+}
+
+
+.lp_navigation{
+overflow: auto;
+background-color: white;
+height: 44px;
+width:180px;
+padding-top: 4px;
+padding-bottom:0px;
+border: none;
+margin-top: -18px;
+border-top: 1px dotted black;
+border-bottom: 1px dotted black;
+}
+
+.lp_navigation_elem{
+	padding-left: 40px;
+	padding-top: 0px;
+}
+/*.scormpage .menu */
+.lp_navigation_elem .progresstext{
+	margin-top: -12px;
+	margin-left: 4em;
+	font-size: smaller;
+}
+
+/*.scormpage .menu */
+.lp_navigation_elem .buttons{
+margin-left: 5px;
+margin-right: 0em;
+margin-top: 0.4em;
+}
+
+.scormpage .menu .notification{
+background-color: white;
+height: 50px;
+}
+.scormpage .menu .notification .message{
+background-color: white;
+height: 50px;
+width: 180px;
+border: none;
+}
+
+.scormpage .content{
+/*float: left;
+width: 60%;*/
+margin-top: 0px;
+padding-top: 0px;
+padding-left: 180px;
+background-color: white;
+}
+.iframe{
+border: 0px solid black;
+height: 580px;
+width: 95%;
+margin: 0px;
+padding-right: 0px;
+overflow: auto;
+vertical-align: top;
+}
+.scormpage .footer{
+clear: both;
+}

+ 83 - 0
main/css/corporativa/scormfs.css

@@ -0,0 +1,83 @@
+.scormpage{
+}
+.scormpage .menu{
+	width: 180px;
+	padding: 0px;
+	font-size: small;
+	position: absolute;
+	background-color: white;
+/*
+	filter:alpha(opacity=50);
+	opacity: 0.50;
+	-moz-border-radius: 25px;
+	margin-right: 5%;
+	margin-left: 75%;
+	margin-top: 10px;
+*/
+}
+.scormpage .menu .lp_nav{
+	height: 50px;
+	width: 160px;
+	padding-top: 4px;
+	padding-bottom:0px;
+/*	
+	margin-left: 10px;
+	margin-right: 10px;
+*/
+	margin-top: 0px;
+}
+.lp_navigation_elem{
+	padding-top: 2px;
+	position: absolute;
+	left: 50%;
+	margin-left: -70px;
+}
+.lp_navigation_elem .progresstext{
+	margin-top: -12px;
+	margin-left: 4em;
+	font-size: smaller;
+}
+.lp_navigation_elem .buttons{
+	margin-left: 1em;
+	margin-right: 0em;
+	margin-top: 0.4em;
+}
+#msg_div_id{
+	padding-left: 10px;
+	padding-top: 4px;
+}
+.scormpage .menu .notification{
+	height: 50px;
+	margin-left: 15px;
+	margin-right: 15px;
+}
+.scormpage .menu .notification .message{
+	height: 50px;
+	width: 140px;
+	border: none;
+}
+.scormpage .menu .notification .lp_log{
+	height: 100px;
+	width: 180px;
+	border: none;
+	overflow: auto;
+}
+.scormpage .content .iframe{
+	/*
+	border: none;
+	height: 700px;
+	margin: 0px;
+	padding-right: 0px;
+	margin-right: 0%;
+	margin-left: 0%;
+	*/
+	/* trying the absolute mode */
+	position: fixed;
+	bottom:0;
+	left:0;
+	width: 100%;
+	height: 100%;
+}
+.scormpage .footer{
+	clear: both;
+}

BIN
main/css/default/images/bar_1.gif


BIN
main/css/default/images/bar_1m.gif


BIN
main/css/default/images/bar_1r.gif


BIN
main/css/default/images/bar_1u.gif


+ 83 - 0
main/css/default/scormfs.css

@@ -0,0 +1,83 @@
+.scormpage{
+}
+.scormpage .menu{
+	width: 180px;
+	padding: 0px;
+	font-size: small;
+	position: absolute;
+	background-color: white;
+/*
+	filter:alpha(opacity=50);
+	opacity: 0.50;
+	-moz-border-radius: 25px;
+	margin-right: 5%;
+	margin-left: 75%;
+	margin-top: 10px;
+*/
+}
+.scormpage .menu .lp_nav{
+	height: 50px;
+	width: 160px;
+	padding-top: 4px;
+	padding-bottom:0px;
+/*	
+	margin-left: 10px;
+	margin-right: 10px;
+*/
+	margin-top: 0px;
+}
+.lp_navigation_elem{
+	padding-top: 2px;
+	position: absolute;
+	left: 50%;
+	margin-left: -70px;
+}
+.lp_navigation_elem .progresstext{
+	margin-top: -12px;
+	margin-left: 4em;
+	font-size: smaller;
+}
+.lp_navigation_elem .buttons{
+	margin-left: 1em;
+	margin-right: 0em;
+	margin-top: 0.4em;
+}
+#msg_div_id{
+	padding-left: 10px;
+	padding-top: 4px;
+}
+.scormpage .menu .notification{
+	height: 50px;
+	margin-left: 15px;
+	margin-right: 15px;
+}
+.scormpage .menu .notification .message{
+	height: 50px;
+	width: 140px;
+	border: none;
+}
+.scormpage .menu .notification .lp_log{
+	height: 100px;
+	width: 180px;
+	border: none;
+	overflow: auto;
+}
+.scormpage .content .iframe{
+	/*
+	border: none;
+	height: 700px;
+	margin: 0px;
+	padding-right: 0px;
+	margin-right: 0%;
+	margin-left: 0%;
+	*/
+	/* trying the absolute mode */
+	position: fixed;
+	bottom:0;
+	left:0;
+	width: 100%;
+	height: 100%;
+}
+.scormpage .footer{
+	clear: both;
+}

BIN
main/css/default_with_tabs/images/bar_1.gif


BIN
main/css/default_with_tabs/images/bar_1m.gif


BIN
main/css/default_with_tabs/images/bar_1r.gif


BIN
main/css/default_with_tabs/images/bar_1u.gif


+ 83 - 0
main/css/default_with_tabs/scormfs.css

@@ -0,0 +1,83 @@
+.scormpage{
+}
+.scormpage .menu{
+	width: 180px;
+	padding: 0px;
+	font-size: small;
+	position: absolute;
+	background-color: white;
+/*
+	filter:alpha(opacity=50);
+	opacity: 0.50;
+	-moz-border-radius: 25px;
+	margin-right: 5%;
+	margin-left: 75%;
+	margin-top: 10px;
+*/
+}
+.scormpage .menu .lp_nav{
+	height: 50px;
+	width: 160px;
+	padding-top: 4px;
+	padding-bottom:0px;
+/*	
+	margin-left: 10px;
+	margin-right: 10px;
+*/
+	margin-top: 0px;
+}
+.lp_navigation_elem{
+	padding-top: 2px;
+	position: absolute;
+	left: 50%;
+	margin-left: -70px;
+}
+.lp_navigation_elem .progresstext{
+	margin-top: -12px;
+	margin-left: 4em;
+	font-size: smaller;
+}
+.lp_navigation_elem .buttons{
+	margin-left: 1em;
+	margin-right: 0em;
+	margin-top: 0.4em;
+}
+#msg_div_id{
+	padding-left: 10px;
+	padding-top: 4px;
+}
+.scormpage .menu .notification{
+	height: 50px;
+	margin-left: 15px;
+	margin-right: 15px;
+}
+.scormpage .menu .notification .message{
+	height: 50px;
+	width: 140px;
+	border: none;
+}
+.scormpage .menu .notification .lp_log{
+	height: 100px;
+	width: 180px;
+	border: none;
+	overflow: auto;
+}
+.scormpage .content .iframe{
+	/*
+	border: none;
+	height: 700px;
+	margin: 0px;
+	padding-right: 0px;
+	margin-right: 0%;
+	margin-left: 0%;
+	*/
+	/* trying the absolute mode */
+	position: fixed;
+	bottom:0;
+	left:0;
+	width: 100%;
+	height: 100%;
+}
+.scormpage .footer{
+	clear: both;
+}

BIN
main/css/dokeosgrey/images/bar_1.gif


BIN
main/css/dokeosgrey/images/bar_1m.gif


BIN
main/css/dokeosgrey/images/bar_1r.gif


BIN
main/css/dokeosgrey/images/bar_1u.gif


+ 82 - 0
main/css/dokeosgrey/learnpath.css

@@ -0,0 +1,82 @@
+div.lp_actions{background:#F8F8F8; border-bottom:1px solid #999999; padding:3px;}
+
+div.lp_actions img{margin-right:5px;}
+
+
+div.lp_small_form{background:#F8F8F8; border:1px solid #999999; padding:10px;}
+
+div.lp_small_form input{font-size:10px;}
+
+
+div.lp_manipulate{background:#F8F8F8; border-bottom:1px dotted #999999; margin-bottom:0px; padding:3px 0 3px 10px;}
+
+div.lp_manipulate a{padding-right:10px;}
+
+
+div.lp_message{background:#FEC880; border:1px solid #E28C15; font-size:12px; padding:10px;}
+
+
+div.lp_resource_header{background:#F0F0F0; border:1px solid #999999; border-bottom:0; font-weight:bold; padding:10px; width:350px;}
+div.lp_resource_header_end{background:#F0F0F0; border:1px solid #999999; font-weight:bold; padding:10px; width:350px;}
+div.lp_resource_elements{background:#FAFAFA; border:1px solid #999999; border-bottom:0; display:none; padding:5px 10px; width:350px;}
+div.lp_resource_elements_end{background:#FAFAFA; border:1px solid #999999; border-top: 0px; display:none; padding:5px 10px; width:350px;}
+div.lp_resource_elements div{padding:3px;}
+
+div.lp_tree{height:400px; padding:3px 10px 3px 0; overflow-x : auto; overflow-y : scroll; width:230px;}
+
+
+hr{background:#999999; border:0; color:#999999; height:1px; margin:10px auto; width:75%;}
+
+
+option.bottom{border-top:1px solid #999999; margin-top:2px; padding-top:2px;}
+option.top{border-bottom:1px solid #999999; margin-bottom:2px; padding-bottom:2px;}
+
+p.lp_action{margin:5px 0;}
+p.lp_text{margin-top:0px;}
+p.lp_title{font-weight:bold; margin-top:0px;}
+
+
+table.lp_build{font-size:12px; height:400px; width:100%;}
+
+table.lp_build td{vertical-align:top;}
+table.lp_build td.tree{border-right:1px solid #999999; width:240px;}
+table.lp_build td.workspace{padding:0; width:auto;}
+
+
+table.lp_form{font-size:12px; margin:0 10px; width:100%;}
+
+table.lp_form td{height:25px; padding:5px; vertical-align:top; width:auto;}
+table.lp_form td.label{padding-top:7px; text-align:right; width:75px;}
+table.lp_form td.radio{width:300px;}
+table.lp_form td.exercise{width:50px;}
+
+table.lp_form th{background:#F8F8F8; border-bottom:1px solid #999999; border-top:1px solid #999999;}
+table.lp_overview th.exercise{width:50px;}
+
+table.lp_form input,
+	table.lp_form select,
+	table.lp_form textarea{background:#F8F8F8; border:1px solid #999999; font-family:Arial, Verdana, Helvetica, sans-serif; font-size:12px; padding:1px 2px; width:300px;}
+
+table.lp_form td.radio input,
+	table.lp_form td.exercise input{width:auto;}	
+	
+table.lp_form .small_form{background:#FFFFFF;}	
+	
+table.lp_form select{padding:0;}
+
+table.lp_form input.button{width:75px;}
+
+
+table.lp_overview{font-size:12px; width:100%;}
+
+table.lp_overview td{border-bottom:1px solid #999999; border-top:1px solid #999999; height:20px; padding:3px; vertical-align:middle; width:auto;}
+table.lp_overview td.title{width:200px;}
+table.lp_overview td.actions{text-align:center; width:100px;}
+table.lp_overview td.move{text-align:center; width:50px;}
+
+table.lp_overview th{background:#FFFFFF; padding-left:3px; text-align:center;}
+
+table.lp_overview tr{background:#F8F8F8;}
+table.lp_overview tr:hover{background:#E5EDF9;}
+
+table.lp_overview img{margin-left:3px;}

+ 129 - 0
main/css/dokeosgrey/scorm.css

@@ -0,0 +1,129 @@
+.scormpage{
+height: 100%;
+}
+.scormpage .menu{
+width: 180px;
+float: left;
+margin: 1px;
+padding: 0px;
+margin-top: 0px;
+padding-top: 0px;
+font-size: small;
+}
+.lp_toc{
+background-color: white;
+height: 380px;
+width: 99%;
+border-right: 1px none;
+}
+.inner_lp_toc{
+overflow: auto;
+background-color: white;
+height: 325px;
+width: 99%;
+border-right: 1px #999999 solid;
+}
+.inner_lp_toc .scorm_item{
+font-size: 11px;
+margin-left: 10px;
+margin-right:10px;
+padding-bottom: 2px;
+text-decoration: none;
+}
+
+	.inner_lp_toc .scorm_item A{
+		font-weight: normal;
+	}
+	
+		.inner_lp_toc .scorm_item A.chapter_module{
+			font-weight: normal;
+		}
+
+.inner_lp_toc .scorm_item_highlight{
+font-size: 11px;
+margin-left: 10px;
+margin-right: 10px;
+padding-bottom: 2px;
+text-decoration: none;
+background:#F8F8F8; border:1px dashed #999999;
+}
+
+	.inner_lp_toc .scorm_item_highlight A{
+		font-weight: normal;
+	}
+	
+.inner_lp_toc .scorm_item_highlight .highlight{
+	font-weight: normal;
+	background:#F3F3F3; border:1px dashed #949494;
+	margin-right: 1px;
+}
+
+.inner_lp_toc .scorm_status_img{
+margin:0px;
+margin-left: -10px;
+width:10px;
+}
+
+
+.lp_navigation{
+overflow: auto;
+background-color: white;
+height: 44px;
+width:180px;
+padding-top: 4px;
+padding-bottom:0px;
+border: none;
+margin-top: -18px;
+border-top: 1px dotted black;
+border-bottom: 1px dotted black;
+}
+
+.lp_navigation_elem{
+	padding-left: 40px;
+	padding-top: 0px;
+}
+/*.scormpage .menu */
+.lp_navigation_elem .progresstext{
+	margin-top: -12px;
+	margin-left: 4em;
+	font-size: smaller;
+}
+
+/*.scormpage .menu */
+.lp_navigation_elem .buttons{
+margin-left: 5px;
+margin-right: 0em;
+margin-top: 0.4em;
+}
+
+.scormpage .menu .notification{
+background-color: white;
+height: 50px;
+}
+.scormpage .menu .notification .message{
+background-color: white;
+height: 50px;
+width: 180px;
+border: none;
+}
+
+.scormpage .content{
+/*float: left;
+width: 60%;*/
+margin-top: 0px;
+padding-top: 0px;
+padding-left: 180px;
+background-color: white;
+}
+.iframe{
+border: 0px solid black;
+height: 580px;
+width: 95%;
+margin: 0px;
+padding-right: 0px;
+overflow: auto;
+vertical-align: top;
+}
+.scormpage .footer{
+clear: both;
+}

+ 83 - 0
main/css/dokeosgrey/scormfs.css

@@ -0,0 +1,83 @@
+.scormpage{
+}
+.scormpage .menu{
+	width: 180px;
+	padding: 0px;
+	font-size: small;
+	position: absolute;
+	background-color: white;
+/*
+	filter:alpha(opacity=50);
+	opacity: 0.50;
+	-moz-border-radius: 25px;
+	margin-right: 5%;
+	margin-left: 75%;
+	margin-top: 10px;
+*/
+}
+.scormpage .menu .lp_nav{
+	height: 50px;
+	width: 160px;
+	padding-top: 4px;
+	padding-bottom:0px;
+/*	
+	margin-left: 10px;
+	margin-right: 10px;
+*/
+	margin-top: 0px;
+}
+.lp_navigation_elem{
+	padding-top: 2px;
+	position: absolute;
+	left: 50%;
+	margin-left: -70px;
+}
+.lp_navigation_elem .progresstext{
+	margin-top: -12px;
+	margin-left: 4em;
+	font-size: smaller;
+}
+.lp_navigation_elem .buttons{
+	margin-left: 1em;
+	margin-right: 0em;
+	margin-top: 0.4em;
+}
+#msg_div_id{
+	padding-left: 10px;
+	padding-top: 4px;
+}
+.scormpage .menu .notification{
+	height: 50px;
+	margin-left: 15px;
+	margin-right: 15px;
+}
+.scormpage .menu .notification .message{
+	height: 50px;
+	width: 140px;
+	border: none;
+}
+.scormpage .menu .notification .lp_log{
+	height: 100px;
+	width: 180px;
+	border: none;
+	overflow: auto;
+}
+.scormpage .content .iframe{
+	/*
+	border: none;
+	height: 700px;
+	margin: 0px;
+	padding-right: 0px;
+	margin-right: 0%;
+	margin-left: 0%;
+	*/
+	/* trying the absolute mode */
+	position: fixed;
+	bottom:0;
+	left:0;
+	width: 100%;
+	height: 100%;
+}
+.scormpage .footer{
+	clear: both;
+}

+ 40 - 9
main/inc/header.inc.php

@@ -74,23 +74,26 @@ echo get_setting('siteName');
 <style type="text/css" media="screen, projection">
 /*<![CDATA[*/
 <?php
-$style = api_get_setting('stylesheets'); 	// plataform's css
+
+$platform_theme= api_get_setting('stylesheets'); 	// plataform's css
+$my_style=$platform_theme;
 
 if(api_get_setting('user_selected_theme') == 'true') 
 {		
 	$useri = api_get_user_info();
-	$theme = $useri['theme'];
-	if(!empty($theme) && $theme != $my_style)
+	$user_theme = $useri['theme'];
+	if(!empty($user_theme) && $user_theme != $my_style)
 	{
-		$my_style = $theme;					// user's css
+		$my_style = $user_theme;					// user's css
 	}
 }
 $mycourseid = api_get_course_id();
-if (!empty($mycourseid) && $mycourseid != -1) {		 		
-	
+if (!empty($mycourseid) && $mycourseid != -1) 
+{	
 	if (api_get_setting('allow_course_theme') == 'true') 
 	{	
-		$mycoursetheme=api_get_course_setting('course_theme');			
+		$mycoursetheme=api_get_course_setting('course_theme');
+					
 		if (!empty($mycoursetheme) && $mycoursetheme!=-1)		 
 		{							
 			if(!empty($mycoursetheme) && $mycoursetheme != $my_style)
@@ -98,9 +101,38 @@ if (!empty($mycourseid) && $mycourseid != -1) {
 				$my_style = $mycoursetheme;		// course's css
 			}			
 		}
+				
+		$mycourselptheme=api_get_course_setting('allow_learning_path_theme');
+		if (!empty($mycourselptheme) && $mycourselptheme!=-1 && $mycourselptheme== 1)		 
+		{	
+			
+			global $lp_theme_css; //  it comes from the lp_controller.php 
+			global $lp_theme_config; // it comes from the lp_controller.php
+											
+			if (!$lp_theme_config)			 											
+			{
+				if ($lp_theme_css!='') 
+				{				
+					$theme=$lp_theme_css;						
+					if(!empty($theme) && $theme != $my_style)
+					{								
+						$my_style = $theme;	 // LP's css
+					}
+				}				
+			}
+		}
 	}
 }
 
+global $show_learn_path;
+
+if ($show_learn_path) {
+	$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'css/'.$my_style.'/learnpath.css"/>';
+	$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='dtree.css' />"; //will be moved
+	$htmlHeadXtra[] = "<script src='dtree.js' type='text/javascript'></script>"; //will be moved
+		
+}
+
 $my_code_path = api_get_path(WEB_CODE_PATH);
 if(empty($my_style)){$my_style = 'default';}
 echo '@import "'.$my_code_path.'css/'.$my_style.'/default.css";'."\n";
@@ -157,7 +189,6 @@ include(api_get_path(LIBRARY_PATH).'/javascript/email_links.lib.js.php');
 <!-- #outerframe container to control some general layout of all pages -->
 <div id="outerframe">
 
-<?php
-						
+<?php						
 //  Banner
 include(api_get_path(INCLUDE_PATH)."banner.inc.php");

+ 1 - 0
main/inc/lib/add_course.lib.inc.php

@@ -1707,6 +1707,7 @@ function fill_Db_course($courseDbName, $courseRepository, $language,$default_doc
 	api_sql_query("INSERT INTO `".$TABLESETTING . "`(variable,value,category) VALUES ('email_alert_manager_on_new_quiz',0,'quiz')");
 	api_sql_query("INSERT INTO `".$TABLESETTING . "`(variable,value,category) VALUES ('allow_user_image_forum',1,'forum')");
 	api_sql_query("INSERT INTO `".$TABLESETTING . "`(variable,value,category) VALUES ('course_theme','','theme')");
+	api_sql_query("INSERT INTO `".$TABLESETTING . "`(variable,value,category) VALUES ('allow_learning_path_theme','1','theme')");
 	/*
 	-----------------------------------------------------------
 		Course homepage tools for platform admin only

+ 1 - 1
main/inc/lib/display.lib.php

@@ -481,7 +481,7 @@ class Display {
 	function display_header($tool_name, $help = NULL)
 	{
 		$nameTools = $tool_name;
-		global $_plugins;
+		global $_plugins,$lp_theme_css,$mycoursetheme,$user_theme,$platform_theme;
 		global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $clarolineRepositoryWeb, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF;
 		global $menu_navigation;
 		include (api_get_path(INCLUDE_PATH)."header.inc.php");

+ 88 - 3
main/inc/reduced_header.inc.php

@@ -69,13 +69,98 @@ echo get_setting('siteName');
 </title>
 
 <?php
-$style = api_get_setting('stylesheets');
-if($style<>'')
+
+/*
+ * Choose CSS style platform's, user's, course's, or Learning path CSS 
+ */
+ 
+$platform_theme = api_get_setting('stylesheets'); 	// plataform's css
+$my_style=$platform_theme;
+if(api_get_setting('user_selected_theme') == 'true') 
+{		
+	$useri = api_get_user_info();
+	$user_theme = $useri['theme'];
+	if(!empty($user_theme) && $user_theme != $my_style)
+	{
+		$my_style = $user_theme;					// user's css
+	}
+}
+$mycourseid = api_get_course_id();
+if (!empty($mycourseid) && $mycourseid != -1) 
+{	
+	if (api_get_setting('allow_course_theme') == 'true') 
+	{	
+		$mycoursetheme=api_get_course_setting('course_theme');			
+		if (!empty($mycoursetheme) && $mycoursetheme!=-1)		 
+		{							
+			if(!empty($mycoursetheme) && $mycoursetheme != $my_style)
+			{				
+				$my_style = $mycoursetheme;		// course's css
+			}			
+		}
+				
+		$mycourselptheme=api_get_course_setting('allow_learning_path_theme');
+		if (!empty($mycourselptheme) && $mycourselptheme!=-1 && $mycourselptheme== 1)		 
+		{				
+			global $lp_theme_css; //  it comes from the lp_controller.php 
+			global $lp_theme_config; // it comes from the lp_controller.php
+							
+			if (!empty($lp_theme_css)) 
+				{
+					$theme=$lp_theme_css;						
+					if(!empty($theme) && $theme != $my_style)
+					{								
+						$my_style = $theme;	 // LP's css
+					}
+				}				
+			
+		}
+	}
+}
+
+if ($lp_theme_log){
+	$my_style=$platform_theme;
+}
+
+// Sets the css reference it is call from lp_nav.php, lp_toc.php, lp_message, lp_log.php
+if ($scorm_css_header) 
+{	
+	if (!empty($my_style)) 
+	{
+		$scorm_css=api_get_path(WEB_CODE_PATH).'css/'.$my_style.'/scorm.css';
+		$scormfs_css=api_get_path(WEB_CODE_PATH).'css/'.$my_style.'/scormfs.css';
+	}
+	else 
+	{
+		$scorm_css='scorm.css';
+		$scormfs_css='scormfs.css';		
+	}	
+		
+	if($display_mode == 'fullscreen')
+	{	
+		$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
+							/*<![CDATA[*/
+							@import "'.$scormfs_css.'";
+							/*]]>*/
+							</style>';
+	}
+	else
+	{
+		$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
+							/*<![CDATA[*/
+							@import "'.$scorm_css.'";
+							/*]]>*/
+							</style>';
+	}	
+}
+
+
+if($my_style!='')
 {
 ?>
 <style type="text/css" media="screen, projection">
 /*<![CDATA[*/
-@import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo $style;?>/default.css";
+@import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo $my_style;?>/default.css";
 /*]]>*/
 </style>
 <?php

+ 18 - 0
main/newscorm/aicc.class.php

@@ -569,6 +569,24 @@ class aicc extends learnpath {
 	 		return false;
 	 	}
 	 }
+	 
+	 /**
+	 * Sets the theme setting in the database
+	 * @param	string	Theme setting
+	 */
+	 function set_theme($theme=''){
+		if($this->debug>0){error_log('In aicc::set_theme('.$theme.') method',0);}
+	 	$lp = $this->get_id();
+	 	if($lp!=0){
+	 		$tbl_lp = Database::get_course_table('lp');
+	 		$sql = "UPDATE $tbl_lp SET theme = '$theme' WHERE id = ".$lp;
+	 		$res = api_sql_query($sql);
+	 		return $res;
+	 	}else{
+	 		return false;
+	 	}
+	 }
+	 
 	/**
 	 * Sets the content maker setting in the database
 	 * @param	string	Proximity setting

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

@@ -37,6 +37,7 @@ class learnpath {
 	var $name; //learnpath name (they generally have one)
 	var $ordered_items = array(); //list of the learnpath items in the order they are to be read
 	var $path = ''; //path inside the scorm directory (if scorm)
+	var $theme; // the current theme of the learning path  
 	
 	// Tells if all the items of the learnpath can be tried again. Defaults to "no" (=1)
 	var $prevent_reinit = 1;
@@ -122,6 +123,7 @@ class learnpath {
     			$this->name = stripslashes($row['name']);
     			$this->encoding = $row['default_encoding'];
     			$this->proximity = $row['content_local'];
+    			$this->theme = $row['theme'];
     			$this->maker = $row['content_maker'];
     			$this->prevent_reinit = $row['prevent_reinit'];
     			$this->license = $row['content_license'];
@@ -1901,6 +1903,18 @@ class learnpath {
      */
     function get_progress_bar($mode='',$percentage=-1,$text_add='')
     {
+    	global $lp_theme_css;
+    	
+    	// Setting up the CSS path of the current style if exists   
+    	if (!empty($lp_theme_css))
+    	{    
+	    	$css_path=api_get_path(WEB_CODE_PATH).'css/'.$lp_theme_css.'/images/';
+    	}
+    	else 
+    	{
+    		$css_path='../img/';	
+    	}  
+	    	
 		//if($this->debug>0){error_log('New LP - In learnpath::get_progress_bar()',0);}
     	if(is_object($this) && ($percentage=='-1' OR $text_add==''))
     	{
@@ -1911,15 +1925,20 @@ class learnpath {
     	$output = '' 
     	//.htmlentities(get_lang('ScormCompstatus'),ENT_QUOTES,'ISO-8859-1')."<br />"
 	    .'<table border="0" cellpadding="0" cellspacing="0"><tr><td>'
-	    .'<img id="progress_img_limit_left" src="../img/bar_1.gif" width="1" height="12">'
-	    .'<img id="progress_img_full" src="../img/bar_1u.gif" width="'.$size.'px" height="12" id="full_portion">'
-	    .'<img id="progress_img_limit_middle" src="../img/bar_1m.gif" width="1" height="12">';
-	    if($percentage <= 98){
-	    	$output .= '<img id="progress_img_empty" src="../img/bar_1r.gif" width="'.(100-$size).'px" height="12" id="empty_portion">';
-	    }else{
-	    	$output .= '<img id="progress_img_empty" src="../img/bar_1r.gif" width="0" height="12" id="empty_portion">';
+	    .'<img id="progress_img_limit_left" src="'.$css_path.'bar_1.gif" width="1" height="12">'
+	    .'<img id="progress_img_full" src="'.$css_path.'bar_1u.gif" width="'.$size.'px" height="12" id="full_portion">'
+	    .'<img id="progress_img_limit_middle" src="'.$css_path.'bar_1m.gif" width="1" height="12">';
+	    
+	    if($percentage <= 98)
+	    {
+	    	$output .= '<img id="progress_img_empty" src="'.$css_path.'bar_1r.gif" width="'.(100-$size).'px" height="12" id="empty_portion">';
+	    }
+	    else
+	    {
+	    	$output .= '<img id="progress_img_empty" src="'.$css_path.'bar_1r.gif" width="0" height="12" id="empty_portion">';
 	    }
-	    $output .= '<img id="progress_bar_img_limit_right" src="../img/bar_1.gif" width="1" height="12"></td></tr></table>'
+	    
+	    $output .= '<img id="progress_bar_img_limit_right" src="'.$css_path.'bar_1.gif" width="1" height="12"></td></tr></table>'
 	    .'<div class="progresstext" id="progress_text">'.$text.'</div>';
 	    return $output;
     }
@@ -1984,6 +2003,17 @@ class learnpath {
 		if($this->debug>0){error_log('New LP - In learnpath::get_proximity()',0);}
 		if(!empty($this->proximity)){return $this->proximity;}else{return '';}
 	}
+	
+	 /**
+     * Gets the learnpath theme (remote or local)
+     * @return	string	Learnpath theme
+     */
+    function get_theme()
+	{
+		if($this->debug>0){error_log('New LP - In learnpath::get_theme()',0);}
+		if(!empty($this->theme)){return $this->theme;}else{return '';}
+	}
+	
 	/**
 	 * Generate a new prerequisites string for a given item. If this item was a sco and
 	 * its prerequisites were strings (instead of IDs), then transform those strings into
@@ -3410,6 +3440,25 @@ class learnpath {
     	return true;
 
     }
+    
+       /**
+     * Sets the theme of the LP (local/remote) (and save)
+     * @param	string	Optional string giving the new theme of this learnpath
+     * @return bool returns true if theme name is not empty
+     */
+    function set_theme($name=''){
+		if($this->debug>0){error_log('New LP - In learnpath::set_theme()',0);}
+    	if(empty($name))return false;
+    	
+    	$this->theme = $this->escape_string($name);
+		$lp_table = Database::get_course_table('lp');
+		$lp_id = $this->get_id();
+		$sql = "UPDATE $lp_table SET theme = '".$this->theme."' WHERE id = '$lp_id'";
+		if($this->debug>2){error_log('New LP - lp updated with new theme : '.$this->theme,0);}
+		//$res = Database::query($sql);
+		$res = api_sql_query($sql, __FILE__, __LINE__);
+    	return true;
+    }    
 
     /**
      * Sets the location/proximity of the LP (local/remote) (and save)
@@ -3425,9 +3474,9 @@ class learnpath {
 		$sql = "UPDATE $lp_table SET content_local = '".$this->proximity."' WHERE id = '$lp_id'";
 		if($this->debug>2){error_log('New LP - lp updated with new proximity : '.$this->proximity,0);}
 		//$res = Database::query($sql);
-		$res = api_sql_query($sql);
+		$res = api_sql_query($sql, __FILE__, __LINE__);
     	return true;
-    }    
+    }   
     /**
      * Sets the previous item ID to a given ID. Generally, this should be set to the previous 'current' item
      * @param	integer	DB ID of the item

+ 409 - 411
main/newscorm/lp_add_item.php

@@ -1,411 +1,409 @@
-<?php
-/*
-============================================================================== 
-	Dokeos - elearning and course management software
-
-	Copyright (c) 2004 Dokeos S.A.
-	Copyright (c) 2003 Ghent University (UGent)
-	Copyright (c) 2001 Universite catholique de Louvain (UCL)
-	Copyright (c) Patrick Cool
-	Copyright (c) Denes Nagy
-	Copyright (c) Yannick Warnier
-	
-	For a full list of contributors, see "credits.txt".
-	The full license can be read in "license.txt".
-	
-	This program is free software; you can redistribute it and/or
-	modify it under the terms of the GNU General Public License
-	as published by the Free Software Foundation; either version 2
-	of the License, or (at your option) any later version.
-	
-	See the GNU General Public License for more details.
-	
-	Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com
-============================================================================== 
-*/
-/**
-============================================================================== 
-* This is a learning path creation and player tool in Dokeos - previously 
-* learnpath_handler.php
-*
-* @author Patrick Cool
-* @author Denes Nagy
-* @author Roan Embrechts, refactoring and code cleaning
-* @author Yannick Warnier <ywarnier@beeznest.org> - cleaning and update
-* @package dokeos.learnpath
-============================================================================== 
-*/
-
-/*
-==============================================================================
-		INIT SECTION
-==============================================================================
-*/ 
-$this_section=SECTION_COURSES;
-
-api_protect_course_script();
-
-/*
------------------------------------------------------------
-	Libraries
------------------------------------------------------------
-*/ 
-//the main_api.lib.php, database.lib.php and display.lib.php
-//libraries are included by default
-
-include('learnpath_functions.inc.php');
-//include('../resourcelinker/resourcelinker.inc.php');
-include('resourcelinker.inc.php');
-//rewrite the language file, sadly overwritten by resourcelinker.inc.php
-// name of the language file that needs to be included 
-$language_file = "learnpath";
-
-/*
------------------------------------------------------------
-	Header and action code
------------------------------------------------------------
-*/ 
-$currentstyle = api_get_setting('stylesheets');
-$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'css/'.$currentstyle.'/learnpath.css"/>';
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='learnpath.css' />"; //will be a merged with original learnpath.css
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='dtree.css' />"; //will be moved
-$htmlHeadXtra[] = "<script src='dtree.js' type='text/javascript'></script>"; //will be moved
-$htmlHeadXtra[] = '
-<script type="text/javascript">
-function launch_templates(){
-	window.frames[0].FCKToolbarItems.GetItem("Templates").Click();
-}
-</script>';
-
-
-$htmlHeadXtra[] = $_SESSION['oLP']->create_js();
-/*
------------------------------------------------------------
-	Constants and variables
------------------------------------------------------------
-*/ 
-$is_allowed_to_edit = api_is_allowed_to_edit();
-
-$tbl_lp = Database::get_course_table('lp');
-$tbl_lp_item = Database::get_course_table('lp_item');
-$tbl_lp_view = Database::get_course_table('lp_view');
-
-$isStudentView  = (int) $_REQUEST['isStudentView'];
-$learnpath_id   = (int) $_REQUEST['lp_id'];
-$submit			= $_POST['submit_button'];
-/*
-$chapter_id     = $_GET['chapter_id'];
-$title          = $_POST['title'];
-$description   = $_POST['description'];
-$Submititem     = $_POST['Submititem'];
-$action         = $_REQUEST['action'];
-$id             = (int) $_REQUEST['id'];
-$type           = $_REQUEST['type'];
-$direction      = $_REQUEST['direction'];
-$moduleid       = $_REQUEST['moduleid'];
-$prereq         = $_REQUEST['prereq'];
-$type           = $_REQUEST['type'];
-*/
-/*
-==============================================================================
-		MAIN CODE
-==============================================================================
-*/
-// using the resource linker as a tool for adding resources to the learning path
-if ($action=="add" and $type=="learnpathitem")
-{
-	 $htmlHeadXtra[] = "<script language='JavaScript' type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
-}
-if ( (! $is_allowed_to_edit) or ($isStudentView) )
-{
-	error_log('New LP - User not authorized in lp_add_item.php');
-	header('location:lp_controller.php?action=view&lp_id='.$learnpath_id);
-}
-//from here on, we are admin because of the previous condition, so don't check anymore
-
-$sql_query = "SELECT * FROM $tbl_lp WHERE id = $learnpath_id"; 
-$result=api_sql_query($sql_query);
-$therow=Database::fetch_array($result); 
-
-//$admin_output = '';
-/*
------------------------------------------------------------
-	Course admin section
-	- all the functions not available for students - always available in this case (page only shown to admin)
------------------------------------------------------------
-*/ 
-/*==================================================
-			SHOWING THE ADMIN TOOLS
- ==================================================*/
-
-$interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path"));
-$interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}"));
-
-switch($_GET['type']){
-	case 'chapter':
-		$interbreadcrumb[]= array ("url"=>"#", "name" => get_lang("NewChapter"));
-	break;
-	default:
-		$interbreadcrumb[]= array ("url"=>"#", "name" => get_lang("NewStep"));
-	break;
-}
-
-Display::display_header(null,'Path');
-//api_display_tool_title($therow['name']);
-
-$suredel = get_lang('AreYouSureToDelete');
-$suredelstep = get_lang('AreYouSureToDeleteSteps');
-?>
-<script type='text/javascript'>
-/* <![CDATA[ */
-function confirmation (name)
-{
-	if (name!='Users' && name!='Assignments' && name!='Document' && name!='Forum' && name!='Agenda' && name!='Groups' && name!='Link _self'  && name!='Dropbox' && name!='Course_description' && name!='Exercise' && name!='Introduction_text')
-	{ 
-		if (confirm("<?php echo $suredel; ?> "+ name + " <?php echo $suredelstep;?>?"))
-			{return true;}
-		else
-			{return false;}
-	}
-	else
-	{
-		if (confirm("<?php echo $suredel; ?> "+ name + "?"))
-			{return true;}
-		else
-			{return false;}
-	}
-}
-</script>
-<?php
-
-//echo $admin_output;
-
-/*
------------------------------------------------------------
-	DISPLAY SECTION
------------------------------------------------------------
-*/
-echo '<table cellpadding="0" cellspacing="0" class="lp_build">';
-
-	echo '<tr>';
-			
-		echo '<td class="tree">';
-		
-			echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>';
-			
-			//links for adding a module, chapter or step
-			echo '<div class="lp_actions">';
-				
-				echo '<p class="lp_action">';
-				
-					echo '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=add_item&amp;type=chapter&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewChapter").'"><img align="left" alt="'.get_lang("NewChapter").'" src="../img/lp_dokeos_chapter_add.png" title="'.get_lang("NewChapter").'" />'.get_lang("NewChapter").'</a>';
-						
-				echo '</p>';
-				echo '<p class="lp_action">';
-				
-					echo '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=add_item&amp;type=step&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewStep").'"><img align="left" alt="'.get_lang("NewStep").'" src="../img/lp_dokeos_step_add.png" title="'.get_lang("NewStep").'" />'.get_lang("NewStep").'</a>';
-				
-				echo '</p>';
-				
-			echo '</div>';
-			
-			echo '<div class="lp_tree">';
-					
-				//build the tree with the menu items in it
-				echo $_SESSION['oLP']->build_tree();
-			
-			echo '</div>';
-					
-		echo '</td>';
-		echo '<td class="workspace">';
-		
-			if(isset($new_item_id) && is_numeric($new_item_id))
-			{
-				switch($_GET['type'])
-				{
-					
-					case 'chapter':
-						
-						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
-						
-						echo '<div class="lp_message" style="margin:3px 10px;">';
-						
-							echo get_lang("NewChapterCreated");
-						
-						echo '</div>';
-						
-						break;
-						
-					case TOOL_LINK:
-						
-						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
-						
-						echo '<div class="lp_message" style="margin:3px 10px;">';
-						
-							echo get_lang("NewLinksCreated");
-						
-						echo '</div>';
-						
-						break;
-					
-					case TOOL_STUDENTPUBLICATION:
-						
-						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
-						
-						echo '<div class="lp_message" style="margin:3px 10px;">';
-						
-							echo get_lang("NewStudentPublicationCreated");
-						
-						echo '</div>';
-						
-						break;
-						
-					case 'module':
-						
-						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
-						
-						echo '<div class="lp_message" style="margin:3px 10px;">';
-						
-							echo get_lang("NewModuleCreated");
-						
-						echo '</div>';
-						
-						break;
-						
-					case TOOL_QUIZ:
-					
-						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
-						
-						echo '<div class="lp_message" style="margin:3px 10px;">';
-						
-							echo get_lang("NewExerciseCreated");
-						
-						echo '</div>';
-						
-						break;
-					
-					
-					case TOOL_DOCUMENT:
-						
-						$msg = '<div class="lp_message" style="margin-bottom:10px;">';
-						
-							$msg .= get_lang("NewDocumentCreated");
-						
-						$msg .= '</div>';
-						
-						echo $_SESSION['oLP']->display_item($new_item_id, true, $msg);
-						
-						break;
-						
-						
-					case TOOL_FORUM:
-						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
-						
-						echo '<div class="lp_message" style="margin:3px 10px;">';
-						
-							echo get_lang("NewForumCreated");
-						
-						echo '</div>';
-						
-						break;
-					
-					
-					case 'thread':
-						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
-						
-						echo '<div class="lp_message" style="margin:3px 10px;">';
-						
-							echo get_lang("NewThreadCreated");
-						
-						echo '</div>';
-						
-						break;
-					
-				}
-			}
-			else
-			{
-				switch($_GET['type'])
-				{
-					case 'chapter':
-						
-						echo $_SESSION['oLP']->display_item_form($_GET['type'], get_lang("EnterDataNewChapter"));
-						
-						break;
-						
-					case 'module':
-					
-						echo $_SESSION['oLP']->display_item_form($_GET['type'], get_lang("EnterDataNewModule"));
-						
-						break;
-						
-					case 'document':
-						
-						if(isset($_GET['file']) && is_numeric($_GET['file']))
-						{
-						echo $_SESSION['oLP']->display_document_form('add', 0, $_GET['file']);
-						}
-						else
-						{
-							echo $_SESSION['oLP']->display_document_form('add', 0);
-						}
-						
-						break;
-					
-					case 'hotpotatoes':
-					
-						echo $_SESSION['oLP']->display_hotpotatoes_form('add', 0, $_GET['file']);
-
-						break;
-					
-					case 'quiz':
-						
-						echo $_SESSION['oLP']->display_quiz_form('add', 0, $_GET['file']);
-						
-						break;
-						
-					case 'forum':
-						
-						echo $_SESSION['oLP']->display_forum_form('add', 0, $_GET['forum_id']);
-						
-						break;
-						
-					case 'thread':
-						
-						echo $_SESSION['oLP']->display_thread_form('add', 0, $_GET['thread_id']);
-						
-						break;
-					
-					case 'link':
-						
-						echo $_SESSION['oLP']->display_link_form('add', 0, $_GET['file']);
-						
-						break;
-						
-					case 'student_publication':
-						
-						echo $_SESSION['oLP']->display_student_publication_form('add', 0, $_GET['file']);
-						
-						break;
-						
-					case 'step':
-						
-						echo $_SESSION['oLP']->display_resources();
-						
-						break;
-				}
-			}
-		
-		echo '</td>';
-			
-	echo '</tr>';
-		
-echo '</table>';
-
-/*
-==============================================================================
-		FOOTER 
-==============================================================================
-*/ 
-Display::display_footer();
-?>
+<?php
+/*
+============================================================================== 
+	Dokeos - elearning and course management software
+
+	Copyright (c) 2004 Dokeos S.A.
+	Copyright (c) 2003 Ghent University (UGent)
+	Copyright (c) 2001 Universite catholique de Louvain (UCL)
+	Copyright (c) Patrick Cool
+	Copyright (c) Denes Nagy
+	Copyright (c) Yannick Warnier
+	
+	For a full list of contributors, see "credits.txt".
+	The full license can be read in "license.txt".
+	
+	This program is free software; you can redistribute it and/or
+	modify it under the terms of the GNU General Public License
+	as published by the Free Software Foundation; either version 2
+	of the License, or (at your option) any later version.
+	
+	See the GNU General Public License for more details.
+	
+	Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com
+============================================================================== 
+*/
+/**
+============================================================================== 
+* This is a learning path creation and player tool in Dokeos - previously 
+* learnpath_handler.php
+*
+* @author Patrick Cool
+* @author Denes Nagy
+* @author Roan Embrechts, refactoring and code cleaning
+* @author Yannick Warnier <ywarnier@beeznest.org> - cleaning and update
+* @package dokeos.learnpath
+============================================================================== 
+*/
+
+/*
+==============================================================================
+		INIT SECTION
+==============================================================================
+*/ 
+$this_section=SECTION_COURSES;
+
+api_protect_course_script();
+
+/*
+-----------------------------------------------------------
+	Libraries
+-----------------------------------------------------------
+*/ 
+//the main_api.lib.php, database.lib.php and display.lib.php
+//libraries are included by default
+
+include('learnpath_functions.inc.php');
+//include('../resourcelinker/resourcelinker.inc.php');
+include('resourcelinker.inc.php');
+//rewrite the language file, sadly overwritten by resourcelinker.inc.php
+// name of the language file that needs to be included 
+$language_file = "learnpath";
+
+/*
+-----------------------------------------------------------
+	Header and action code
+-----------------------------------------------------------
+*/ 
+$htmlHeadXtra[] = '
+<script type="text/javascript">
+function launch_templates(){
+	window.frames[0].FCKToolbarItems.GetItem("Templates").Click();
+}
+</script>';
+
+$htmlHeadXtra[] = $_SESSION['oLP']->create_js();
+/*
+-----------------------------------------------------------
+	Constants and variables
+-----------------------------------------------------------
+*/ 
+$is_allowed_to_edit = api_is_allowed_to_edit();
+
+$tbl_lp = Database::get_course_table('lp');
+$tbl_lp_item = Database::get_course_table('lp_item');
+$tbl_lp_view = Database::get_course_table('lp_view');
+
+$isStudentView  = (int) $_REQUEST['isStudentView'];
+$learnpath_id   = (int) $_REQUEST['lp_id'];
+$submit			= $_POST['submit_button'];
+/*
+$chapter_id     = $_GET['chapter_id'];
+$title          = $_POST['title'];
+$description   = $_POST['description'];
+$Submititem     = $_POST['Submititem'];
+$action         = $_REQUEST['action'];
+$id             = (int) $_REQUEST['id'];
+$type           = $_REQUEST['type'];
+$direction      = $_REQUEST['direction'];
+$moduleid       = $_REQUEST['moduleid'];
+$prereq         = $_REQUEST['prereq'];
+$type           = $_REQUEST['type'];
+*/
+/*
+==============================================================================
+		MAIN CODE
+==============================================================================
+*/
+// using the resource linker as a tool for adding resources to the learning path
+if ($action=="add" and $type=="learnpathitem")
+{
+	 $htmlHeadXtra[] = "<script language='JavaScript' type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
+}
+if ( (! $is_allowed_to_edit) or ($isStudentView) )
+{
+	error_log('New LP - User not authorized in lp_add_item.php');
+	header('location:lp_controller.php?action=view&lp_id='.$learnpath_id);
+}
+//from here on, we are admin because of the previous condition, so don't check anymore
+
+$sql_query = "SELECT * FROM $tbl_lp WHERE id = $learnpath_id"; 
+$result=api_sql_query($sql_query);
+$therow=Database::fetch_array($result); 
+
+//$admin_output = '';
+/*
+-----------------------------------------------------------
+	Course admin section
+	- all the functions not available for students - always available in this case (page only shown to admin)
+-----------------------------------------------------------
+*/ 
+/*==================================================
+			SHOWING THE ADMIN TOOLS
+ ==================================================*/
+
+$interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path"));
+$interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}"));
+
+switch($_GET['type']){
+	case 'chapter':
+		$interbreadcrumb[]= array ("url"=>"#", "name" => get_lang("NewChapter"));
+	break;
+	default:
+		$interbreadcrumb[]= array ("url"=>"#", "name" => get_lang("NewStep"));
+	break;
+}
+
+//Theme calls
+$show_learn_path=true;
+$lp_theme_css=$_SESSION['oLP']->get_theme();
+
+Display::display_header(null,'Path');
+//api_display_tool_title($therow['name']);
+
+$suredel = get_lang('AreYouSureToDelete');
+$suredelstep = get_lang('AreYouSureToDeleteSteps');
+?>
+<script type='text/javascript'>
+/* <![CDATA[ */
+function confirmation (name)
+{
+	if (name!='Users' && name!='Assignments' && name!='Document' && name!='Forum' && name!='Agenda' && name!='Groups' && name!='Link _self'  && name!='Dropbox' && name!='Course_description' && name!='Exercise' && name!='Introduction_text')
+	{ 
+		if (confirm("<?php echo $suredel; ?> "+ name + " <?php echo $suredelstep;?>?"))
+			{return true;}
+		else
+			{return false;}
+	}
+	else
+	{
+		if (confirm("<?php echo $suredel; ?> "+ name + "?"))
+			{return true;}
+		else
+			{return false;}
+	}
+}
+</script>
+<?php
+
+//echo $admin_output;
+
+/*
+-----------------------------------------------------------
+	DISPLAY SECTION
+-----------------------------------------------------------
+*/
+echo '<table cellpadding="0" cellspacing="0" class="lp_build">';
+
+	echo '<tr>';
+			
+		echo '<td class="tree">';
+		
+			echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;">'.get_lang("Build").'&nbsp;<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">'.get_lang("BasicOverview").'</a>&nbsp;<a href="lp_controller.php?cidReq='.$_GET['cidReq'].'&action=view&lp_id='.$_SESSION['oLP']->lp_id.'">'.get_lang("Display").'</a></p>';
+			
+			//links for adding a module, chapter or step
+			echo '<div class="lp_actions">';
+				
+				echo '<p class="lp_action">';
+				
+					echo '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=add_item&amp;type=chapter&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewChapter").'"><img align="left" alt="'.get_lang("NewChapter").'" src="../img/lp_dokeos_chapter_add.png" title="'.get_lang("NewChapter").'" />'.get_lang("NewChapter").'</a>';
+						
+				echo '</p>';
+				echo '<p class="lp_action">';
+				
+					echo '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=add_item&amp;type=step&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="'.get_lang("NewStep").'"><img align="left" alt="'.get_lang("NewStep").'" src="../img/lp_dokeos_step_add.png" title="'.get_lang("NewStep").'" />'.get_lang("NewStep").'</a>';
+				
+				echo '</p>';
+				
+			echo '</div>';
+			
+			echo '<div class="lp_tree">';
+					
+				//build the tree with the menu items in it
+				echo $_SESSION['oLP']->build_tree();
+			
+			echo '</div>';
+					
+		echo '</td>';
+		echo '<td class="workspace">';
+		
+			if(isset($new_item_id) && is_numeric($new_item_id))
+			{
+				switch($_GET['type'])
+				{
+					
+					case 'chapter':
+						
+						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
+						
+						echo '<div class="lp_message" style="margin:3px 10px;">';
+						
+							echo get_lang("NewChapterCreated");
+						
+						echo '</div>';
+						
+						break;
+						
+					case TOOL_LINK:
+						
+						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
+						
+						echo '<div class="lp_message" style="margin:3px 10px;">';
+						
+							echo get_lang("NewLinksCreated");
+						
+						echo '</div>';
+						
+						break;
+					
+					case TOOL_STUDENTPUBLICATION:
+						
+						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
+						
+						echo '<div class="lp_message" style="margin:3px 10px;">';
+						
+							echo get_lang("NewStudentPublicationCreated");
+						
+						echo '</div>';
+						
+						break;
+						
+					case 'module':
+						
+						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
+						
+						echo '<div class="lp_message" style="margin:3px 10px;">';
+						
+							echo get_lang("NewModuleCreated");
+						
+						echo '</div>';
+						
+						break;
+						
+					case TOOL_QUIZ:
+					
+						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
+						
+						echo '<div class="lp_message" style="margin:3px 10px;">';
+						
+							echo get_lang("NewExerciseCreated");
+						
+						echo '</div>';
+						
+						break;
+					
+					
+					case TOOL_DOCUMENT:
+						
+						$msg = '<div class="lp_message" style="margin-bottom:10px;">';
+						
+							$msg .= get_lang("NewDocumentCreated");
+						
+						$msg .= '</div>';
+						
+						echo $_SESSION['oLP']->display_item($new_item_id, true, $msg);
+						
+						break;
+						
+						
+					case TOOL_FORUM:
+						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
+						
+						echo '<div class="lp_message" style="margin:3px 10px;">';
+						
+							echo get_lang("NewForumCreated");
+						
+						echo '</div>';
+						
+						break;
+					
+					
+					case 'thread':
+						echo $_SESSION['oLP']->display_manipulate($new_item_id, $_GET['type']);
+						
+						echo '<div class="lp_message" style="margin:3px 10px;">';
+						
+							echo get_lang("NewThreadCreated");
+						
+						echo '</div>';
+						
+						break;
+					
+				}
+			}
+			else
+			{
+				switch($_GET['type'])
+				{
+					case 'chapter':
+						
+						echo $_SESSION['oLP']->display_item_form($_GET['type'], get_lang("EnterDataNewChapter"));
+						
+						break;
+						
+					case 'module':
+					
+						echo $_SESSION['oLP']->display_item_form($_GET['type'], get_lang("EnterDataNewModule"));
+						
+						break;
+						
+					case 'document':
+						
+						if(isset($_GET['file']) && is_numeric($_GET['file']))
+						{
+						echo $_SESSION['oLP']->display_document_form('add', 0, $_GET['file']);
+						}
+						else
+						{
+							echo $_SESSION['oLP']->display_document_form('add', 0);
+						}
+						
+						break;
+					
+					case 'hotpotatoes':
+					
+						echo $_SESSION['oLP']->display_hotpotatoes_form('add', 0, $_GET['file']);
+
+						break;
+					
+					case 'quiz':
+						
+						echo $_SESSION['oLP']->display_quiz_form('add', 0, $_GET['file']);
+						
+						break;
+						
+					case 'forum':
+						
+						echo $_SESSION['oLP']->display_forum_form('add', 0, $_GET['forum_id']);
+						
+						break;
+						
+					case 'thread':
+						
+						echo $_SESSION['oLP']->display_thread_form('add', 0, $_GET['thread_id']);
+						
+						break;
+					
+					case 'link':
+						
+						echo $_SESSION['oLP']->display_link_form('add', 0, $_GET['file']);
+						
+						break;
+						
+					case 'student_publication':
+						
+						echo $_SESSION['oLP']->display_student_publication_form('add', 0, $_GET['file']);
+						
+						break;
+						
+					case 'step':
+						
+						echo $_SESSION['oLP']->display_resources();
+						
+						break;
+				}
+			}
+		
+		echo '</td>';
+			
+	echo '</tr>';
+		
+echo '</table>';
+
+/*
+==============================================================================
+		FOOTER 
+==============================================================================
+*/ 
+Display::display_footer();
+?>

+ 3 - 10
main/newscorm/lp_admin_view.php

@@ -58,16 +58,6 @@ include('resourcelinker.inc.php');
 //rewrite the language file, sadly overwritten by resourcelinker.inc.php
 $language_file = "learnpath";
 
-/*
------------------------------------------------------------
-	Header and action code
------------------------------------------------------------
-*/ 
-$currentstyle = api_get_setting('stylesheets');
-$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'css/'.$currentstyle.'/learnpath.css"/>';
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='learnpath.css' />"; //will be a merged with original learnpath.css
-$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="dtree.css" />'; //will be moved
-$htmlHeadXtra[] = '<script src="dtree.js" type="text/javascript"></script>'; //will be moved
 /*
 -----------------------------------------------------------
 	Constants and variables
@@ -137,6 +127,9 @@ $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_
 
 $interbreadcrumb[]= array ("url"=>api_get_self()."?action=admin_view&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}"));
 
+//Theme calls
+$show_learn_path=true;
+$lp_theme_css=$_SESSION['oLP']->get_theme(); 
 Display::display_header(null,'Path');
 //api_display_tool_title($therow['name']);
 

+ 5 - 10
main/newscorm/lp_build.php

@@ -61,16 +61,6 @@ include('resourcelinker.inc.php');
 // name of the language file that needs to be included 
 $language_file = "learnpath";
 
-/*
------------------------------------------------------------
-	Header and action code
------------------------------------------------------------
-*/ 
-$currentstyle = api_get_setting('stylesheets');
-$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'css/'.$currentstyle.'/learnpath.css"/>';
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='learnpath.css' />"; //will be a merged with original learnpath.css
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='dtree.css' />"; //will be moved
-$htmlHeadXtra[] = "<script src='dtree.js' type='text/javascript'></script>"; //will be moved
 /*
 -----------------------------------------------------------
 	Constants and variables
@@ -160,7 +150,12 @@ $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_
 
 $interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}"));
 
+//Theme calls
+$lp_theme_css=$_SESSION['oLP']->get_theme();
+$show_learn_path=true;
 Display::display_header(null,'Path');
+
+
 //api_display_tool_title($therow['name']);
 
 $suredel = get_lang('AreYouSureToDelete');

+ 2 - 1
main/newscorm/lp_controller.php

@@ -80,7 +80,7 @@ if(isset($_SESSION['lpobject']))
 			api_session_unregister('lpobject');
 		}else{
 			$_SESSION['oLP'] = $oLP;
-			$lp_found = true;
+			$lp_found = true;			
 		}
 	}
 }
@@ -566,6 +566,7 @@ switch($_REQUEST['action'])
 			$_SESSION['oLP']->set_encoding($_REQUEST['lp_encoding']);
 			$_SESSION['oLP']->set_maker($_REQUEST['lp_maker']);
 			$_SESSION['oLP']->set_proximity($_REQUEST['lp_proximity']);
+			$_SESSION['oLP']->set_theme($_REQUEST['lp_theme']);				
 			require('lp_list.php');
 		}	
 		break;

+ 15 - 1
main/newscorm/lp_edit.php

@@ -64,13 +64,27 @@ $content_proximity_select->addOption(get_lang('Local'), 'local');
 $content_proximity_select->addOption(get_lang('Remote'), 'remote');
 
 
+if (api_get_setting('allow_course_theme') == 'true')
+{		
+	$mycourselptheme=api_get_course_setting('allow_learning_path_theme');
+	if (!empty($mycourselptheme) && $mycourselptheme!=-1 && $mycourselptheme== 1) 
+	{			
+		//LP theme picker				
+		$theme_select = &$form->addElement('select_theme', 'lp_theme', get_lang('Theme'));
+		$form->applyFilter('lp_theme', 'trim');
+		
+		$s_theme = $_SESSION['oLP']->get_theme();
+		$theme_select ->setSelected($s_theme); //default	
+	}	
+}
+
+
 //default values
 $content_proximity_select -> setSelected($s_selected_proximity);
 $origin_select -> setSelected($s_selected_origin);
 $encoding_select -> setSelected($s_selected_encoding);
 $defaults["lp_name"]=$_SESSION['oLP']->get_name();
 
-
 //Submit button
 $form->addElement('submit', 'Submit', get_lang('Ok'));
 

+ 3 - 5
main/newscorm/lp_edit_item.php

@@ -64,11 +64,6 @@ $language_file = "learnpath";
 	Header and action code
 -----------------------------------------------------------
 */ 
-$currentstyle = api_get_setting('stylesheets');
-$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'css/'.$currentstyle.'/learnpath.css"/>';
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='learnpath.css' />"; //will be a merged with original learnpath.css
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='dtree.css' />"; //will be moved
-$htmlHeadXtra[] = "<script src='dtree.js' type='text/javascript'></script>"; //will be moved
 $htmlHeadXtra[] = '
 <script type="text/javascript">
 function launch_templates(){
@@ -144,6 +139,9 @@ $therow=Database::fetch_array($result);
 $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path"));
 
 $interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}"));
+//Theme calls
+$show_learn_path=true;
+$lp_theme_css=$_SESSION['oLP']->get_theme();
 
 Display::display_header(null,'Path');
 //api_display_tool_title($therow['name']);

+ 4 - 10
main/newscorm/lp_edit_item_prereq.php

@@ -59,16 +59,6 @@ include('resourcelinker.inc.php');
 // name of the language file that needs to be included 
 $language_file = "learnpath";
 
-/*
------------------------------------------------------------
-	Header and action code
------------------------------------------------------------
-*/ 
-$currentstyle = api_get_setting('stylesheets');
-$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'css/'.$currentstyle.'/learnpath.css"/>';
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='learnpath.css' />"; //will be a merged with original learnpath.css
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='dtree.css' />"; //will be moved
-$htmlHeadXtra[] = "<script src='dtree.js' type='text/javascript'></script>"; //will be moved
 /*
 -----------------------------------------------------------
 	Constants and variables
@@ -138,6 +128,10 @@ $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_
 
 $interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}"));
 
+//Theme calls
+$show_learn_path=true;
+$lp_theme_css=$_SESSION['oLP']->get_theme();
+
 Display::display_header(null,'Path');
 //api_display_tool_title($therow['name']);
 

+ 2 - 0
main/newscorm/lp_header.php

@@ -57,7 +57,9 @@ if($show_link)
 // else we don't display get_lang(ucfirst(TOOL_LEARNPATH)) in the breadcrumb since the learner accessed it directly from the course homepage
 $interbreadcrumb[] = array("url"=>"./lp_controller.php?action=view&lp_id=".$path_id,'name'=>$path_name);
 $noPHP_SELF = true;
+$lp_theme_css=$_SESSION['oLP']->get_theme();
 Display::display_header($nameTools,"Path", null);
+
 ?>
 </div>
 </body>

+ 21 - 0
main/newscorm/lp_list.php

@@ -34,6 +34,7 @@
 /**
  * Script
  */
+
 if(empty($lp_controller_touched) || $lp_controller_touched!=1){
 	header('location: lp_controller.php?action=list');
 }
@@ -203,6 +204,26 @@ if (is_array($flat_list))
 	    $dsp_default_view = '';
 	    $dsp_debug = '';
 	    $dsp_order = '';
+	    
+	    // Select course theme	
+		if (!empty($platform_theme))
+		{	
+			$mystyle=$platform_theme;
+		}
+		
+		if (!empty($user_theme)) 
+		{	 
+			$mystyle=$user_theme;
+		}		
+				
+		if (!empty($mycoursetheme)) 
+		{	 
+			$mystyle=$mycoursetheme;
+		}
+		
+		$lp_theme_css=$mystyle;
+		
+	    
 	    if($display_progress_bar)
 	    {
 	    	$dsp_progress = '<td>'.learnpath::get_progress_bar('%',learnpath::get_db_progress($id,api_get_user_id()),'').'</td>';

+ 4 - 6
main/newscorm/lp_log.php

@@ -27,12 +27,10 @@ function cleanlog(){
   }
 }
 </script>';
-$htmlHeadXtra[] = '' .
-'<style type="text/css" media="screen, projection">
-	/*<![CDATA[*/
-	@import "../css/default/scorm.css";
-	/*]]>*/
-</style>';
+
+$scorm_css_header=true;
+$display_mode='';
+$lp_theme_log=true;
 include_once('../inc/reduced_header.inc.php');
 ?>
 <body>

+ 3 - 14
main/newscorm/lp_message.php

@@ -33,27 +33,16 @@ if(isset($_SESSION['lpobject'])){
 }
 if($debug>0){error_log('New LP - Loaded lp_message : '.$_SERVER['REQUEST_URI'].' from '.$_SERVER['HTTP_REFERER'],0);}
 $charset = 'ISO-8859-1';
+
 $htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
   var dokeos_xajax_handler = window.parent.oxajax;
 </script>';
-if($display_mode == 'fullscreen'){
-	$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
-						/*<![CDATA[*/
-						@import "scormfs.css";
-						/*]]>*/
-						</style>';
-}else{
-	$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
-						/*<![CDATA[*/
-						@import "scorm.css";
-						/*]]>*/
-						</style>';
-}
+$lp_theme_css=$_SESSION['oLP']->get_theme();
+$scorm_css_header=true;
 include_once('../inc/reduced_header.inc.php');
 //close the session immediately to avoid concurrent access problems
 session_write_close();
 ?>
-
 <body>
 <div id="msg_div_id">
 <?php

+ 4 - 6
main/newscorm/lp_move_item.php

@@ -64,12 +64,6 @@ $language_file = "learnpath";
 	Header and action code
 -----------------------------------------------------------
 */ 
-$currentstyle = api_get_setting('stylesheets');
-$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'css/'.$currentstyle.'/learnpath.css"/>';
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='learnpath.css' />"; //will be a merged with original learnpath.css
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='dtree.css' />"; //will be moved
-$htmlHeadXtra[] = "<script src='dtree.js' type='text/javascript'></script>"; //will be moved
-
 $htmlHeadXtra[] = $_SESSION['oLP']->create_js();
 /*
 -----------------------------------------------------------
@@ -140,6 +134,10 @@ $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_
 
 $interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}"));
 
+//Theme calls
+$show_learn_path=true;
+$lp_theme_css=$_SESSION['oLP']->get_theme();
+
 Display::display_header(null,'Path');
 //api_display_tool_title($therow['name']);
 

+ 27 - 24
main/newscorm/lp_nav.php

@@ -21,6 +21,10 @@ require_once('aicc.class.php');
 
 //error_log('New LP - Loaded lp_nav: '.$_SERVER['REQUEST_URI'],0);
 
+$htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
+	  var dokeos_xajax_handler = window.parent.oxajax;
+	</script>';
+
 $progress_bar = '';
 $navigation_bar = '';
 $display_mode = '';
@@ -29,37 +33,36 @@ if(isset($_SESSION['lpobject']))
 {
 	//if($debug>0) //error_log('New LP - in lp_nav.php - SESSION[lpobject] is defined',0);
 	$oLP = unserialize($_SESSION['lpobject']);
-	if(is_object($oLP)){
+	if(is_object($oLP))
+	{
 		$_SESSION['oLP'] = $oLP;
-	}else{
+	}
+	else
+	{
 		//error_log('New LP - in lp_nav.php - SESSION[lpobject] is not object - dying',0);
 		die('Could not instanciate lp object');
-	}
+	}	
 	$display_mode = $_SESSION['oLP']->mode;
+		
+	$scorm_css_header=true;
+	$lp_theme_css=$_SESSION['oLP']->get_theme();	
+	
+	//Setting up the CSS theme if exists	
+	include_once('../inc/reduced_header.inc.php');	
+	
+	if (!empty($lp_theme_css) && !empty($mycourselptheme) && $mycourselptheme!=-1 && $mycourselptheme== 1 )	
+	{
+		global $lp_theme_css;			
+	}
+	else 
+	{
+		$lp_theme_css=$my_style;
+	}
+	
 	$progress_bar = $_SESSION['oLP']->get_progress_bar();
-	$navigation_bar = $_SESSION['oLP']->get_navigation_bar();
-}
-
-$htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
-  var dokeos_xajax_handler = window.parent.oxajax;
-</script>';
-if($display_mode == 'fullscreen'){
-	$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
-						/*<![CDATA[*/
-						@import "scormfs.css";
-						/*]]>*/
-						</style>';
-}else{
-	$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
-						/*<![CDATA[*/
-						@import "scorm.css";
-						/*]]>*/
-						</style>';
-}
-include_once('../inc/reduced_header.inc.php');
+	$navigation_bar = $_SESSION['oLP']->get_navigation_bar();
}
 session_write_close();
 ?>
-
 <body>
 	<div class="lp_navigation_elem">
 	  <?php echo $progress_bar; ?>

+ 3 - 6
main/newscorm/lp_toc.php

@@ -33,12 +33,9 @@ $charset = $_SESSION['oLP']->encoding;
 $htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
   var dokeos_xajax_handler = window.parent.oxajax;
 </script>';
-$htmlHeadXtra[] = '' .
-'<style type="text/css" media="screen, projection">
-	/*<![CDATA[*/
-	@import "scorm.css";
-	/*]]>*/
-</style>';
+$scorm_css_header=true;
+$display_mode='';
+$lp_theme_css=$_SESSION['oLP']->get_theme();
 include_once('../inc/reduced_header.inc.php');
 ?>
 <body>

+ 17 - 20
main/newscorm/lp_view.php

@@ -79,7 +79,8 @@ unset($_SESSION['questionList']);
  * Get a link to the corresponding document
  */
 $src = '';
-switch($lp_type){
+switch($lp_type)
+{
 	case 1:
 		$_SESSION['oLP']->stop_previous_item();
 		$htmlHeadXtra[] = '<script src="scorm_api.php" type="text/javascript" language="javascript"></script>';
@@ -118,23 +119,21 @@ switch($lp_type){
 	case 4:
 		break;
 }
-$_SESSION['oLP']->set_previous_item($lp_item_id);
 
+$_SESSION['oLP']->set_previous_item($lp_item_id);
 $nameTools = $_SESSION['oLP']->get_name();
 $save_setting = get_setting("show_navigation_menu");
 global $_setting;
 $_setting['show_navigation_menu'] = false;
 
-
-if($_SESSION['oLP']->mode == 'fullscreen'){
-	$htmlHeadXtra[] =
-	'<style type="text/css" media="screen, projection">
-	/*<![CDATA[*/
-	@import "scorm.css";
-	/*]]>*/
-	</style>';
-	$htmlHeadXtra[] = "<script>window.open('$src','content_name','toolbar=0,location=0,status=0,scrollbars=1,resizable=1');</script>";
+$scorm_css_header=true; 	
+$lp_theme_css=$_SESSION['oLP']->get_theme(); //sets the css theme of the LP this call is also use at the frames (toc, nav, message)
+	
+if($_SESSION['oLP']->mode == 'fullscreen')
+{
+	$htmlHeadXtra[] = "<script>window.open('$src','content_name','toolbar=0,location=0,status=0,scrollbars=1,resizable=1');</script>";	
 	include_once('../inc/reduced_header.inc.php');
+	
 	//set flag to ensure lp_header.php is loaded by this script (flag is unset in lp_header.php)
 	$_SESSION['loaded_lp_view'] = true;
 	?>
@@ -156,21 +155,19 @@ if($_SESSION['oLP']->mode == 'fullscreen'){
 	</frameset>
 </html>
 <?php
-}else{
-	$htmlHeadXtra[] =
-	'<style type="text/css" media="screen, projection">
-	/*<![CDATA[*/
-	@import "scorm.css";
-	/*]]>*/
-	</style>';
+}
+else
+{	
 	include_once('../inc/reduced_header.inc.php');
 	$displayAudioRecorder = (api_get_setting('service_ppt2lp','active')=='true' && api_get_setting('service_ppt2lp','path_to_lzx')!='') ? true : false;
 	//check if audio recorder needs to be in studentview
 	$course_id=$_SESSION["_course"]["id"];
-	if($_SESSION["status"][$course_id]==5){
+	if($_SESSION["status"][$course_id]==5)
+	{
 		$audio_recorder_studentview = true;
 	}
-	else{
+	else
+	{
 		$audio_recorder_studentview = false;
 	}
 	//set flag to ensure lp_header.php is loaded by this script (flag is unset in lp_header.php)

+ 4 - 5
main/newscorm/lp_view_item.php

@@ -69,11 +69,6 @@ $language_file = "learnpath";
 	Header and action code
 -----------------------------------------------------------
 */ 
-$currentstyle = api_get_setting('stylesheets');
-$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'css/'.$currentstyle.'/learnpath.css"/>';
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='learnpath.css' />"; //will be a merged with original learnpath.css
-$htmlHeadXtra[] = "<link rel='stylesheet' type='text/css' href='dtree.css' />"; //will be moved
-$htmlHeadXtra[] = "<script src='dtree.js' type='text/javascript'></script>"; //will be moved
 /*
 -----------------------------------------------------------
 	Constants and variables
@@ -143,6 +138,10 @@ $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_
 
 $interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}"));
 
+//Theme calls
+$show_learn_path=true;
+$lp_theme_css=$_SESSION['oLP']->get_theme();
+ 
 Display::display_header(null,'Path');
 //api_display_tool_title($therow['name']);
 

+ 19 - 0
main/newscorm/scorm.class.php

@@ -701,6 +701,25 @@ class scorm extends learnpath {
 	 		return false;
 	 	}
 	 }
+	 
+	 /**
+	 * Sets the theme setting in the database
+	 * @param	string	theme setting
+	 */
+	 function set_theme($theme=''){
+		if($this->debug>0){error_log('In scorm::set_theme('.$theme.') method',0);}
+	 	$lp = $this->get_id();
+	 	if($lp!=0){
+	 		$tbl_lp = Database::get_course_table('lp');
+	 		$sql = "UPDATE $tbl_lp SET theme = '$theme' WHERE id = ".$lp;
+	 		$res = api_sql_query($sql);
+	 		return $res;
+	 	}else{
+	 		return false;
+	 	}
+	 }
+	 
+	 
 	/**
 	 * Sets the content maker setting in the database
 	 * @param	string	Proximity setting