Home > Dokkeos, English, Techie > Redirecting the course homepage

Redirecting the course homepage

In some very specific cases, Dokeos users might want to redirect a course’s homepage to one of the sub-elements of the course. This is not possible via the Dokeos web interface, but you can easily modify the default behaviour by changing the dokeos/courses/[COURSE_DIR]/index.php file.

Inside that file, you will find something like this:

<?php
$cidReq = “ABC”;
$dbname = “ABC”;

include(“../../main/course_home/course_home.php”);
?>

This effectively presets the course environment and then includes the course homepage.

You can change this by commenting all that code and directly pointing to a document, for example:

<?php

header(‘location:/courses/ABC/document/index.html?cidReq=PNB’);

?>

Note that if you have mod_rewrite enabled in Apache, and have activated the .htaccess mecanism, this will be sent to a download.php script which will check permissions to access this document before showing it to the user.

Done.

Categories: Dokkeos, English, Techie
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: