Bug #6976
scorm.css file missing for some themes
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
History
Updated by Hubert Borderiou almost 7 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
Updated by Hubert Borderiou almost 7 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.
Updated by Hubert Borderiou almost 7 years ago
- Status changed from New to Needs testing
- Estimated time set to 8.00 h
Updated by Yannick Warnier almost 7 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.
Updated by Hubert Borderiou almost 7 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
Updated by Yannick Warnier almost 7 years ago
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.
Updated by Yannick Warnier almost 7 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.
Adding advanced CSS personalization for Learning Path -ref #6976