dokeos-library
[ class tree: dokeos-library ] [ index: dokeos-library ] [ all elements ]

Procedural File: add_course.lib.inc.php

Source Location: /main/inc/lib/add_course.lib.inc.php



Page Details:

This is the course creation library for Dokeos.

It contains functions to create a course. Include/require it in your code to use its functionality.




Tags:

todo:  clean up horrible structure, script is unwieldy, for example easier way to deal with different tool visibility settings: ALL_TOOLS_INVISIBLE, ALL_TOOLS_VISIBLE, CORE_TOOLS_VISIBLE...


Includes:

include_once(api_get_path(LIBRARY_PATH).'database.lib.php') [line 35]
This is the course creation library for Dokeos.

It contains functions to create a course. Include/require it in your code to use its functionality.




Tags:

todo:  clean up horrible structure, script is unwieldy, for example easier way to deal with different tool visibility settings: ALL_TOOLS_INVISIBLE, ALL_TOOLS_VISIBLE, CORE_TOOLS_VISIBLE...






browse_folders [line 1361]

void browse_folders( $path, $files, $media)



Parameters

   $path  
   $files  
   $media  
[ Top ]



checkArchive [line 2015]

void checkArchive( $pathToArchive)

WARNING: this function always returns true.



Parameters

   $pathToArchive  
[ Top ]



create_course [line 51]

true create_course( $wanted_code, $title, $tutor_name, $category_code, $course_language, $course_admin_id, $db_prefix, $firstExpirationDelay)

Not tested yet.

We need this new function so not every script that creates courses needs to be changed when the behaviour necessary to create a course changes. This will reduce bugs.




Tags:

return:  if the course creation was succesful, false otherwise.


Parameters

   $wanted_code  
   $title  
   $tutor_name  
   $category_code  
   $course_language  
   $course_admin_id  
   $db_prefix  
   $firstExpirationDelay  
[ Top ]



define_course_keys [line 84]

array define_course_keys( $wantedCode $wantedCode, [string $prefix4all = ""], [ $prefix4baseName = ""], [ $prefix4path = ""], [ $addUniquePrefix = false], [ $useCodeInDepedentKeys = true])

Defines the four needed keys to create a course based on several parameters.



Tags:

return:  with the needed keys ["currentCourseCode"], ["currentCourseId"], ["currentCourseDbName"], ["currentCourseRepository"]
todo:  eliminate globals


Parameters

$wantedCode   $wantedCode   the code you want for this course
string   $prefix4all   prefix // prefix added for ALL keys
   $prefix4baseName  
   $prefix4path  
   $addUniquePrefix  
   $useCodeInDepedentKeys  
[ Top ]



fill_course_repository [line 1404]

void fill_course_repository( $courseRepository)

Fills the course repository with some example content.



Tags:

version:  1.2


Parameters

   $courseRepository  
[ Top ]



fill_Db_course [line 1568]

void fill_Db_course( $courseDbName, $courseRepository, $language, $default_document_array)

Fills the course database with some required content and example content.



Tags:

version:  1.2


Parameters

   $courseDbName  
   $courseRepository  
   $language  
   $default_document_array  
[ Top ]



lang2db [line 1558]

string lang2db( string $string)

Function to convert a string from the Dokeos language files to a string ready to insert into the database.



Tags:

return:  The string converted to insert into the database
author:  Bart Mollet (bart.mollet@hogent.be)


Parameters

string   $string   The string to convert
[ Top ]



prepare_course_repository [line 211]

void prepare_course_repository( $courseRepository, $courseId)



Parameters

   $courseRepository  
   $courseId  
[ Top ]



readPropertiesInArchive [line 2020]

void readPropertiesInArchive( $archive, [ $isCompressed = TRUE])



Parameters

   $archive  
   $isCompressed  
[ Top ]



register_course [line 1892]

void register_course( $courseSysCode, $courseScreenCode, string $courseRepository, string $courseDbName, $titular, string $category, string $title, string $course_language, $uidCreator, [ $expiration_date = ""], $teachers, string $courseId, string $courseCode, string $tutor_name, string $uid)

function register_course to create a record in the course table of the main database



Parameters

string   $courseId  
string   $courseCode  
string   $courseRepository  
string   $courseDbName  
string   $tutor_name  
string   $category  
string   $title   complete name of course
string   $course_language   lang for this course
string   $uid   uid of owner
   $courseSysCode  
   $courseScreenCode  
   $titular  
   $uidCreator  
   $expiration_date  
   $teachers  
[ Top ]



sort_pictures [line 1389]

void sort_pictures( $files, $type)



Parameters

   $files  
   $type  
[ Top ]



string2binary [line 1868]

void string2binary( string $variable)

function string2binary converts the string "true" or "false" to the boolean true false (0 or 1)

This is used for the Dokeos Config Settings as these store true or false as string and the api_get_setting('course_create_active_tools') should be 0 or 1 (used for the visibility of the tool)




Tags:

author:  Patrick Cool, patrick.cool@ugent.be


Parameters

string   $variable  
[ Top ]



update_Db_course [line 262]

void update_Db_course( $courseDbName)



Parameters

   $courseDbName  
[ Top ]



Documentation generated on Wed, 05 Sep 2007 06:14:17 +0200 by phpDocumentor 1.4.0