davidherney / moodle-format_onetopic

Course format Onetopic to LMS Moodle
GNU General Public License v3.0
19 stars 44 forks source link

Ability to configure the heading format defaults #124

Open elisajdu opened 1 year ago

elisajdu commented 1 year ago

As pointed out in another Issue, the heading formats revert to defaults when a person switches to another format and then back to OneTopic. Additionally, the default format isn't ideal for most cases. It doesn't provide contrast to emphasize the existence of tabs.

Would it be possible to

  1. create administrator settings that set the default heading format?
  2. save the user-configured heading formats?

Thank you, Elisa

davidherney commented 1 year ago

Hi @elisajdu

Can you explain me more about it? It isn't clear to me. Maybe can propose any graphic explanation.

Saludos

elisajdu commented 1 year ago

On the server I am currently using, the default Header is shown below. image

I can go into each section and manually set the Header parameters. image

So that the Header looks like this image

In the first, the tabs are not obvious. They do not stand out. They do in the second. The second also matches the institutional color scheme. HOWEVER, if I were to switch to another format and then switch back, the Header would revert to defaults and I would have to manually set the Header in each section again.

It would be EXCEEDINGLY CONVENIENT if the administrators could set the defaults and if the Header format would be saved if a person changes format. A user could still override the defaults, but at least the default matches the institutional color scheme.

Please advise if you have any additional questions.

Thx

davidherney commented 1 year ago

Hi @elisajdu ...

The correct way to change it (institutionally) is in the Moodle theme level. The changes in the theme impact all the platform.

You can add a single CSS in the moodle theme to apply the change:

.format-onetopic .onetopic .nav-tabs > li > a { background-color: rgb(140, 32, 4); color: rgb(255, 255, 255); }

Can you add this CSS? Or, can you only change the course properties?

Saludos

elisajdu commented 1 year ago

@davidherney

Got it, Thanks!

elisajdu commented 1 year ago

Sorry. Just getting around to this now.

This is what it looks like manually setting the parameters in each tab:

image

Using the custom CSS code below, I get .format-onetopic .onetopic .nav-tabs > li > a { background-color: rgb(168,51,50); color: rgb(255,255,255); font-weight: bold; }

image

davidherney commented 1 year ago

I applied your CSS code... this is the result

imagen

RogueAgent991 commented 1 year ago

Same person. Different account.

Very interesting.

I'm using Cognito theme in Moodle 4.1.1 I have tested on Opera, Firefox, and Safari, and confirmed the following:

CSS code: image

Result: image

And like I mentioned previously, if I manually enter the values for each section, it works as expected. image

Should the theme have any impact on implementation? Would you like to test with the theme?

RogueAgent991 commented 1 year ago

Tried it with Boost theme as well. Same issue.

Also found this in the code. element style is empty, despite custom CSS being input.

image

element style is populated when entering code for each section.

image

RogueAgent991 commented 1 year ago

This code works.

.format-onetopic .nav-tabs > li > a { background-color: rgb(168,51,50) !important; color: rgb(255,255,255) !important; font-weight: bold; }

davidherney commented 1 year ago

Ok... for Moodle 4.x is different. The @RogueAgent991 proposal is close but I change something in order to exclude the new Moodle configuration tabs.

.format-onetopic .course-content .nav-tabs > li > a {
  background-color: rgb(168,51,50) !important;
  color: rgb(255,255,255) !important;
  font-weight: bold;
  margin-right: 1px;
}

imagen

RogueAgent991 commented 1 year ago

Excellent. Thank you.