Adaptable Theme Short Course Name in Course Blocks on Front Page

Adaptable Theme Short Course Name in Course Blocks on Front Page

by Lynn MacDonald -
Number of replies: 8

I have been looking through all the settings in Adaptable, but I cannot find how show the course short names in the front page blocks instead of the full course name. (I can find how to have the short course name in the header, but not in the course blocks.) If it is something simple, apologies for missing it. If it is not, could someone recommend the custom CSS required to do so?


Moodle Version 3.10.3+ Build 20210427
php 7.2.34
Theme: Adaptable release 3.10.1.2, version 202122302 with the following custom CSS:
.headerbgimage {
background-size: contain;
background-position: 0px 5px
}

h1 {
font-size: 16px;
}


Average of ratings: -
In reply to Lynn MacDonald

Re: Adaptable Theme Short Course Name in Course Blocks on Front Page

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Use this -> https://docs.moodle.org/310/en/Course_list#Display_extended_course_names. I'm also bemused as why you think that CSS is the solution? I'm intrigued by your thinking, please explain.
In reply to Gareth J Barnard

Re: Adaptable Theme Short Course Name in Course Blocks on Front Page

by Lynn MacDonald -
Thanks, Gareth. Please take the following in the kindest way possible: I do not know if it is a cultural difference between Canada and the UK, but the choice of the wording in this reply comes across as demeaning. That being said, under the assumption that you are not attempting to shame me, I will give an answer. I was going to type CSS or Java and decided that it is a design choice, so it would probably be found in styles somewhere.
In reply to Lynn MacDonald

Re: Adaptable Theme Short Course Name in Course Blocks on Front Page

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Dear Lynn,

My intention is purely investigational. I tried very hard to construct the sentence so that it did not come across as demeaning, but clearly did not succeed 100%. I have no intent to shame you, but rather understand the thinking. There are so many questions that have attached to them words along the lines of 'What's the CSS solution to this please', when the actual solution is at the other end of the spectrum, being the server, which is PHP based - the client / server - model / view / controller ideas. I've been pondering this for ages, so just thought I'd ask that's all. By understanding each other and our different perspectives, then we can get along and help each other more. Think of it as empathy and seeing somebody else's point of view in a positive light.

Need to eat! I may reply later with more questions.

Kind regards,

Gareth
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Adaptable Theme Short Course Name in Course Blocks on Front Page

by Lynn MacDonald -
Thanks, Gareth. I am more than willing to answer questions of the nature of "what are people thinking?" My background is physics, math, computers and networking, biology, and education; I hope I can eventually help out with the Moodle project in some way. I have HTML knowledge from way back when, but have not had much opportunity to dig into CSS and Linux, so I'm a bit of a hack when it comes to Moodle and Linux servers. I just returned to a position where I will be taking care of the company Moodle in addition to other work. I am currently updating it as the site has not been updated for 5 1/2 years. I am trying to avoid asking annoying questions, but I need to get on Udemy or somewhere to get up to speed on everything that has gone on behind the scenes since the early days of the web. This is way off topic, so now I will stop. But if you ever have questions about where beginners or novices are coming from, ask away.
In reply to Lynn MacDonald

Re: Adaptable Theme Short Course Name in Course Blocks on Front Page

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
There is no such thing as a 'annoying' question if you don't know the answer.

So, to combine both contexts here, the general and the Moodle. Moodle uses PHP combined with data in a Database to generate (at the server -> can be Linux) the HTML that is combined with CSS to style the output of the page, combined with JavaScript to make it dynamic at the client end, being the web browser. Thus, theme wise if its to do with the look then its likely to be a CSS thing (ignoring that it could be SCSS - same sort of thing), if its to do with the content of the page then its likely to be a PHP thing or possibly a JavaScript thing (which actually can use PHP indirectly with a technology called AJAX).  So when you're looking at issues and scratching your head, then I hope this helps with the initial investigation of 'where to look' for a possible answer.

In this specific case, I looked at the output (in the browser with web development tools - key F12), found a related CSS class in the mark up, searched the theme PHP (using Notepad++ - a Windows based text editor) for where that was outputted, traced the call stack back to find the point where the name of the course was retrieved, then worked forward following the function trail until I discovered the core setting that could be enabled and then used with the functionality that had been put in place to discover how altering that special language string could allow you to set the short instead of the full name for the course. Then knowing the setting name, then allowed me to find its settings page on the UI, and then find the 'Moodle docs' link at the bottom.

Thus, a little bit of knowledge of how things work, went a long way to help with the detective process of finding the solution. I hope this does not come across as patronising, it is not my intent. My intent here is to help and educate, so that you're not relying on me (or others), and the time delay that implies, to solve every problem you encounter, again not intended as patronising, but as a positive thing for you.

And... Java and JavaScript are two completely different things!  This confuses lots of people.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Adaptable Theme Short Course Name in Course Blocks on Front Page

by Lynn MacDonald -
Thanks. It is the content of the 3rd paragraph which is most helpful, along with the link you provided earlier. I am usually much more self-sufficient. Jumping into a project with a deadline in an environment one only knows in part is a bit of a challenge to one's capabilities. I've spent so much time going through each clickable link in the site administration over the last week that I was getting careless when writing for help. The Java/Javascript error was sloppy on my part.

Now the issue is that on the course list it shows both names without a separator:
Demonstration of issue

If I put a separator in,
Demonstration of a possible quick fix.
Then it shows up in the course navigation.
Demonstration of newly created issue.
So I'm probably going to use something from the Font Awesome Icons to separate them, which might also help distinguish the courses from one another. Once I get it up and running, I might get time to be able to learn more about customizing, but for now I just need it working and looking decent. Adaptable is a large part of why it looks as good as it does. I'm just frustrated with my own lack of knowledge of its inner workings and lack of time to learn them at this point.
In reply to Lynn MacDonald

Re: Adaptable Theme Short Course Name in Course Blocks on Front Page

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
What is the new value of 'courseextendednamedisplay' in your language pack please Lynn?
In reply to Gareth J Barnard

Re: Adaptable Theme Short Course Name in Course Blocks on Front Page

by Lynn MacDonald -
Before you pointed me in the right direction with the question, it looked like this:
Original setting - default
and now that I changed it to
Changed language string
it is perfect. Thank you.