Project

General

Profile

Bug #6976

scorm.css file missing for some themes

Added by Hubert Borderiou almost 6 years ago. Updated almost 6 years ago.

Status:
Bug resolved
Priority:
Normal
Category:
Styles, Layout & Accessibility
Target version:
Start date:
10/02/2014
Due date:
% Done:

100%

Estimated time:
8.00 h
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

Hi,

in css new theme, scorm.css file somtetime missing.
It is in themes
font_awesome
journal
kiddy
readable
simplex
spacelab

scorm display css instructions are duplicated in file base.css

It is really a problem, because it is harder to add scrom css style for learning path, because they are overwritten by file base.css

It would be good to add a scorm.css file for themes above, and to remove student learning path CSS display from file base.css

Associated revisions

Revision fa1052c2 (diff)
Added by baelmyhu almost 6 years ago

Adding advanced CSS personalization for Learning Path -ref #6976

Revision e02c0b51
Added by Hubert Borderiou almost 6 years ago

Merge pull request #217 from baelmyhu/1.9.x

Adding advanced CSS personalization for Learning Path -ref #6976

Revision 4f308680 (diff)
Added by baelmyhu almost 6 years ago

Add file default_scorm.css -ref #6976

Revision 67356021
Added by Yannick Warnier almost 6 years ago

Merge pull request #260 from baelmyhu/1.9.x

Insert user csv in class & file main/css/default_scorm.css refs #6680 and refs #6976

History

#1

Updated by Hubert Borderiou almost 6 years ago

We should move some CSS rules in scorm.css existing files, and add a scorm.css file in themes

font_awesome
journal
kiddy
readable
simplex
spacelab

I want to add a $_configuration['enable_css_learningpath_personalization '] = false;
It will use the new classes defined for css only if option selected in version 1.10
(or if you cahnge the false to true in the file)

New class added are
.scorm_item_level_{level_number}
.scorm_section_level_{level_number}
.scorm_type_document
.scorm_type_quiz
etc... {level_number} from 0 to the depth of the LP tree
.scorm_type_{scorm_item_type} avec {scorm_item_type} le nom de l'outil dans le LP

#2

Updated by Hubert Borderiou almost 6 years ago

Actually, i don't have to add a configuration variable like $_configuration['enable_css_learningpath_personalization ']

I just have to modify all existing css themes.

But people with personalized themes will have to modify it.

#3

Updated by Hubert Borderiou almost 6 years ago

  • Status changed from New to Needs testing
  • Estimated time set to 8.00 h
#4

Updated by Yannick Warnier almost 6 years ago

  • Status changed from Needs testing to Needs more info
  • Assignee set to Hubert Borderiou
  • % Done changed from 0 to 50

Sorry Hubert, but I'm not sure I understand the objective of your commit.
Inside the commit itself, you are removing code from a main/css/scorm.css file to many different, isolated, files, when the objective of CSS is (between others) to reduce redundancy... Now we have around 8 different copies of the scorm.css styles, and that's a bit more dangerous and against reduction of code.

#5

Updated by Hubert Borderiou almost 6 years ago

The aim of my work is to be able to personalize Learning Path student view.
With the current files, I couldn't easily change LearningPath student view for a specific theme, because, CSS order where overwrittent with the default one.

It works like that :
- if you have no scorm.css file in the theme repository, you use the default_scorm.css file in the main/css folder
- if you have a scorm.css file in the theme directoiry, you use it instead of the default_scorm.css

You can see it in main/inc/lib/template.lib.php function set_css_file

        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');
            }
        }

I've copied the scorm.css files in current themes folder where there were already a scorm.css file (already a duplicated css code)
But we can factorize it now.

I add file main/css/default_scorm.css
https://github.com/baelmyhu/chamilo-lms/commit/4f30868067da8788758310c295fce78ac0ec5210

#6

Updated by Yannick Warnier almost 6 years ago

Look into commits by aragonc, he's the one in charge of the CSS refresh.
In general terms, we have now changed the load order and you should:
  • load the default_scorm.css in all cases
  • then load scorm.css, redefining some of the styles of default_scorm.css

This being said, I know that sometimes it just doesn't work that way, so for me (and in the context of 1.9.8) I have no problem accepting the way you did it, as long as it doesn't break anything outside of learning paths.

#7

Updated by Yannick Warnier almost 6 years ago

  • Status changed from Needs more info to Bug resolved
  • % Done changed from 50 to 100

Merged your PR. I think this is fixed now. Let me know if it isn't.

Also available in: Atom PDF