Quellcode durchsuchen

fix status and css scorm BT#9886 #TMI

aragonc vor 9 Jahren
Ursprung
Commit
1e209c110c

+ 9 - 281
app/Resources/public/css/base.css

@@ -94,6 +94,11 @@ select {
 .carousel-indicators{
   bottom: 0px !important;
 }
+#updatemp3 .footer-audio{
+  padding-bottom: 10px;
+  padding-top: 10px;
+  margin-bottom: 20px;
+}
 ul#navigation {
   position: fixed;
   margin: 0px;
@@ -3450,119 +3455,7 @@ form .formw .freeze {
 /* ****************************************************
                      END SKILL
  **************************************************** */
-/*SCORM CSS BASE */
-#learning_path_left_zone .home{
-  display: inline-block;
-  width: 94%;
-  margin-bottom: .5em;
-  margin-top: .5em;
-  font-size: 12px;
-}
-#lp_navigation_elem .buttons {
-  margin-bottom: .5em;
-  text-align: center;
-}
-
-#learning_path_left_zone .scorm_title{
-  font-size: 20px;
-  color: #666;
-  margin-bottom: .5em;
-  margin-top: .5em;
-}
-/* for section */
-.scorm_item_section.scorm_completed{
-  background:url("../img/icon_completed_section.png")no-repeat 98% center #606c88;
-  padding-right: 1.5em;
-}
-.scorm_item_section{
-  background: #2b3d53; /* Old browsers */
-  background: -moz-linear-gradient(top, #2b3d53 0%, #2c3d4d 100%); /* FF3.6+ */
-  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2b3d53), color-stop(100%,#2c3d4d)); /* Chrome,Safari4+ */
-  background: -webkit-linear-gradient(top, #2b3d53 0%,#2c3d4d 100%); /* Chrome10+,Safari5.1+ */
-  background: -o-linear-gradient(top, #2b3d53 0%,#2c3d4d 100%); /* Opera 11.10+ */
-  background: -ms-linear-gradient(top, #2b3d53 0%,#2c3d4d 100%); /* IE10+ */
-  background: linear-gradient(to bottom, #2b3d53 0%,#2c3d4d 100%); /* W3C */
-  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2b3d53', endColorstr='#2c3d4d',GradientType=0 ); /* IE6-9 */
-  padding-top: 10px;
-  padding-bottom: 10px;
-  font-size: 14px;
-  color: #ffffff;
-  /* border-top-left-radius:5px;
-  border-top-right-radius: 5px;*/
-}
-.scorm_item_section .scorm_section_level_0{
-  padding-left: .5em;
-  padding-right: .5em;
-}
-.scorm_item_section .scorm_section_level_1{
-  padding-left: 1.5em;
-  padding-right: .5em;
-}
-.scorm_item_section .scorm_section_level_2{
-  padding-left: 2.5em;
-  padding-right: .5em;
-}
-.scorm_item_section .scorm_section_level_3{
-  padding-left: 3.5em;
-  padding-right: .5em;
-}
-/* items scorm*/
-.scorm_item_normal.scorm_completed {
-  background:url("../img/icon_completed.png") no-repeat 98% center;
-}
-.scorm_item_normal.scorm_failed{
-  background:url("../img/icon_failed.png") no-repeat 98% center;
-}
-.scorm_item_normal .scorm_item_level_0{
-  padding-left: .5em;
-  padding-right: 1.5em;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
-.scorm_item_normal{
-  padding:0;
-  border-bottom: 1px solid #DCDCDC;
-  border-left: 1px solid #DCDCDC;
-  border-right: 1px solid #DCDCDC;
-}
-.scorm_item_normal a{
-  color: #666666;
-  text-decoration: none;
-}.scorm_item_normal a:hover{
-   text-decoration: none;
- }
-.scorm_highlight{
-  background-color: #6AAEFF !important;
-}
-.scorm_highlight a{
-  color: #ffffff !important;
-}
-#scorm-info .panel-heading{
-  padding: 5px;
-}
-/* .scorm_item_normal .scorm_item_level_1{
-  padding-left: 1.8em;
-  padding-right: 1.5em;
-  background:url("../img/level_one.png") no-repeat 0 top;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
-.scorm_item_normal .scorm_item_level_2{
-  padding-left: 2.5em;
-  padding-right: 1.5em;
-  background:url("../img/level_two.png") no-repeat 0 top;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
-.scorm_item_normal .scorm_item_level_3{
-  padding-left: 3.5em;
-  padding-right: 1.5em;
-  background:url("../img/level_tree.png") no-repeat 0 top;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}*/
 
-/* END SCORM CSS BASE*/
 .skill_root {
     box-shadow: 2px 2px 19px #aaa;
     -o-box-shadow: 2px 2px 19px #aaa;
@@ -5500,70 +5393,7 @@ i.size-32.icon-new-work{
   vertical-align: bottom;
   margin-right: 5px;
 }
-/* LP SCORM */
-/* Default LP left column values */
-
-#learning_path_left_zone {
-  float:left;
-  width:315px;
-  height:100%;
-  padding-left: 8px;
-  padding-right: 4px;
-}
-
-#learning_path_left_zone #header {
-  font-size:14px;
-}
-
-
-#author_image {
-  border: 1px solid #CCCCCC;
-  float: left;
-  margin: 0;
-  padding: 8px;
-  position: relative;
-  width: 100%;
-}
-
-#author_name {
-  float: left;
-  text-align:center;
-  width: 100%;
-  font-size: 11px;
-  color: #888;
-  margin-top: 2px;
-}
-
-#lp_media_file {
-  float: left;
-  text-align:center;
-  width: 94%;
-}
 
-#learning_path_toc {
-  font-size:9pt;
-  margin:0;
-}
-#learning_path_left_zone .image-avatar{
-  text-align: center;
-  padding: 10px;
-  border:1px solid #dddddd;
-  border-radius: 4px;
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  margin-bottom: 10px;
-  margin-top: 5px;
-}
-#learning_path_left_zone .navegation-bar .buttons{
-  text-align: center;
-  padding-top: 5px;
-  padding-bottom: 5px;
-  margin-bottom: 5px;
-}
-#learning_path_left_zone .description-autor{
-  color: #666666;
-  font-size: 12px;
-}
 .ui-state-highlight_lp {
   border: 1px solid #FEAA18;
   background: #FFB738;
@@ -5659,110 +5489,7 @@ ul.holder li.bit-box{
 #file-descrtiption.form-control{
   width: 80%;
 }
-#learning_path_breadcrumb_zone .breadcrumb{
-  background: #2b3d53; /* Old browsers */
-  background: -moz-linear-gradient(top, #2b3d53 0%, #2c3d4d 100%); /* FF3.6+ */
-  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2b3d53), color-stop(100%,#2c3d4d)); /* Chrome,Safari4+ */
-  background: -webkit-linear-gradient(top, #2b3d53 0%,#2c3d4d 100%); /* Chrome10+,Safari5.1+ */
-  background: -o-linear-gradient(top, #2b3d53 0%,#2c3d4d 100%); /* Opera 11.10+ */
-  background: -ms-linear-gradient(top, #2b3d53 0%,#2c3d4d 100%); /* IE10+ */
-  background: linear-gradient(to bottom, #2b3d53 0%,#2c3d4d 100%); /* W3C */
-  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2b3d53', endColorstr='#2c3d4d',GradientType=0 ); /* IE6-9 */
-  border-radius: 0;
-  -moz-border-radius: 0;
-  -webkit-border-radius: 0;
-  color: #ffffff;
-}
-#learning_path_breadcrumb_zone .breadcrumb a{
-  color: #ffffff;
-  text-decoration: none;
-}
-#learning_path_breadcrumb_zone .breadcrumb a:hover{
-  color: #dddddd;
-}
-#view_as_link{
-  margin-top: 5px;
-  margin-right: 10px;
-}
-#learning_path_left_zone #accordion .panel-heading{
-  text-align: center;
-}
-#learning_path_left_zone #ui-option{
-  width: 100%;
-  display: block;
-  text-align: center;
-  cursor: pointer;
-}
-#learning_path_left_zone #ui-option #icon-up,
-#learning_path_left_zone #ui-option #icon-down{
-  width: 100%;
-  display: block;
-}
-.hidden{
-  visibility: hidden;
-  display: none;
-}
-.sidebar-scorm,
-.content-scorm{
-  position: relative;
-  min-height: 1px;
-  padding-left: 15px;
-  padding-right: 15px;
-}
-.sidebar-scorm,
-.content-scorm{
-  float: left;
-}
-.total{
-  width: 100%;
-}
-.panel-default .panel-heading .btn{
-  top: -25px;
-}
-.panel-default .panel-heading .dropdown-menu{
-  top: 30%;
-}
 
