scrolling="yes" marginwidth="10" marginheight="10" frameborder="0" />
<frame src="refresh.php?id=<?php p($user->id)?>&name=<?php echo urlencode(fullname($user)) ?>" name="refresh"
scrolling="no" marginwidth="0" marginheight="0" frameborder="0" />
-
+
<frame src="send.php?id=<?php p($user->id)?>" name="send"
scrolling="no" marginwidth="2" marginheight="2" frameborder="0" />
</frameset>
$options = new object();
$options->para = false;
$options->newlines = true;
-
+
$params = array('uid1'=>$USER->id ,'userid1'=>$userid, 'start1'=>$start, 'uid2'=>$USER->id ,'userid2'=>$userid, 'start2'=>$start);
if ($newonly) {
$lastsql1 = " AND timecreated > :last1";
if ($messages = $DB->get_records_select('message_read', "(useridto = :uid1 AND useridfrom = :userid1 AND timeread > :start1 $lastsql1) OR (useridto = :userid2 AND useridfrom = :uid2 AND timeread > :start2 $lastsql2)", $params)) {
foreach ($messages as $message) {
$time = userdate($message->timecreated, get_string('strftimedatetimeshort'));
-
+
if ($message->useridfrom == $USER->id) {
$fullname = $mefullname;
} else {
if ($messages = $DB->get_records_select('message', "useridto = :userid1 AND useridfrom = :uid1 $lastsql1", $params)) {
foreach ($messages as $message) {
$time = userdate($message->timecreated, get_string('strftimedatetimeshort'));
-
+
if ($message->fullmessageformat == FORMAT_HTML){
$printmessage = format_text($message->fullmessagehtml, $message->fullmessageformat, $options, 0);
} else{
}
}
/*Get still to be read message, use message/lib.php funtion*/
- $messages = message_get_popup_messages($USER->id, $userid);
+ $messages = message_get_popup_messages($USER->id, $userid);
if ($messages) {
foreach ($messages as $message) {
$time = userdate($message->timecreated, get_string('strftimedatetimeshort'));
-
+
if ($message->fullmessageformat == FORMAT_HTML){
$printmessage = format_text($message->fullmessagehtml, $message->fullmessageformat, $options, 0);
} else{
$sortkey = $message->timecreated."$i";
}
$allmessages[$sortkey] = $printmessage;
-
+
if ($message->timecreated < $start) {
$start = $message->timecreated; // move start back so that we see all current history
}
if ($course->id != SITEID) {
require_login($course);
-} else {
+} else {
if (!isloggedin()) {
if (empty($SESSION->wantsurl)) {
$SESSION->wantsurl = $CFG->httpswwwroot.'/message/edit.php';
redirect("$CFG->wwwroot/message/edit.php?id=$user->id&course=$course->id");
}
-/// Load preferences
+/// Load preferences
$preferences = new object();
/// Get providers preferences
/// For every processors put its options on the form (need to get function from processor's lib.php)
$processors = $DB->get_records('message_processors');
-foreach ( $processors as $processorid => $processor){
+foreach ( $processors as $processorid => $processor){
$processorfile = $CFG->dirroot. '/message/output/'.$processor->name.'/message_output_'.$processor->name.'.php';
if ( is_readable($processorfile) ) {
include_once( $processorfile );
$strparticipants = get_string('participants');
$userfullname = fullname($user, true);
-if (has_capability('moodle/course:viewparticipants', $coursecontext) ||
+if (has_capability('moodle/course:viewparticipants', $coursecontext) ||
has_capability('moodle/site:viewparticipants', $systemcontext)) {
$PAGE->navbar->add($strparticipants, new moodle_url($CFG->wwwroot.'/message/index.php', array('id'=>$course->id)));
}
echo $OUTPUT->footer();
-?>
\ No newline at end of file
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package message
*/
-
+
require('../config.php');
require('lib.php');
echo $OUTPUT->footer();
-?>
\ No newline at end of file
$PAGE->set_generaltype('popup');
$PAGE->set_title(get_string('messages', 'message').' - '.format_string($SITE->fullname));
echo $OUTPUT->header();
-echo '<table cellspacing="2" cellpadding="2" border="0" width="95%" class="boxaligncenter">';
+echo '<table cellspacing="2" cellpadding="2" border="0" width="95%" class="boxaligncenter">';
echo '<tr>';
/// Print out the tabs
echo '<td>';
$tabrow = array();
-$tabrow[] = new tabobject('contacts', $CFG->wwwroot.'/message/index.php?tab=contacts',
+$tabrow[] = new tabobject('contacts', $CFG->wwwroot.'/message/index.php?tab=contacts',
get_string('contacts', 'message'));
-$tabrow[] = new tabobject('search', $CFG->wwwroot.'/message/index.php?tab=search',
+$tabrow[] = new tabobject('search', $CFG->wwwroot.'/message/index.php?tab=search',
get_string('search', 'message'));
-$tabrow[] = new tabobject('settings', $CFG->wwwroot.'/message/index.php?tab=settings',
+$tabrow[] = new tabobject('settings', $CFG->wwwroot.'/message/index.php?tab=settings',
get_string('settings', 'message'));
$tabrows = array($tabrow);
-print_tabs($tabrows, $tab);
+print_tabs($tabrows, $tab);
echo '</td>';
echo '</td> </tr> </table>';
echo $OUTPUT->footer();
-?>
\ No newline at end of file
$strangers = array();
- // get all in our contactlist who are not blocked in our contact list
+ // get all in our contactlist who are not blocked in our contact list
// and count messages we have waiting from each of them
- $contactsql = "SELECT u.id, u.firstname, u.lastname, u.picture,
+ $contactsql = "SELECT u.id, u.firstname, u.lastname, u.picture,
u.imagealt, u.lastaccess, count(m.id) as messagecount
FROM {message_contacts} mc
JOIN {user} u ON u.id = mc.contactid
LEFT OUTER JOIN {message} m ON m.useridfrom = mc.contactid AND m.useridto = ?
- WHERE mc.userid = ? AND mc.blocked = 0
+ WHERE mc.userid = ? AND mc.blocked = 0
GROUP BY u.id, u.firstname, u.lastname, u.picture,
u.imagealt, u.lastaccess
ORDER BY u.firstname ASC";
// get messages from anyone who isn't in our contact list and count the number
// of messages we have from each of them
- $strangersql = "SELECT u.id, u.firstname, u.lastname, u.picture,
+ $strangersql = "SELECT u.id, u.firstname, u.lastname, u.picture,
u.imagealt, u.lastaccess, count(m.id) as messagecount
FROM {message} m
JOIN {user} u ON u.id = m.useridfrom
LEFT OUTER JOIN {message_contacts} mc ON mc.contactid = m.useridfrom AND mc.userid = m.useridto
- WHERE mc.id IS NULL AND m.useridto = ?
+ WHERE mc.id IS NULL AND m.useridto = ?
GROUP BY u.id, u.firstname, u.lastname, u.picture,
u.imagealt, u.lastaccess
ORDER BY u.firstname ASC";
$userpic = moodle_user_picture::make($USER, SITEID);
$userpic->size = 20;
$userpic->link = true;
-
+
if ($user === false) {
echo $OUTPUT->user_picture($userpic);
} else {
$command = $linktype.'contact';
$string = $str->{$command};
- $alttext = $text ? '' : $string;
+ $alttext = $text ? '' : $string;
$text = $text ? ' '.$string : '';
switch ($linktype) {
return $DB->get_records_sql("SELECT $fields
FROM {user} u
LEFT JOIN {message_contacts} mc
- ON mc.contactid = u.id AND mc.userid = ?
+ ON mc.contactid = u.id AND mc.userid = ?
WHERE $select
AND ($fullname $LIKE ?)
$except
FROM {user} u
JOIN {role_assignments} ra ON ra.userid = u.id
LEFT JOIN {message_contacts} mc
- ON mc.contactid = u.id AND mc.userid = ?
+ ON mc.contactid = u.id AND mc.userid = ?
WHERE $select
AND ra.contextid $contextlists
AND ($fullname $LIKE ?)
*/
function message_post_message($userfrom, $userto, $message, $format, $messagetype) {
global $CFG, $SITE, $USER, $DB;
-
+
$eventdata = new object();
$eventdata->component = 'message';
$eventdata->name = 'instantmessage';
}
/**
- * Print a row of contactlist displaying user picture, messages waiting and
+ * Print a row of contactlist displaying user picture, messages waiting and
* block links etc
* @param $contact contact object containing all fields required for $OUTPUT->user_picture()
* @param $incontactlist is the user a contact of ours?
echo $OUTPUT->user_picture($userpic);
echo '</td>';
echo '<td class="contact">';
-
+
$popupoptions = array(
'height' => 500,
'width' => 500,
function message_get_popup_messages($destuserid, $fromuserid=NULL){
global $DB;
-
+
$processor = $DB->get_record('message_processors', array('name' => 'popup'));
$messagesproc = $DB->get_records('message_working', array('processorid'=>$processor->id), 'id ASC');
$message->timeread = time();
$messageid = $message->id;
unset($message->id);
-
+
//delete what we've processed and check if can move message
$DB->delete_records('message_working', array('id' => $msgp->id));
if ( $DB->count_records('message_working', array('unreadmessageid'=>$messageid)) == 0){
echo $OUTPUT->header();
echo "<div id='messages'></div>";
echo $OUTPUT->footer();
-
-?>
\ No newline at end of file
+
* Upgrade code for email message processor
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package
+ * @package
*/
function xmldb_message_email_upgrade($oldversion) {
return $result;
}
-?>
+
-<?php
+<?php
///////////////////////////////////////////////////////////////////////////
// //
* Email message processor - lib file
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package
+ * @package
*/
/**
* Email message processor - send a given message by email
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package
+ * @package
*/
require_once($CFG->dirroot.'/message/output/lib.php');
$message->fullmessagehtml)
){
/// Move the entry to the other table
- $message->timeread = time();
+ $message->timeread = time();
$messageid = $message->id;
unset($message->id);
return true;
}
- /**
+ /**
* Creates necessary fields in the messaging config form.
* @param object $mform preferences form class
*/
- function config_form($preferences){
+ function config_form($preferences){
global $USER;
$string = get_string('email').': <input size="30" name="email_email" value="'.$preferences->email_email.'" />';
if (empty($preferences->email_email)) {
/**
* Parses the form submited data and saves it into preferences array.
* @param object $mform preferences form class
- * @param array $preferences preferences array
+ * @param array $preferences preferences array
*/
function process_form($form, &$preferences){
$preferences['message_processor_email_email'] = $form->email_email;
}
/**
- * Loads the config data from database to put on the form (initial load)
- * @param array $preferences preferences array
+ * Loads the config data from database to put on the form (initial load)
+ * @param array $preferences preferences array
* @param int $userid the user id
*/
function load_data(&$preferences, $userid){
* Email processor version information
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package
*/
$plugin->version = 2008072401;
$plugin->requires = 2008072401;
-?>
+
* Upgrade code for jabber message processor
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package
+ * @package
*/
function xmldb_message_jabber_upgrade($oldversion) {
return $result;
}
-?>
+
* Jabber message processor - lib file
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package
+ * @package
*/
/**
* Jabber message processor - send a given message by jabber
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package
+ * @package
*/
require_once($CFG->libdir.'/jabber/XMPP/XMPP.php');
class message_output_jabber extends message_output {
-
+
/**
* Processes the message (sends using jabber).
* @param object $message the message to be sent
*/
function send_message($message){
global $DB;
-
+
if (!$userfrom = $DB->get_record('user', array('id' => $message->useridfrom))) {
return false;
}
} catch(XMPPHP_Exception $e) {
return false;
}
-
+
return true;
}
- /**
+ /**
* Creates necessary fields in the messaging config form.
* @param object $mform preferences form class
*/
/**
* Parses the form submited data and saves it into preferences array.
* @param object $mform preferences form class
- * @param array $preferences preferences array
+ * @param array $preferences preferences array
*/
function process_form($form, &$preferences){
$preferences['message_processor_jabber_jabberid'] = $form->jabber_jabberid;
}
/**
- * Loads the config data from database to put on the form (initial load)
- * @param array $preferences preferences array
+ * Loads the config data from database to put on the form (initial load)
+ * @param array $preferences preferences array
* @param int $userid the user id
*/
function load_data(&$preferences, $userid){
}
/*
- *
+ *
* $f = fopen('/tmp/event_jabberx', 'a+');
fwrite($f, date('l dS \of F Y h:i:s A')."\n");
fwrite($f, "from: $message->userfromid\n");
$a->send_message($savemessage);
* */
-?>
+
* Jabber processor version information
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package
*/
$plugin->version = 2008090900;
$plugin->requires = 2008091500;
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
* Base message output class
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package
+ * @package
*/
/**
* Base message output class
*/
-abstract class message_output {
+abstract class message_output {
public abstract function send_message($message);
public abstract function process_form($form, &$preferences);
public abstract function load_data(&$preferences, $userid);
}
-?>
+
* Upgrade code for popup message processor
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package
+ * @package
*/
function xmldb_message_popup_upgrade($oldversion) {
return $result;
}
-?>
+
* Popup message processor - lib file
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package
+ * @package
*/
/**
class message_output_popup extends message_output{
- /**
+ /**
* Process the popup message.
- * The popup doesn't send data only saves in the database for later use,
- * the popup_interface.php takes the message from the message table into
+ * The popup doesn't send data only saves in the database for later use,
+ * the popup_interface.php takes the message from the message table into
* the message_read.
* @param object $message the message to be sent
* @return true if ok, false if error
*/
public function send_message($message) {
global $DB;
-
+
//put the process record into db
$processor = $DB->get_record('message_processors', array('name'=>'popup'));
$procmessage = new object();
//should only save this message for later delivery
return true;
}
-
+
function config_form($preferences) {
return '<table>'.
'<tr><td align="right">'.get_string('showmessagewindow', 'message').':</td><td><input type="checkbox" name="showmessagewindow" '.($preferences->showmessagewindow==1?" checked=\"checked\"":"").' /></td></tr>'.
'<tr><td align="right">'.get_string('noframesjs', 'message').':</td><td><input type="checkbox" name="noframesjs" '.($preferences->noframesjs==1?" checked=\"checked\"":"").' /></td></tr>'.
'</table>';
}
-
+
public function process_form($form, &$preferences) {
$preferences['message_showmessagewindow'] = $form->showmessagewindow?1:0;
$preferences['message_blocknoncontacts'] = $form->blocknoncontacts?1:0;
* Popup processor version information
*
* @author Luis Rodrigues
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package
*/
$plugin->version = 2008072401;
$plugin->requires = 2008072401;
-?>
+
echo $OUTPUT->footer();
-?>
\ No newline at end of file
<td colspan="2">
<input type="checkbox" name="mycourses" id="mycourses" /><label for="mycourses"><?php print_string('onlymycourses', 'message') ?></label></td>
</tr>
-
+
<tr><td colspan="3"></td></tr>
<td><input type="text" name="keywords" id="keywords" size="16" /></td>
<td><input type="submit" name="keywordssubmit" value="<?php print_string('search') ?>" /></td>
</tr>
-
+
<tr>
<td> </td>
<td colspan="2">
<input type="checkbox" name="includeblocked" id="includeblocked" /><label for="includeblocked"><?php print_string('includeblockedusers', 'message') ?></label></td>
</tr>
-
+
<tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" id="keywordsoption1" value="tome" /><label for="keywordsoption1"><?php print_string('onlytome', 'message') ?></label></td></tr>
<tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" id="keywordsoption2" value="fromme" /><label for="keywordsoption2"><?php print_string('onlyfromme', 'message') ?></label></td></tr>
<tr><td> </td><td colspan="2"><input type="radio" checked="checked" name="keywordsoption" id="keywordsoption3" value="allmine" /><label for="keywordsoption3"><?php print_string('allmine', 'message') ?></label></td></tr>
-
+
<?php if (has_capability('moodle/site:readallmessages', get_context_instance(CONTEXT_SYSTEM))) { ?>
<tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" id="keywordsoption4" value="allusers" /><label for="keywordsoption4"><?php print_string('allusers', 'message') ?></label></td></tr>
<?php } ?>
<?php
-/* Potential abuse problems - temporarily disabled
+/* Potential abuse problems - temporarily disabled
echo '<tr><td colspan="3"><input type="radio" name="keywordsoption" alt="'.get_string('allstudents', 'message').'" value="courseusers" />'.get_string('allstudents', 'message').'<br /> '.$cs.'; </td></tr>';
*/
?>
-
+
</table>
</form>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package message
*/
-
+
require('../config.php');
require('lib.php');
echo $OUTPUT->footer();
-?>
\ No newline at end of file
-<?php // $Id$
+<?php
/**
* Info about the local environment, wrt RPC
*
array_unshift($openssl_history, $this->keypair);
}
- // 2. How many old keys do we want to keep? Use array_slice to get
+ // 2. How many old keys do we want to keep? Use array_slice to get
// rid of any we don't want
$openssl_generations = $DB->get_field('config_plugins', 'value', array('plugin'=>'mnet', 'name'=>'openssl_generations'));
if(empty($openssl_generations)) {
return $this->keypair['publickey'];
}
}
-
-?>
-<?php // $Id$
+<?php
/**
* Library functions for mnet
*
$curlerrno = curl_errno($ch);
if ($curlerrno!=0) {
debugging("Request for $uri failed with curl error $curlerrno");
- }
+ }
// check HTTP error code
$info = curl_getinfo($ch);
}
return $appjumppaths[$applicationid];
}
-
-?>
-<?php // $Id$
+<?php
/**
* An object to represent lots of information about an RPC-peer machine
*
return false;
}
- /**
+ /**
* Load information from db about an mnet peer into this object's properties
- *
+ *
* @param string $wwwroot - address of peer whose details we want to load
* @return bool - indication of success or failure
- */
+ */
function set_wwwroot($wwwroot) {
global $CFG, $DB;
/**
* Several methods can be used to get an 'mnet_host' record. They all then
* send it to this private method to populate this object's attributes.
- *
+ *
* @param object $hostinfo A database record from the mnet_host table
* @return void
*/
return $this->public_key_ref;
}
}
-
-?>
-<?php // $Id$
+<?php
/**
* Print this server's public key and exit
*
header("Content-type: text/plain");
$keypair = mnet_get_keypair();
echo $keypair['certificate'];
-?>
-<?php // $Id$
+<?php
/**
* An object to represent lots of information about an RPC-peer machine
*
return false;
}
}
-?>
-<?php // $Id$
+<?php
/**
* Some dummy functions to test XML-RPC with
*/
$this->first = 'last';
$this->last = 'first';
}
-
+
function augment_first($newval) {
$this->first = $this->first.$newval;
return $this->first;
}
-
+
function augment_first_RPC_OK() {
return true;
}
-
+
function mnet_concatenate_strings_RPC_OK() {
return true;
}
return $string1.$string2.$string3;
}
}
-
-?>
-<?php // $Id$
+<?php
/**
* A service browser for remote Moodles
*
$mnet_request->set_method('system/listMethods');
$mnet_request->send($mnet_peer);
$methods = $mnet_request->response;
-
+
echo '<hr /><br /><h3>Methods '.$host->wwwroot .'</h3><table><th>Method</th><th colspan="2">Options</th>';
foreach ($methods as $id => $method) {
echo '<tr><td>'.$method.'</td><td> <a href="testclient.php?hostid='.$host->id.'&method='.$id.'&show=sig">Inspect</a></td></tr>'."\n";
return $httprequest;
}
}
-?>
* Translate XML-RPC's strange function call syntax into a more straightforward
* PHP-friendly alternative. This dummy function will be called by the
* dispatcher, and can be used to call a method on an object, or just a function
- *
+ *
* The methodName argument (eg. mnet/testlib/mnet_concatenate_strings)
* is ignored.
*
*/
function mnet_server_dummy_method($methodname, $argsarray, $functionname) {
global $MNET_REMOTE_CLIENT;
-
+
if (is_object($MNET_REMOTE_CLIENT->object_to_call)) {
return @call_user_method_array($functionname, $MNET_REMOTE_CLIENT->object_to_call, $argsarray);
} else if (!empty($MNET_REMOTE_CLIENT->static_location)) {
// Filename doesn't end in 'php'; possible attack?
// Generate error response - unable to locate function
exit(mnet_server_fault(7012, 'nosuchfunction'));
- }
+ }
// The call stack holds the path to any include file
$includefile = $CFG->dirroot.'/'.$filename;
{mnet_rpc} rpc
WHERE
s2r.rpcid = rpc.id AND
- h2s.serviceid = s2r.serviceid AND
+ h2s.serviceid = s2r.serviceid AND
h2s.hostid in ('.$id_list .') AND
h2s.publish =\'1\'
ORDER BY
{mnet_rpc} rpc
WHERE
s2r.rpcid = rpc.id AND
- h2s.serviceid = s2r.serviceid AND
+ h2s.serviceid = s2r.serviceid AND
h2s.hostid in ('.$id_list .') AND
h2s.publish =\'1\' AND
svc.id = h2s.serviceid AND
WHERE
rpc.xmlrpc_path = ? AND
s2r.rpcid = rpc.id AND
- h2s.serviceid = s2r.serviceid AND
+ h2s.serviceid = s2r.serviceid AND
h2s.publish =\'1\' AND
h2s.hostid in ('.$id_list .')';
$params = array($params[0]);
rpc.xmlrpc_path = ? AND
s2r.rpcid = rpc.id AND
h2s.publish =\'1\' AND
- h2s.serviceid = s2r.serviceid AND
+ h2s.serviceid = s2r.serviceid AND
h2s.hostid in ('.$id_list .')';
$params = array($params[0]);
if (is_array($result)) {
foreach($result as $service) {
- $services[] = array('name' => $service->name,
- 'apiversion' => $service->apiversion,
- 'publish' => $service->publish,
+ $services[] = array('name' => $service->name,
+ 'apiversion' => $service->apiversion,
+ 'publish' => $service->publish,
'subscribe' => $service->subscribe);
}
}
return $services;
- }
+ }
exit(mnet_server_fault(7019, 'nosuchfunction'));
}
/**
- * Initialize the object (if necessary), execute the method or function, and
+ * Initialize the object (if necessary), execute the method or function, and
* return the response
*
* @param string $includefile The file that contains the object definition
* Accepts a public key from a new remote host and returns the public key for
* this host. If 'register all hosts' is turned on, it will bootstrap a record
* for the remote host in the mnet_host table (if it's not already there)
- *
+ *
* @param string $function XML-RPC requires this but we don't... discard!
* @param array $params Array of parameters
* $params[0] is the remote wwwroot
}
return $MNET->public_key;
}
-
-?>
-<?php // $Id$
+<?php
// this is the 'my moodle' page
if (isset($CFG->mycoursesperpage)) {
$courses_limit = $CFG->mycoursesperpage;
}
-
+
$morecourses = false;
if ($courses_limit > 0) {
$courses_limit = $courses_limit + 1;
}
-
+
$courses = get_my_courses($USER->id, 'visible DESC,sortorder ASC', '*', false, $courses_limit);
$site = get_site();
$course = $site; //just in case we need the old global $course hack
echo $OUTPUT->footer();
-?>
note_print($note, NOTES_SHOW_BODY | NOTES_SHOW_HEAD);
echo $OUTPUT->footer();
}
-?>
echo $OUTPUT->heading(fullname($user));
$noteform->display();
-echo $OUTPUT->footer();
\ No newline at end of file
+echo $OUTPUT->footer();
-<?php // $Id$
+<?php
require_once($CFG->libdir.'/formslib.php');
$mform->setType('id', PARAM_INT);
}
}
-?>
\ No newline at end of file
echo $OUTPUT->box_end();
-echo $OUTPUT->footer();
\ No newline at end of file
+echo $OUTPUT->footer();
-<?php // $Id$
+<?php
/**
* Library of functions and constants for notes
return $DB->delete_records('post', array('module'=>'notes', 'courseid'=>$courseid));
}
-?>
-<?php // $Id$
+<?php
/////////////////////////////////////////////////////////////////////////////////
/// Code fragment to define the version of the note module