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:
Includes:
browse_folders [line 1361]
void browse_folders(
$path, $files, $media)
|
|
Parameters
checkArchive [line 2015]
void checkArchive(
$pathToArchive)
|
|
WARNING: this function always returns true.
Parameters
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:
Parameters
| |
$wanted_code |
|
| |
$title |
|
| |
$tutor_name |
|
| |
$category_code |
|
| |
$course_language |
|
| |
$course_admin_id |
|
| |
$db_prefix |
|
| |
$firstExpirationDelay |
|
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:
Parameters
| $wantedCode |
$wantedCode |
the code you want for this course |
| string |
$prefix4all |
prefix // prefix added for ALL keys |
| |
$prefix4baseName |
|
| |
$prefix4path |
|
| |
$addUniquePrefix |
|
| |
$useCodeInDepedentKeys |
|
fill_course_repository [line 1404]
void fill_course_repository(
$courseRepository)
|
|
Fills the course repository with some example content.
Tags:
Parameters
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:
Parameters
| |
$courseDbName |
|
| |
$courseRepository |
|
| |
$language |
|
| |
$default_document_array |
|
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:
Parameters
| string |
$string |
The string to convert |
prepare_course_repository [line 211]
void prepare_course_repository(
$courseRepository, $courseId)
|
|
Parameters
| |
$courseRepository |
|
| |
$courseId |
|
readPropertiesInArchive [line 2020]
void readPropertiesInArchive(
$archive, [ $isCompressed = TRUE])
|
|
Parameters
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 |
|
sort_pictures [line 1389]
void sort_pictures(
$files, $type)
|
|
Parameters
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:
Parameters
update_Db_course [line 262]
void update_Db_course(
$courseDbName)
|
|
Parameters
|