-#touch-button{
-  text-decoration: none;
-  position: fixed;
-  top: 40px;
-  left: -5px;
-  overflow: hidden;
-  width: 51px;
-  height: 51px;
-  border: none;
-  text-indent: 100%;
-  opacity: 50;
-  z-index: 2;
-}
-.search-skill ul.holder_simple{
-  padding: 0;
-}
-.hidden-touch{
-  background: url("../img/icons/48/hidden-touch-left.png")center center no-repeat;
-}
-.show-touch{
-  background: url("../img/icons/48/show-touch-right.png")center center no-repeat;
-}
-.inner_lp_toc{
-  overflow-y:scroll;
-}
-.scorm-heading{
-  font-size: 16px;
-  font-weight: bold;
-  padding: 10px;
-}
-#control-bottom{
-  position: fixed;
-  bottom: 0;
-  width: 100%;
-  text-align: center;
-  left: 0;
-}
-#control-bottom.well{
-  margin-bottom: 0;
-}
 .session-course-edit .control{
   padding-top: 2em;
   padding-bottom: 2em;
@@ -6155,7 +5882,9 @@ div#chat-remote-video video {
 .content-scorm{
   width: 83.33333333%;
 }
-
+#learning_path_right_zone{
+    width: 68%;
+}
 }
 @media (min-width: 1024px) {
   .sidebar-scorm{
@@ -6307,5 +6036,4 @@ div#chat-remote-video video {
   .question-result .page-header h2{
     font-size: 20px;
   }
-}
-
+}

