chamilo / chamilo-lms

Chamilo is a learning management system focused on ease of use and accessibility
https://chamilo.org
GNU General Public License v3.0
798 stars 480 forks source link

Fix styling in wrong place #1789

Open marshel opened 7 years ago

marshel commented 7 years ago

Current behavior / Resultado actual / Résultat actuel

Agenda events are green when are they are course events. Cannot change on .css because the style is set inside the agenda.lib.php and the style is inserted inline on the HTML. So adding the css id to the template can't change the color because inline css is precendent over the css style file. This is bad because the color is off the .css and can't be changed without changing a system file.

Expected behavior / Resultado esperado / Résultat attendu

Adding a id/line on .css template file overrides the default color.

line 46 of agenda.lib.php // Event colors $this->event_platform_color = 'red'; //red $this->event_course_color = '#2e75a3'; // was changed to blue. yhe green is #458B00 $this->event_group_color = '#A0522D'; //siena $this->event_session_color = '#00496D'; // kind of green $this->eventOtherSessionColor = '#999'; $this->event_personal_color = 'steel blue'; //steel blue }

Chamilo Version / Versión de Chamilo / Version de Chamilo

1.11.2

suggested fix

Use the 'case' on php to set the id of the tag and add those ids on the css file.

jmontoyaa commented 7 years ago

This could be done in different ways. By adding a configuration.php setting or by a CSS change. Is more easy to add a configuration.php value something like:

$_configuration['agenda_colors'] = [
    ' platform' => '#ff0',
    ' course' => '#ff0'
];

I didn't test if the JS lib could work with CSS changes.

ywarnier commented 7 years ago

Not assigning an expected Chamilo version for this. This is very low priority.

ywarnier commented 7 years ago

@marshel Just so you don't get me wrong: we value your contribution, but we have to continuously juggle between our normal work and our free contributions to the community. This is clearly something that doesn't affect the normal working order of Chamilo, so it's not urgent to solve it (like any feature request), and it is also very unlikely that a large number of users will use this "feature" once implemented (I'm just saying that from experience, I don't have numbers to prove that assessment, sorry).

marshel commented 7 years ago

I am not bothered by the priority. @ywarnier be at ease 👍 . I know the team is small and a community rather than a company.

I just think that bug reports should be made regardless, so when someone changes the file, it could be also changing this.

There are so many legacy code on Chamilo that any project design changes (and new modules) may be better new than changing old code. Gnome 2 to 3 evolution, X.org to wayland are examples (in my point of view). That not changes that chamilo 1.11 is a great platform to get things done.

As a sysOP and LMS manager, Chamilo has a lot of functions, and thus, some with usability differences, hard to find configuration places, theming, and old documentation. This is hard to fix with our little community. I already had 7 projects with Chamilo since last year. 4 successful and 3 still going on; I expect that in the future my company sees the Open source contribuition as a way to enhance its products and as a goal (but we are yet a small team without big projects and code experience).

My job time is taken and I don't have enought knowledge yet on git, but, in time, I will try to pull changes to the repo and help the project .

best regards!

ywarnier commented 7 years ago

This task shouldn't be closed. Just left without specific version goal just yet. You did right in that sense. I'm not objecting on that.