Procedural File: courses.php
Source Location: /main/auth/courses.php
Page Details:
Tags:
Includes:
browse_courses [line 299]
allows you to browse through the course categories (faculties) and subscribe to the courses of this category (faculty)
Tags:
browse_courses_in_category [line 367]
HTML browse_courses_in_category(
)
|
|
Display all the courses in the given course category. I could have used a parameter here but instead I use the already available $_GET['category']
Tags:
browse_course_categories [line 325]
HTML browse_course_categories(
)
|
|
displays the browsing of the course categories (faculties)
Tags:
count_courses_in_category [line 311]
void count_courses_in_category(
$category)
|
|
counts the number of courses in a given course category
Parameters
courses_subscribing [line 288]
void courses_subscribing(
)
|
|
handles the display of the courses to which the user can subscribe
Tags:
delete_course_category [line 506]
string delete_course_category(
$id, int $id:)
|
|
deletes a course category and moves all the courses that were in this category to main category
Tags:
Parameters
| int |
$id: |
the id of the user_course_category |
| |
$id |
|
display_category_icons [line 947]
html: display_category_icons(
$current_category $current_category, $all_user_categories)
|
|
displays the relevant icons for the category (if applicable):move up, move down, edit, delete
Tags:
Parameters
| $current_category |
$current_category |
the id of the current category $allcategories an associative array containing all the categories. |
| |
$all_user_categories |
|
display_change_course_category_form [line 996]
html display_change_course_category_form(
$edit_course, string $edit_course:)
|
|
This function displays the form (dropdown list) to move a course to a different course_category (after the edit icon has been changed)
Tags:
Parameters
| string |
$edit_course: |
|
| |
$edit_course |
|
display_courses [line 710]
html display_courses(
$user_id, $show_course_icons, $user_courses, int $user_id:)
|
|
displays everything that is needed when the user wants to manage his current courses (sorting, subscribing, unsubscribing, ...)
Tags:
Parameters
| int |
$user_id: |
the user_id of the current user string $parameter: determines weither we are displaying for the sorting, subscribing or unsubscribin |
| |
$user_id |
|
| |
$show_course_icons |
|
| |
$user_courses |
|
display_courses_in_category [line 764]
string: display_courses_in_category(
int $user_category_id, $showicons)
|
|
This function displays all the courses in the particular user category;
Tags:
Parameters
| int |
$user_category_id |
id: the id of the user defined course category |
| |
$showicons |
|
display_course_icons [line 888]
html display_course_icons(
$key, $key: $number_of_courses, $course, $user_courses)
|
|
displays the subscribe icon if the subscribing is allowed and if the user is not yet subscribed to this course
Tags:
Parameters
| $key: |
$number_of_courses |
$course $user_courses |
| |
$key |
|
| |
$course |
|
| |
$user_courses |
|
display_create_course_category_form [line 562]
HTML display_create_course_category_form(
)
|
|
displays the form that is needed to create a course category.
Tags:
display_edit_course_category_form [line 1135]
html display_edit_course_category_form(
$edit_course_category, string $edit_course:)
|
|
Tags:
Parameters
| string |
$edit_course: |
|
| |
$edit_course_category |
|
display_info_text [line 1124]
string: display_info_text(
$text, string $text:)
|
|
Tags:
Parameters
| string |
$text: |
the text that has to be written in grey |
| |
$text |
|
display_search_courses [line 397]
HTML display_search_courses(
)
|
|
displays the form for searching for a course and the results if a query has been submitted.
Tags:
display_subscribe_icon [line 854]
string display_subscribe_icon(
$current_course, $user_coursecodes, string $current_course:)
|
|
displays the subscribe icon if the subscribing is allowed and if the user is not yet subscribe to this course
Tags:
Parameters
| string |
$current_course: |
the course code of the course we need to display the subscribe icon for |
| |
$current_course |
|
| |
$user_coursecodes |
|
display_subscribe_to_courses [line 418]
void display_subscribe_to_courses(
$courses)
|
|
This function displays the list of course that can be subscribed to. This list can come from the search results or from the browsing of the platform course categories
Parameters
display_unsubscribe_icons [line 1029]
html display_unsubscribe_icons(
$course, array $course:)
|
|
This function displays the unsubscribe part which can be - the unsubscribe link
- text: you are course admin of this course (=> unsubscription is not possible
- text: you are not allowed to unsubscribe from this course
Tags:
Parameters
| array |
$course: |
the array with all the course & course_rel_user information |
| |
$course |
|
get_courses_of_user [line 1055]
array get_courses_of_user(
$user_id, int $user_id:)
|
|
retrieves all the courses that the user has already subscribed to
Tags:
Parameters
| int |
$user_id: |
the id of the user |
| |
$user_id |
|
get_user_course_categories [line 1085]
array get_user_course_categories(
)
|
|
retrieves the user defined course categories
Tags:
get_user_course_categories_info [line 1104]
array get_user_course_categories_info(
)
|
|
Retrieves the user defined course categories and all the info that goes with it
Tags:
get_user_course_category [line 833]
string: get_user_course_category(
int $id)
|
|
gets the title of the user course category
Tags:
Parameters
| int |
$id |
id: the id of the user defined course category |
move_category [line 666]
string move_category(
string $direction, $category2move)
|
|
Moves the course one place up or down
Tags:
Parameters
| string |
$direction |
: the direction we are moving the course to (up or down) string $course2move : the course we are moving |
| |
$category2move |
|
move_course [line 618]
string move_course(
string $direction, $course2move, $category)
|
|
moves the course one place up or down
Tags:
Parameters
| string |
$direction |
: the direction we are moving the course to (up or down) string $course2move : the course we are moving |
| |
$course2move |
|
| |
$category |
|
remove_user_from_course [line 263]
string remove_user_from_course(
int $user_id, string $course_code)
|
|
unsubscribe the user from a given course
Tags:
Parameters
| int |
$user_id |
The user id of the user that is performing the unsubscribe action |
| string |
$course_code |
the course code of the course the user wants to unsubscribe from |
search_courses [line 483]
array search_courses(
$search_term, string $search_term:)
|
|
Search the courses database for a course that matches the search term. The search is done on the code, title and tutor field of the course table.
Tags:
Parameters
| string |
$search_term: |
the string that the user submitted, what we are looking for |
| |
$search_term |
|
store_changecoursecategory [line 598]
string store_changecoursecategory(
string $course_code, $newcategory)
|
|
stores the changes in a course category (moving a course to a different course category)
Tags:
Parameters
| string |
$course_code |
: the course_code of the course we are moving int $newcategory : the id of the user course category we are moving the course to. |
| |
$newcategory |
|
store_course_category [line 528]
string store_course_category(
)
|
|
stores the user course category in the dokeos_user database
Tags:
store_edit_course_category [line 1151]
string store_edit_course_category(
)
|
|
Updates the user course category in the dokeos_user database
Tags:
subscribe_user [line 222]
string subscribe_user(
string $course_code)
|
|
Subscribe the user to a given course
Tags:
Parameters
| string |
$course_code |
the code of the course the user wants to subscribe to |
|
|