Virtual course support
From Dokeos
Virtual courses / Combining courses / linking courses
This document describes the design and implementation of the idea of virtual courses, also called linked courses or combined courses. Many organisations (especially universities) want this functionality and it takes a lot of code to add this to Dokeos.
Toon Vanhoecke and Olivier Cauberghe created the first version of course linking code. The version of this feature for the official Dokeos cvs is being programmed by Roan Embrechts and Bart Mollet. This later development improves upon some aspects of the first version and integrates the feature into the main Dokeos code to eliminate the necessity for all universities that want this to re-invent the wheel. Additional requested features can always be added. Meanwhile tools like the agenda and announcements are becoming more group based, which is also helpful for virtual course users support.
Contents |
Definitions
A Dokeos virtual course is a course that looks to students just like any other course. They can subscribe to it, surf to it and use the visible tools of that course. Underneath the surface, this virtual course is connected to another course, with which it shares a storage space (course directory and course database).
Why is this needed? Universities often generate course lists for teachers based on official university course database. Often, a teacher teaches a certain course, e.g. Psychology 101, to several different groups. In the official university program, the course can be listed as many different courses: Psychology 101-A for first year psychology students, Psychology 101-B for second year criminology students, etcetera. The teacher often does not want separate Dokeos courses for this, as it would mean a duplication of his efforts: uploading the same slides into two document tools, making most announcements twice, ...
Virtual courses can make life easier for the teacher by reducing workload and increasing the overview, it becomes easier to see who is busy with the course, it's easier to create mixed students groups...
This is the first attempt to integrate such a thing in standard Dokeos, and so it will not be perfect at all. We work in several small steps, gradually improving the implementation. Comments and requests are welcome, code contributions even more.
Software design
Creating a virtual course
At Ghent University, teachers could see a list of their official courses. They could create them as Dokeos course by clicking a create button, this was not done automatically. Linking a course could only be done when a course was not created yet. This approach solved a lot of problems for the programmers. However, teachers often had difficulty understanding the �linked courses� concept.
At the Vrije Universiteit Brussel things are slightly different. Most official courses have been created automatically by an admin script. The teachers rarely have to create courses themselves. VUB teachers also want to combine several courses, but these are already created courses.
(Technical) So what do you do when combining two existing courses? Ideally the contents of course B are merged with the contents of course A, after that the directory and database of course B are deleted, and in the course table the directory and database of course B are set to the directory and database of course A, and the target_course_id field of course B is filled with the course ID of course A.
STATUS
- Done: platform administrators can create virtual courses in the normal admin tool (code in CVS)
- Done: VUB teachers can combine courses in their �official courses� overview. This combines two existing courses, so this updates database entries instead of create them, and remove a course database and directory. (code not yet in CVS). Course content from a course that becomes a linked course is not yet automatically merged (but Bart Mollet has a tool ready with code that allows to do that).
- To do: a real course that has virtual courses linked to it, may not become a virtual course itself (we could allow this, but at too high a cost for bugs and maintainability) .
- To do: The list of courses to which you can link a course, should not contain the current course itself.
- To do: Put more of the code that is currently in VUB specific scripts but can be used for Dokeos in general into the CourseManager class and commit to CVS
�Unlinking� a virtual course
This means:
- two courses have been combined. The teacher now wants to un-combine them, make them into separate courses again; or
- two courses have been combined. The teacher wants to remove the virtual course link to the real course.
STATUS
- Done: teachers can "break a link" - and delete virtual courses. When they do so, the removed virtual course immediately becomes a real course again � VUB does not allow teachers to really delete courses.
- To do: course admins cannot yet remove virtual courses in standard Dokeos code. Bring this possibility from VUB specific scripts to Dokeos library. The platform admin can delete virtual courses from the standard course module section, this does not delete the storage space because there is still a "real" course that uses the same storage space...
Course homepage
Suppose there are two courses, A and B, that are combined. A student is usualy registered only for one of these courses. When a student goes to the homepage of course B, he/she wants to see the course title and course code of B, not A.
What happens with a teacher who is registered (as course admin) for both courses? I assume the teacher wants to be aware of the fact that course A and B are combined, so it makes sense to tell this in the course homepage: the title becomes �(combined course) title A and title B�.
STATUS
Done, all code in CVS. Users who go to a course see as course title the title of the course or courses they are subscribed to. This can e.g. exist of the real course title and a virtual course title, or three virtual course titles... The same happens for the course codes. Perhaps the html layout can be improved.
Tools (general)
Some tools (groups, users) need a lot of changes to take virtual courses into account. Others require online a minor change or even no changes at all (documents, chat, forum).
This development is ongoing - some tools already work, others don't.
User tool
The user tool of a course A normally displays only persons registered in course A, not virtual course B that is combined with A. This tool will need some changes. It's probably best to organise the user list into different sections, e.g. This course combines two courses, A and B persons registered for course A ... persons registered for course B ...
STATUS
- Done: show list of users in real course and in virtual courses.
- Done: a user only sees the lists for the courses he / she is registered in. This means the course admin sees all lists as it should be. (Note: the platform admin should see all lists too!)
- Done: create correct student view, test anonymous user view.
Exception: in the teacher user interface, a teacher can only combine courses of which he/she is course admin. The platform admin can create a virtual course linked to any real course, this might cause a few strange cases.
Announcements / messages tool
This tool can send messages by email. Currently this tool will send an email only to users registered in the real course, not users in virtual courses.
STATUS
- Since community release 2.0: sending messages to selected / all users takes users from linked courses into account
Idea: put users of different virtual/real courses into different groups by default, so the teacher can easily send an announcement to only one of these groups. Note: dokeos has some very small support for "classes", it may be a good idea to develop this further.
Course settings
This needs some thought: do you want the visibility of the real course and all virtual courses linked to it to be the same? What if you want to change the name of the virtual course and not the real course? Some changes are required. STATUS no changes at the moment, this needs discussion.
Group tool
Universities: students who register themselves or get registered into a course: they ae automatically organised in groups, one group for every �class� of students. Example: a course on psychology, with two classes: �first year of psychology� and �second year of criminology�, both groups of students follow the same course and are in different groups inside the course.
Status: done. You can manually add students from real and linked virtual courses to a group, you can fill randomly the correct list of students, students from virtual courses can register / unregister themselves.
Todo: new feature request: automatically create groups based on the course the user is subscribed in (this creates groups of classes of users).
Note: research the new classes admin function in Dokeos, can this help? This can provide organisation of students in classes independent of courses, that might be useful. STATUS no changes at the moment.
Deleting a virtual course
Proposal: the real course to which the virtual course is linked is not deleted also (seems logical). Deleting a virtual course means deleting an entry in the main course database deleting all entries in the student_course table that correspond so subscriptions in the virtual course that gets deleted ?cleanup of groups in the real course, remove group that belonged to students registered in virtual course? ... STATUS platform admins can delete virtual courses through the normal course ovrview module in the admin tool. Course admins can not yet delete virtual courses.
Deleting a real course that has virtual courses linked to it There are several possible scenarios for this. STATUS no changes at the moment. The VUB does not allow teachers to delete courses, so this is currently not a priority.
Database structure
We need an extra field in main course table called target_course_id. To add it manually, execute the instruction
ALTER TABLE `cours` ADD `target_course_id` INT( 11 ) DEFAULT '0' NOT NULL ;
I chose INT(11) because the existing field cours_id is INT(11). The extra field gets added automatically with a new Dokeos install.
When this field is 0, the course is a normal course. When it contains a valid course id, the course is a virtual course that is combined with another course. When it contains a non-valid course id, somewhere an error has occcured.
STATUS: Done - the field gets created upon install, and when updating. UPDATE - this field has been changed to hold the course code (string) instead of id (integer), Dokeos now standardizes on the course code as the one unique identier for a course.
Code structure
The new course library (lib/course.lib.php) provides an API layer to handle this new feature. The existing database and display library provide assistance.
Notes
Difference between shortcuts (windows) aliases (macintosh) and links (linux) will be helpful here. Which one is best for what we want? For the moment we take the shortcut / alias approach, the Linux link-like approach would take longer to implement.
Example queries, see course.lib.php for the real functions:
Select all virtual courses linked to a certain course (id 10, so target_course_id = 10), to which a certain user (id 1) is registered:
SELECT * FROM `cvs_dokeos_main`.`cours` course SELECT * FROM `cours` WHERE 1 LEFT JOIN `cvs_dokeos_main`.`cours_user` course_user ON course.`code` = course_user.`code_cours` WHERE course.`target_course_id` = '10' AND course_user.`user_id` = '1'
Select all real courses (target_course_id is 0) of which a certain user (id 1525) is course admin (status 1)
SELECT * FROM `dokeos_main`.`cours` course LEFT JOIN `dokeos_main`.`cours_user` course_user ON course.`code` = course_user.`code_cours` WHERE course.`target_course_id` = '0' AND course_user.`user_id` = '1525' AND course_user.`statut` = '1'
Status
This development is partially complete. The code that is ready, is mostly already in the CVS, with on exception: the interface for teachers to combine two existing courses. One thing we'd like to see is using the built-in Dokeos "classes" concept for organising the users. This is also a very genric approach that could more easily be reused by other organisations to organise large numbers of students into (combined or not) courses.
Complete enough to use
- admin interface (create new virtual course, display list of virtual courses, don't delete storage space when deleting a virtual course)
- course homepage
- database, course library
- group tool
- user tool
Already working, no further changes needed
- documents tool
- dropbox
- learning path
- start page (index.php)
- student publications
No changes were needed at all:
- agenda
- announcements
- chat
- forum
Could use an extra feature
- admin tools - the ability to combine courses
- user tool
Needs improvement
List of things to be addressed
- (busy) statistics of users in virtual courses - storing and displaying are both incorrect
- the user info of users in virtual courses does not show the local role correctly
- the view (and other) rights of users in virtual courses are not properly taken into account
- combining existing courses, breaking links...
- what's new notification icons: a teacher adds an announcement to a course A, that means students enrolled in course B linked to course A should also get a "new annoncement" notification.
- ...
Fixed in Dokeos community release 2.0
- Announcements tool - sending messages to selected / all users should take users from linked courses into account
- Deleting a course through the course settings left the virtual courses linked to a nonexisting course. Deleting through the platform admin section also removed the linked courses. This has been solved, deleting a course through the course settings now also deletes the linked courses.
- If anyone wants to improve this solution, we could make the warning about virtual courses optional, displaying it only when there actually are linked virtual courses, and list their titles.

