Go to the source code of this file.
Namespaces |
| namespace | mod |
| | Local Library of functions for module scorm.
|
Variables |
| | $courseid = optional_param('course', null, PARAM_INT) |
| | $userid = optional_param('id', $USER->id, PARAM_INT) |
| | $mode = optional_param('mode', 'posts', PARAM_ALPHA) |
| | $page = optional_param('page', 0, PARAM_INT) |
| | $perpage = optional_param('perpage', 5, PARAM_INT) |
| if(empty($userid)) | $discussionsonly = ($mode !== 'posts') |
| | $isspecificcourse = !is_null($courseid) |
| | $iscurrentuser = ($USER->id == $userid) |
| | $url = new moodle_url('/mod/forum/user.php', array('id' => $userid)) |
| | $user = $DB->get_record("user", array("id" => $userid), '*', MUST_EXIST) |
| | $usercontext = get_context_instance(CONTEXT_USER, $user->id, MUST_EXIST) |
if(isguestuser($user)) if($user->
deleted) | $isloggedin = isloggedin() |
| | $isguestuser = $isloggedin && isguestuser() |
| | $isparent = !$iscurrentuser && $DB->record_exists('role_assignments', array('userid'=>$USER->id, 'contextid'=>$usercontext->id)) |
| | $hasparentaccess = $isparent && has_all_capabilities(array('moodle/user:viewdetails', 'moodle/user:readuserposts'), $usercontext) |
| if(empty($result->posts)) | $postoutput = array() |
| | $discussions = array() |
| | $rm = new rating_manager() |
| | $ratingoptions = new stdClass |
| $ratingoptions | component = 'mod_forum' |
| $ratingoptions | ratingarea = 'post' |
| foreach($result->posts as $post) | $userfullname = fullname($user) |
Variable Documentation
| $hasparentaccess = $isparent && has_all_capabilities(array('moodle/user:viewdetails', 'moodle/user:readuserposts'), $usercontext) |
| if (empty($result->posts)) $postoutput = array() |
| $ratingoptions = new stdClass |