General developer forum

New tabs and functionalities in block myoverview

 
Picture of Manuel Mohedano
New tabs and functionalities in block myoverview
 

Hello, all... We're trying to add a new tabs in 'myoverview' block to show, also, some categories/subcatories and the courses they include (something similar to /course/index.php).

We have created succesfully the new tabs in templates/.mustache files and included these definitions in lib.php and settings.php.

As a first test, we have duplicated the 'classes/output/courses_view.php' file with the name of the new option tab and changed the name of the class, but it didn't work.

....

class othercourses_view implements renderable, templatable {

    /** Quantity of courses per page. */
    const COURSES_PER_PAGE = 6;

.....

.....

/block/myoverview/classes/output/ directory:


Is it possible to do this? Is it possible to use this block to show in new tabs (after overwriting the necessary functions) things that are not courses (categories and subcategories, tags ...)?

Thanks in advance for your time.

Pd: We are using Moodle 3.5


 
Average of ratings: -
Picture of Richard Oelmann
Re: New tabs and functionalities in block myoverview
Core developersParticularly helpful MoodlersPlugin developersTesters

Yes, it is possible.

Gareth Barnard did some development work for my university earlier this year that reworked the tabs on the overview dashboard - it may be worth contracting him to do something similar for you, according to your requirements. We started though by cloning the block in the first place so changes were made to a clone, not to the core block.

But worth bearing in mind, going forward, that the block appears to have had a fairly major rewrite in 3.6, so changes you make now may not be easily maintainable in future.

 
Average of ratings: -