Procedural File: courses.php
Source Location: /main/auth/courses.php
Page Details:
Tags:
Includes:
browse_courses [line 327]
Allows you to browse through the course categories (faculties) and subscribe to the courses of this category (faculty)
Tags:
browse_courses_in_category [line 396]
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 353]
HTML browse_course_categories(
)
|
|
displays the browsing of the course categories (faculties)
Tags:
count_courses_in_category [line 339]
void count_courses_in_category(
$category)
|
|
Counts the number of courses in a given course category
Parameters
courses_subscribing [line 316]
void courses_subscribing(
)
|
|
handles the display of the courses to which the user can subscribe
Tags:
delete_course_category [line 536]
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 987]
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 1036]
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 744]
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 797]
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 927]
html display_course_icons(
$key, $key: $number_of_courses, $course)
|
|
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 |
|
display_create_course_category_form [line 590]
HTML display_create_course_category_form(
)
|
|
displays the form that is needed to create a course category.
Tags:
display_edit_course_category_form [line 1178]
html display_edit_course_category_form(
$edit_course_category, string $edit_course:)
|
|
Tags:
Parameters
| string |
$edit_course: |
|
| |
$edit_course_category |
|
display_info_text [line 1167]
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 426]
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 887]
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 448]
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 1070]
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 1098]
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 1128]
array get_user_course_categories(
)
|
|
retrieves the user defined course categories
Tags:
get_user_course_categories_info [line 1147]
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 867]
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 696]
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 646]
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 291]
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 513]
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 626]
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 557]
string store_course_category(
)
|
|
stores the user course category in the dokeos_user database
Tags:
store_edit_course_category [line 1195]
string store_edit_course_category(
)
|
|
Updates the user course category in the dokeos_user database
Tags:
subscribe_user [line 249]
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 |
|
|