Course OVerview Timeline Tab - Moodle 3.3.+

Re: Course OVerview Timeline Tab - Moodle 3.3.+

by Flotter Totte -
Number of replies: 5
Picture of Plugin developers

I figured out how to modify the theme in order to get rid of the "course" view tab (pint "3." in my previous post).

Add below code to your custom CSS of your theme:

.block-myoverview .nav.nav-tabs li.nav-item :nth-child(1) {
    display: none;
}

This will eliminate the "timeline" tab. So now there is only the "course" tab left. As there now is only this one left, you actually also can delete this one, too - ie. hide both of them - by adding this custom CSS to your custom

.block-myoverview .nav.nav-tabs {
    display: none;
}

This will eliminate both tabs.

Btw: You can realize this as admin in your moodle system, you do not need to change any files. And don't forget to set the right default view in the block's settings.

Best,

Flotter




In reply to Flotter Totte

Re: Course OVerview Timeline Tab - Moodle 3.3.+

by Dan Logan -

Thank you Flotter for your help this is perfect.

Would you also happen to know how I can hide the "Future" button from showing in the course overview block?


In reply to Dan Logan

Re: Course OVerview Timeline Tab - Moodle 3.3.+

by Pixi Flyer -

Hi All

I am trying to achieve similar, however the other way around, to i need timeline view, not course, this i have sorted out, but the "sort by date" and "sort by course" i want to swop around so "sort by course is first and active... 

I can see where it sits, just the tabs are not adjustable, and i am not sure where the page renders..

So this is where it sits in the main.mustache:

<div role="tabpanel" class="tab-pane fade {{#viewingtimeline}}in active{{/viewingtimeline}}" id="myoverview_timeline_view">

            {{> block_myoverview/timeline-view }}

        </div>

HOW to swtich them around i think is jQuery but i am not to sure where to find the tab preferences.


I hope this makes sense.


Thank you!!



In reply to Dan Logan

Re: Course OVerview Timeline Tab - Moodle 3.3.+

by Pixi Flyer -

Hi Dan

I believe you would need to do something similar to what i am looking for regarding the tabs, also waiting for a reply maybe someone can help.

It is referenced in the main.mustache file as block_myoverview/courses-view, however that is jQuery and i am searching for it myself...will let you know if i find it because that's where it sits the little sneaky things smile

In reply to Dan Logan

Re: Course OVerview Timeline Tab - Moodle 3.3.+

by Pixi Flyer -

Hi Dan

I found it for you also.


You need to get here in the boostrappbase folder:

/theme/bootstrapbase/templates/block_myoverview

There is a file called course-view.mustache.. this is the render for those tabs, copy or clone this file to your own theme folder /theme/mytheme/templates/block_myoverview...

Open it in an editor and remove or comment out this section:

 <div class="tab-pane fade" id="myoverview_courses_view_future">

            {{#future}}

                {{< block_myoverview/courses-view-by-status }}

                    {{$id}}courses-view-future{{/id}}

                    {{$status}}2{{/status}}

                    {{$pagingbarid}}pb-for-future{{/pagingbarid}}

                    {{$pagingcontentid}}pc-for-in-progress{{/pagingcontentid}}

                {{/ block_myoverview/courses-view-by-status }}

            {{/future}}

            {{^future}}

                <div class="text-xs-center text-center m-t-3">

                    <img class="empty-placeholder-image-lg"

                         src="{{urls.nocourses}}"

                         alt="{{#str}} nocoursesfuture, block_myoverview {{/str}}"

                         role="presentation">

                    <p class="text-muted m-t-1">{{#str}} nocoursesfuture, block_myoverview {{/str}}</p>

                </div>

            {{/future}}

        </div>


That is that! just Make sure you clone this file to your theme!