+ 184 - 59
app/Resources/public/css/scorm.css

@@ -3,11 +3,75 @@ File used to display Learning Path item in student view
 If scorm.css file exists in theme folder, scorm.css file is used instead of this one
 See https://support.chamilo.org/issues/6976
 */
+/* LP SCORM */
+/* Default LP left column values */
+
+#learning_path_left_zone {
+  float:left;
+  height:100%;
+  padding-left: 8px;
+  padding-right: 4px;
+}
+
+#learning_path_left_zone #header {
+  font-size:14px;
+}
+#scorm-info.panel-default{
+  margin: 0px;
+}
+
+#author_image {
+  border: 1px solid #CCCCCC;
+  float: left;
+  margin: 0;
+  padding: 8px;
+  position: relative;
+  width: 100%;
+}
+
+#author_name {
+  float: left;
+  text-align:center;
+  width: 100%;
+  font-size: 11px;
+  color: #888;
+  margin-top: 2px;
+}
+
+#lp_media_file {
+  float: left;
+  text-align:center;
+  width: 94%;
+}
+
+#learning_path_toc {
+  font-size:9pt;
+  margin:0;
+}
+#learning_path_left_zone .image-avatar{
+  text-align: center;
+  padding: 10px;
+  border:1px solid #dddddd;
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  margin-bottom: 10px;
+  margin-top: 5px;
+}
+#learning_path_left_zone .navegation-bar .buttons{
+  text-align: center;
+  padding-top: 5px;
+  padding-bottom: 5px;
+  margin-bottom: 5px;
+}
+#learning_path_left_zone .description-autor{
+  color: #666666;
+  font-size: 12px;
+}
 
 .inner_lp_toc {
     overflow: auto;
-    background-color: white;
-    height: 210px;
+    border-top: 1px solid #dcdcdc;
 }
 
 .inner_lp_toc .scorm_item a {
@@ -71,28 +135,6 @@ See https://support.chamilo.org/issues/6976
     border-color: rgba(255, 255, 255, 0.3);
 }
 
