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

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}}


To display the session dates directly on the course page, add the following
=Code to add=
code to the print_section() function in course/lib.php:


--- /cvs/moodle18/course/lib.php 2007-10-05 20:19:29.000000000 +1300
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:
+++ course/lib.php 2007-11-06 21:14:08.000000000 +1300
 
@@ -1382,6 +1382,10 @@
  } elseif ($mod->modname == 'facetoface') {
                          echo "</span>";
    include_once($CFG->dirroot.'/mod/facetoface/lib.php');
                      }
    echo facetoface_print_coursemodule_info($mod);
   
 
+                } elseif ($mod->modname == 'facetoface') {
=Where to add the code=
+                    include_once($CFG->dirroot.'/mod/facetoface/lib.php');
 
+                    echo facetoface_print_coursemodule_info($mod);
In between this block:
  +
 
                  } else { // Normal activity
  if ($mod->modname == "label") {
 
                      //Accessibility: for files get description via icon.
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:

Ftof01.png