timerajax.php
463 Bytes
<?php
require_once('/../../config.php');
require_once($CFG->dirroot.'/user/profile/lib.php');
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot . '/blocks/mynotes/lib.php');
global $USER,$DB;
if (!isloggedin()) {
echo json_encode(array('error' => 'require_login'));
die();
}
$timertext = optional_param('notestime', '', PARAM_TEXT);
// $myuser=profile_user_record($USER->id);
if ($timertext){
echo json_encode($timertext);
}