-.inner_lp_toc .scorm_item_1 {
-    border-bottom: 1px solid #CCCCCC;
-    background:#eee;
-    font-weight:bold;
-    color:#444;
-    text-shadow:0 1px 1px #f6f6f6;
-    margin-right: 1px;
-    text-decoration: none;
-    font-weight: normal;
-     background:#FDFDFD;
-}
-
-.inner_lp_toc .scorm_item_2 {
-    border-bottom: 1px solid #CCCCCC;
-    color: #444444;
-    font-weight: bold;
-    text-shadow: 0 1px 1px #F6F6F6;
-    margin-right: 1px;
-    text-decoration: none;
-    font-weight: normal;
-}
-
 .inner_lp_toc .scorm_item_section .scorm_item:before {
     content : url('../../img/lp_section.png');  /* path from main/newscorm/lp_controller.php file */
     vertical-align: text-top;
@@ -148,6 +190,111 @@ See https://support.chamilo.org/issues/6976
 .scorm_item_level_5 {
     padding : 0 0.5em 0 7.5em;
 }
+
+#learning_path_right_zone{
+  border-left: 1px solid #CCCCCC;
+  padding-left: 10px;
+  box-sizing: border-box;
+}
+#learning_path_breadcrumb_zone .breadcrumb{
+  background: #2b3d53; /* Old browsers */
+  background: -moz-linear-gradient(top, #2b3d53 0%, #2c3d4d 100%); /* FF3.6+ */
+  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2b3d53), color-stop(100%,#2c3d4d)); /* Chrome,Safari4+ */
+  background: -webkit-linear-gradient(top, #2b3d53 0%,#2c3d4d 100%); /* Chrome10+,Safari5.1+ */
+  background: -o-linear-gradient(top, #2b3d53 0%,#2c3d4d 100%); /* Opera 11.10+ */
+  background: -ms-linear-gradient(top, #2b3d53 0%,#2c3d4d 100%); /* IE10+ */
+  background: linear-gradient(to bottom, #2b3d53 0%,#2c3d4d 100%); /* W3C */
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2b3d53', endColorstr='#2c3d4d',GradientType=0 ); /* IE6-9 */
+  border-radius: 0;
+  -moz-border-radius: 0;
+  -webkit-border-radius: 0;
+  color: #ffffff;
+}
+#learning_path_breadcrumb_zone .breadcrumb a{
+  color: #ffffff;
+  text-decoration: none;
+}
+#learning_path_breadcrumb_zone .breadcrumb a:hover{
+  color: #dddddd;
+}
+#view_as_link{
+  margin-top: 5px;
+  margin-right: 10px;
+}
+#learning_path_left_zone #accordion .panel-heading{
+  text-align: center;
+}
+#learning_path_left_zone #ui-option{
+  width: 100%;
+  display: block;
+  text-align: center;
+  cursor: pointer;
+}
+#learning_path_left_zone #ui-option #icon-up,
+#learning_path_left_zone #ui-option #icon-down{
+  width: 100%;
+  display: block;
+}
+.hidden{
+  visibility: hidden;
+  display: none;
+}
+.sidebar-scorm,
+.content-scorm{
+  position: relative;
+  min-height: 1px;
+  padding-left: 15px;
+  padding-right: 15px;
+}
+.sidebar-scorm,
+.content-scorm{
+  float: left;
+}
+.total{
+  width: 100%;
+}
+.panel-default .panel-heading .btn{
+  top: -25px;
+}
+.panel-default .panel-heading .dropdown-menu{
+  top: 30%;
+}
+
+#touch-button{
+  text-decoration: none;
+  position: fixed;
+  top: 40px;
+  left: -5px;
+  overflow: hidden;
+  width: 51px;
+  height: 51px;
+  border: none;
+  opacity: 50;
+  z-index: 2;
+  font-size: 26px;
+}
+
+.inner_lp_toc{
+  overflow-y:scroll;
+}
+.scorm-heading{
+  font-size: 16px;
+  font-weight: bold;
+  padding: 10px;
+}
+#control-bottom{
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  left: 0;
+}
+#control-bottom.well{
+  margin-bottom: 0;
+}
+
+
+
 /*SCORM CSS BASE */
 #learning_path_left_zone .home{
   display: inline-block;
