Integrating Face-to-face sessions on the course page: Difference between revisions
From MoodleDocs
(Add sidebar) |
(More explicit instructions, remove the patch) |
||
Line 1: | Line 1: | ||
{{Facetoface}} | {{Facetoface}} | ||
=Code to add= | |||
To display the session dates directly on the course page, you must add a couple of lines to the print_section() function in course/lib.php: | |||
} elseif ($mod->modname == 'facetoface') { | |||
include_once($CFG->dirroot.'/mod/facetoface/lib.php'); | |||
echo facetoface_print_coursemodule_info($mod); | |||
=Where to add the code= | |||
In between this block: | |||
if ($mod->modname == "label") { | |||
and the matching else clause: | |||
} else { // Normal activity | |||
The code goes just above the 'else' line just shown. | |||
On 1.9, it should be close to line 1347. | |||
=Result= | |||
It will look like this: | It will look like this: | ||
[[Image:Ftof01.png]] | [[Image:Ftof01.png]] |
Revision as of 00:22, 31 March 2008
Code to add
To display the session dates directly on the course page, you must add a couple of lines to the print_section() function in course/lib.php:
} elseif ($mod->modname == 'facetoface') { include_once($CFG->dirroot.'/mod/facetoface/lib.php'); echo facetoface_print_coursemodule_info($mod);
Where to add the code
In between this block:
if ($mod->modname == "label") {
and the matching else clause:
} else { // Normal activity
The code goes just above the 'else' line just shown.
On 1.9, it should be close to line 1347.
Result
It will look like this: