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

Procedural File: filter_user.lib.php

Source Location: /plugin/search/client/filter_user.lib.php



Page Details:

This script declares a set of functions that will enable authorization check for a user's access to a course directory, as well as course name translations for search results display.



Tags:

author:  Yannick Warnier <yannick.warnier@dokeos.com>
filesource:  Source Code for this file
uses:  The - Dokeos main api library to execute database queries
uses:  The - Dokeos database library, to access the tables using its facilities








access_check [line 64]

boolean access_check( string $url, [ $default = true])

Check course URL to get a course code and check it against user permissions

Make this function always return true when no check is to be done




Tags:

return:  True on user having access to the course or course not found, false otherwise


Parameters

string   $url   URL to check
   $default  
[ Top ]



get_boolean_user_access_to_course_dir [line 20]

boolean get_boolean_user_access_to_course_dir( integer $user_id, string $course_dir)

Checks if a user can access a given course

The function gets the course code from the course directory, then checks in the course_user table if the user has access to that course.




Tags:

return:  True if user has access, false otherwise


Parameters

integer   $user_id   User ID (inside Dokeos)
string   $course_dir   Course directory
[ Top ]



subst_course_code [line 90]

void subst_course_code( string $string)

Translates a course code into a course name into a string

This function should only be used if needed by a funny course-name rule




Parameters

string   $string   The string to transform
[ Top ]



Documentation generated on Thu, 12 Jun 2008 13:29:54 -0500 by phpDocumentor 1.4.1