@@ -204,33 +351,32 @@ See https://support.chamilo.org/issues/6976
   padding-left: 3.5em;
   padding-right: .5em;
 }
-/* items scorm*/
-.scorm_item_normal.scorm_completed {
-  background:url("../img/icon_completed.png") no-repeat 98% center;
-}
-.scorm_item_normal.scorm_failed{
-  background:url("../img/icon_failed.png") no-repeat 98% center;
-}
+
 .scorm_item_normal .scorm_item_level_0{
-  padding-left: .5em;
+  /* padding-left: .5em;
   padding-right: 1.5em;
   padding-top: 10px;
   padding-bottom: 10px;
+  */
 }
 .scorm_item_normal{
   padding:0;
   border-bottom: 1px solid #DCDCDC;
-  border-left: 1px solid #DCDCDC;
-  border-right: 1px solid #DCDCDC;
 }
-.scorm_item_normal a{
+.scorm_item_normal a.items-list{
   color: #666666;
   text-decoration: none;
-}.scorm_item_normal a:hover{
+  display: block;
+  padding-left: 2em;
+  padding-right: 1.5em;
+  padding-top: 5px;
+  padding-bottom: 5px;
+}
+.scorm_item_normal a:hover{
    text-decoration: none;
- }
+}
 .scorm_highlight{
-  background-color: #6AAEFF !important;
+  background-color: #2B3D50 !important;
 }
 .scorm_highlight a{
   color: #ffffff !important;
@@ -238,26 +384,5 @@ See https://support.chamilo.org/issues/6976
 #scorm-info .panel-heading{
   padding: 5px;
 }
-/* .scorm_item_normal .scorm_item_level_1{
-  padding-left: 1.8em;
-  padding-right: 1.5em;
-  background:url("../img/level_one.png") no-repeat 0 top;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
-.scorm_item_normal .scorm_item_level_2{
-  padding-left: 2.5em;
-  padding-right: 1.5em;
-  background:url("../img/level_two.png") no-repeat 0 top;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
-.scorm_item_normal .scorm_item_level_3{
-  padding-left: 3.5em;
-  padding-right: 1.5em;
-  background:url("../img/level_tree.png") no-repeat 0 top;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}*/
 
 /* END SCORM CSS BASE*/

+ 14 - 0
app/Resources/public/css/themes/chamilo/learnpath.css

