Name |
OneTopic (a.k.a. Un tema a la vez) |
Module type |
Course format |
Author |
David Herney Bernal GarcĂa |
Released |
2009 |
Maintained |
Actively |
Languages |
English, Spanish (but should work in any language) |
Compliance |
Good |
Documentation |
Online documentation (Spanish only) |
Errors |
None |
This format takes the method of displaying a single topic at a time, used in the standard Topics format, and simplifies this with tabs at the top of each section
Unzip the module's source directory to /moodle/course/format/
. You can then use the format straight away.
Visit the Settings page for your course and scroll down in the General settings area to the Format setting. Choose the Topics in tabs format (not to be confused with the Topics Tabs format described earlier), then save the settings.
The OneTopic format, or as it is written in Spanish, the "Un tema a la vez" format, applies a keep-it-simple philosophy to minimizing use of page space, while adding a level of usability not present in the standard Topics format. With the standard Topics format it is possible to select and focus on one topic or week, then move to other sections by selecting them from the Jump to... drop-down menu.
When selected, the OneTopic format forces the course page to be shown one section at a time. To navigate to other sections, the user can click on the appropriate tab at the top of the page. This is more convenient and obvious than the Jump to... menu (which is still made available).
The tabs are named according to the titles of each section on the course page.
When a tab is selected, the whole page reloads. This is not as convenient as jumping to the section without having to reload the page, but it works solidly.
The format uses the tabs that are part of the Moodle HTML library, so these will blend in nicely with any theme that you may be using. The tabs will also function as the user expects.
Because the OneTopic format does not attempt to use any fancy dynamic overlay to present the course page, normal Ajax functionality still works as expected, which means you can move, promote, demote, hide, and delete without reloading the page.
One aspect that you might wish to change is the numbering on Topic tabs. Because this format is simple, the coding is also easy to change.
Open the file /moodle/course/format/onetopic/format.php
and scroll down to line 126 and you should find the following:
'<font style="white-space:nowrap">' . s($section.$strsummary) . "</font>", s($section.$strsummary));
Change this line by removing the $section
variable and the full stop used to concatenate this string to the next. You should end up with the following version of the line:
'<font style="white-space:nowrap">' . s($strsummary) . "</font>", s($strsummary));
Scroll up to around line 116 and you will see where the $strsummary
variable is set. To remove the dashes from the strings, delete that' - '
and the following concatenation (full stop) operator. Be sure to do this for both the if
and else
blocks. You should end up with the following lines of code:
if (strlen($strsummary) < 57) { $strsummary = $strsummary; } else { $strsummary = substr($strsummary, 0, 60).'...'; }
After saving these changes, the tabs should appear unnumbered at the top of the course page.