Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/chat/lib.php File Reference

Go to the source code of this file.

Namespaces

namespace  mod
 

Local Library of functions for module scorm.


Functions

if($oldusers=$DB->
get_records_select('chat_users',
$query, $params)) 
chat_update_chat_times ($chatid=0)
 chat_format_message_manually ($message, $courseid, $sender, $currentuser, $chat_lastrow=NULL)
 chat_format_message ($message, $courseid, $currentuser, $chat_lastrow=NULL)
 chat_format_message_theme ($message, $chatuser, $currentuser, $groupingid, $theme= 'bubble')
 chat_format_userlist ($users, $course)
 chat_print_error ($level, $msg)
 chat_get_view_actions ()
 chat_get_post_actions ()
 chat_print_overview ($courses, &$htmlarray)
 chat_reset_course_form_definition (&$mform)
 chat_reset_course_form_defaults ($course)
 chat_reset_userdata ($data)
 chat_get_extra_capabilities ()
 chat_supports ($feature)
 chat_extend_navigation ($navigation, $course, $module, $cm)
 chat_extend_settings_navigation (settings_navigation $settings, navigation_node $chatnode)
 chat_user_logout ($user)
 chat_page_type_list ($pagetype, $parentcontext, $currentcontext)

Variables

global $CHAT_HTMLHEAD = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\"><html><head></head>\n<body>\n\n".padding(200)
global $CHAT_HTMLHEAD_JS
 $params = array($timeold, $timeoldext)

Function Documentation

chat_extend_navigation ( navigation,
course,
module,
cm 
)

Definition at line 1247 of file lib.php.

Here is the call graph for this function:

Adds module specific settings to the settings block

Parameters:
settings_navigation$settingsThe settings navigation object
navigation_node$chatnodeThe node to add module settings to

Definition at line 1296 of file lib.php.

Here is the call graph for this function:

chat_format_message ( message,
courseid,
currentuser,
chat_lastrow = NULL 
)

object

Parameters:
object$message
int$courseid
object$currentuser
string$chat_lastrow
Returns:
bool|string Returns HTML or false

Given a message object full of information, this function formats it appropriately into text and html, then returns the formatted data.

Definition at line 881 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

chat_format_message_manually ( message,
courseid,
sender,
currentuser,
chat_lastrow = NULL 
)

object object

Parameters:
object$message
int$courseid
object$sender
object$currentuser
string$chat_lastrow
Returns:
bool|string Returns HTML or false

Parse the text to clean and filter it

It's a beep!

It's a user command

Format the message as a small table

Definition at line 752 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

chat_format_message_theme ( message,
chatuser,
currentuser,
groupingid,
theme = 'bubble' 
)

object

Parameters:
object$messagemessage to be displayed.
mixed$chatuseruser chat data
object$currentusercurrent user for whom the message should be displayed.
int$groupingidcourse module grouping id
string$themename of the chat theme.
Returns:
bool|string Returns HTML or false

Parse the text to clean and filter it

It's a beep!

It's a user command

Definition at line 908 of file lib.php.

Here is the call graph for this function:

chat_format_userlist ( users,
course 
)

object $DB object $CFG object $COURSE object $OUTPUT

Parameters:
object$users
object$course
Returns:
array return formatted user list

Definition at line 1078 of file lib.php.

Returns all other caps used in module

Returns:
array

Definition at line 1222 of file lib.php.

Returns:
array

Definition at line 1118 of file lib.php.

Returns:
array

Definition at line 1111 of file lib.php.

chat_page_type_list ( pagetype,
parentcontext,
currentcontext 
)

Return a list of page types

Parameters:
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block

Definition at line 1335 of file lib.php.

chat_print_error ( level,
msg 
)

Print json format error

Parameters:
string$level
string$msg

Definition at line 1097 of file lib.php.

chat_print_overview ( courses,
&$  htmlarray 
)

object object

Parameters:
array$courses
array$htmlarrayPassed by reference

Definition at line 1128 of file lib.php.

Here is the call graph for this function:

Course reset form defaults.

Parameters:
object$course
Returns:
array

Definition at line 1177 of file lib.php.

Implementation of the function for printing the form elements that control whether the course reset functionality affects the chat.

Parameters:
object$mformform passed by reference

Definition at line 1166 of file lib.php.

chat_reset_userdata ( data)

Actual implementation of the reset course functionality, delete all the chat messages for course $data->courseid.

object object

Parameters:
object$datathe data submitted from the reset course.
Returns:
array status array

updating dates - shift may be negative too

Definition at line 1190 of file lib.php.

Here is the call graph for this function:

chat_supports ( feature)
Parameters:
string$featureFEATURE_xx constant for requested feature
Returns:
mixed True if module supports feature, null if doesn't know

Definition at line 1231 of file lib.php.

if ($oldusers=$DB->get_records_select('chat_users', $query, $params)) chat_update_chat_times ( chatid = 0)

Updates chat records so that the next chat time is correct

object

Parameters:
int$chatid
Returns:
void

Updates chat records so that the next chat time is correct

Definition at line 692 of file lib.php.

Here is the call graph for this function:

chat_user_logout ( user)

user logout event handler

Parameters:
object$userfull $USER object

Definition at line 1324 of file lib.php.


Variable Documentation

$CHAT_HTMLHEAD = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\"><html><head></head>\n<body>\n\n".padding(200)

Definition at line 26 of file lib.php.

$CHAT_HTMLHEAD_JS
Initial value:
"text/javascript">

function move(){
    if (scroll_active)
        window.scroll(1,400000);
    window.setTimeout("move()",100);
}
var scroll_active = true

Definition at line 33 of file lib.php.

$params = array($timeold, $timeoldext)

Definition at line 666 of file lib.php.

 All Data Structures Namespaces Files Functions Variables Enumerations