@@ -1,3 +1,17 @@
+/* items scorm*/
+.scorm_item_normal.scorm_completed {
+  background:url("images/scorm_completed.png") no-repeat left center;
+}
+.scorm_item_normal.scorm_failed{
+  background:url("images/scorm_failed.png") no-repeat left center;
+}
+.scorm_item_normal.scorm_not_attempted{
+  background:url("images/scorm_not_attempted.png") no-repeat left center;	
+}
+.scorm_item_normal.scorm_highlight{
+  background:url("images/scorm_highlight.png") no-repeat left center;	
+}
+
 div.text {
 	margin-left : 6;
 	margin-right : 6;

+ 7 - 8
main/inc/lib/template.lib.php

@@ -532,19 +532,18 @@ class Template
         global $disable_js_and_css_files;
         // Base CSS
         $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'base.css');
-        $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/default.css');
 
         if ($this->show_learnpath) {
-            $css[] = api_get_path(WEB_CSS_PATH).$this->theme.'/learnpath.css';
-
-            // if we have a SCORM file in theme, don't use default_scorm.css file
-            if (is_file(api_get_path(SYS_CSS_PATH).$this->theme.'/scorm.css')) {
-                $css[] = api_get_path(WEB_CSS_PATH).$this->theme.'/scorm.css';
-            } else {
-                $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'default_scorm.css');
+            $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'scorm.css');
+            if (is_file(api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/learnpath.css')) {
+                $css[] = api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/learnpath.css';
             }
         }
 
+        $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/default.css');
+
+
+
         $css_file_to_string = null;
         foreach ($css as $file) {
             $css_file_to_string .= api_get_css($file);

+ 6 - 3
main/newscorm/learnpath.class.php

@@ -3275,7 +3275,7 @@ class learnpath
                 $html .= stripslashes($title);
             } else {
                 $this->get_link('http', $item['id'], $toc_list);
-                $html .= '<a href="" onClick="switch_item(' .$mycurrentitemid . ',' .$item['id'] . ');' .'return false;" >' . stripslashes($title) . '</a>';
+                $html .= '<a class="items-list" href="" onClick="switch_item(' .$mycurrentitemid . ',' .$item['id'] . ');' .'return false;" >' . stripslashes($title) . '</a>';
             }
             $html .= "</div>";
 
@@ -5518,7 +5518,10 @@ class learnpath
 
             // We need to close the form when we are updating the mp3 files.
             if ($update_audio == 'true') {
-                $return .= '<div><button class="save" type="submit" name="save_audio" id="save_audio">' . get_lang('SaveAudioAndOrganization') . '</button></div>'; // TODO: What kind of language variable is this?
+                $return .= '<div class="footer-audio">';
+                $return .= Display::button('save_audio','<i class="fa fa-file-audio-o"></i> '. get_lang('SaveAudioAndOrganization'),array('class'=>'btn btn-primary','type'=>'submit'));
+                $return .= '</div>';
+                //$return .= '<div><button class="btn btn-primary" type="submit" name="save_audio" id="save_audio">' . get_lang('SaveAudioAndOrganization') . '</button></div>'; // TODO: What kind of language variable is this?
             }
         }
 
@@ -5610,7 +5613,7 @@ class learnpath
             }
 
             // The audio column.
-            $return_audio  .= '<td align="center">';
+            $return_audio  .= '<td align="left" style="padding-left:10px;">';
 
             $audio = '';
 

+ 2 - 2
main/template/default/layout/head.tpl

@@ -331,9 +331,9 @@ $(function() {
     }
 
     // Fixes buttons to the new btn class.
-    if (!$('#button').hasClass('btn')) {
+    /* if (!$('#button').hasClass('btn')) {
         $("button").addClass('btn');
-    }
+    } */
 
     // Dropdown effect.
     $('.dropdown-toggle').dropdown();

+ 1 - 3
main/template/default/learnpath/view.tpl

@@ -6,9 +6,7 @@
             </div>
         </div>
     {% endif %}
-
-    <a id="touch-button" class="hidden-touch" href="#"></a>
-
+    <button id="touch-button" class="btn btn-primary"><i class="fa fa-bars"></i></button>
     <div class="container-fluid">
         <div class="row">
             <div id="learning_path_left_zone" class="sidebar-scorm">