Integrating Face-to-face sessions on the course page

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.9. Up-to-date documentation for the latest stable version of Moodle may be available here: Integrating Face-to-face sessions on the course page.

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

1.9

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.

2.0+

NOTE: This section is written against the face-to-face version from Dongyoung Kim

Near line 1553

in between this block:

           // We may be displaying this just in order to show information
           // about visibility, without the actual link
           $contentpart = ;

and this block:

            if ($mod->uservisible) {
            // Nope - in this case the link is fully working for user

Be sure to change the if statement of the if ($mod->uservisible) { to elseif ($mod->uservisible) {

The resulting code should look like this:

           // We may be displaying this just in order to show information
           // about visibility, without the actual link
           $contentpart = ;
           if ($mod->modname == 'facetoface') { 
               include_once($CFG->dirroot.'/mod/facetoface/lib.php');
               echo facetoface_print_coursemodule_info($mod);
           } elseif ($mod->uservisible) {
               // Nope - in this case the link is fully working for user

Icon Fix

The Face to Face icon will not display without this modification to mod\facetoface\lib.php: Near line 2484, change

   $htmlactivitynameonly = '<img src="'.$CFG->pixpath.'/mod/facetoface/icon.gif" class="activityicon" alt="'.$facetoface->name.'" /> '

to

   $htmlactivitynameonly = '<img src="'.$CFG->pixpath.'http://<<myMoodleInstall>>/theme/image.php?theme=<<themeName>>&image=icon&rev=211&component=facetoface" class="activityicon" alt="'.$facetoface->name.'" /> '

Result

It will look like this:

Ftof01.png