Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-30975 Docs Documenting report/logs

  • Loading branch information...
commit f82de750bfa40f0d20a85dd928fdf56f69fdab4d 1 parent fcf6490
@ankitagarwal ankitagarwal authored
View
2  report/log/db/access.php
@@ -16,6 +16,8 @@
/**
* Capabilities
+ *
+ * Defines capablities related to logs
*
* @package report
* @subpackage log
View
10 report/log/db/install.php
@@ -16,7 +16,9 @@
/**
* Post installation and migration code.
- *
+ *
+ * Contains code that are run during the installation of report/logs
+ *
* @package report
* @subpackage log
* @copyright 2011 Petr Skoda {@link http://skodak.org}
@@ -25,6 +27,12 @@
defined('MOODLE_INTERNAL') || die;
+/**
+ * Contains codes to be run during installation of report/logs
+ *
+ * @global object $DB
+ * @return void
+ */
function xmldb_report_log_install() {
global $DB;
View
2  report/log/graph.php
@@ -17,6 +17,8 @@
/**
* Produces a graph of log accesses for a user
*
+ * Generates an image representing the log data in a graphical manner for a user.
+ *
* @package report
* @subpackage log
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
View
2  report/log/lang/en/report_log.php
@@ -16,6 +16,8 @@
/**
* Lang strings.
+ *
+ * Language strings to be used by report/logs
*
* @package report
* @subpackage log
View
4 report/log/lib.php
@@ -17,6 +17,8 @@
/**
* Public API of the log report.
*
+ * Defines the APIs used by log reports
+ *
* @package report
* @subpackage log
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
@@ -120,7 +122,7 @@ function report_log_extend_navigation_module($navigation, $cm) {
* @param string $pagetype current page type
* @param stdClass $parentcontext Block's parent context
* @param stdClass $currentcontext Current context of block
- * @return array
+ * @return array a list of page types
*/
function report_log_page_type_list($pagetype, $parentcontext, $currentcontext) {
$array = array(
View
63 report/log/locallib.php
@@ -17,6 +17,8 @@
/**
* This file contains functions used by the log reports
*
+ * This files lists the functions that are used during the log report generation.
+ *
* @package report
* @subpackage log
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
@@ -31,6 +33,15 @@
require_once(dirname(__FILE__).'/lib.php');
+/**
+ * This function is used to generate and display the log activity graph
+ *
+ * @global object $CFG
+ * @param object $course course instance
+ * @param int $userid id of the user whose logs are needed
+ * @param string $type type of logs graph needed (usercourse.png/userday.png)
+ * @return void
+ */
function report_log_print_graph($course, $userid, $type, $date=0) {
global $CFG;
@@ -41,7 +52,32 @@ function report_log_print_graph($course, $userid, $type, $date=0) {
'&user='.$userid.'&type='.$type.'&date='.$date.'" alt="" />';
}
}
-
+/**
+ * This function is used to generate and display Mnet selector form
+ *
+ * @global object $USER
+ * @global object $CFG
+ * @global object $SITE
+ * @global object $DB
+ * @global object $OUTPUT
+ * @global object $SESSION
+ * @uses CONTEXT_SYSTEM
+ * @uses COURSE_MAX_COURSES_PER_DROPDOWN
+ * @uses CONTEXT_COURSE
+ * @uses SEPARATEGROUPS
+ * @param int $hostid host id
+ * @param object $course course instance
+ * @param int $selecteduser id of the selected user
+ * @param string $selecteddate Date selected
+ * @param string $modname course_module->id
+ * @param string $modid number or 'site_errors'
+ * @param string $modaction an action as recorded in the logs
+ * @param int $selectedgroup Group to display
+ * @param int $showcourses whether to show courses if we're over our limit.
+ * @param int $showusers whether to show users if we're over our limit.
+ * @param string $logformat Format of the logs (downloadascsv, showashtml, downloadasods, downloadasexcel)
+ * @return void
+ */
function report_log_print_mnet_selector_form($hostid, $course, $selecteduser=0, $selecteddate='today',
$modname="", $modid=0, $modaction='', $selectedgroup=-1, $showcourses=0, $showusers=0, $logformat='showashtml') {
@@ -326,7 +362,30 @@ function report_log_print_mnet_selector_form($hostid, $course, $selecteduser=0,
echo '</div>';
echo '</form>';
}
-
+/**
+ * This function is used to generate and display selector form
+ *
+ * @global object $USER
+ * @global object $CFG
+ * @global object $DB
+ * @global object $OUTPUT
+ * @global object $SESSION
+ * @uses CONTEXT_SYSTEM
+ * @uses COURSE_MAX_COURSES_PER_DROPDOWN
+ * @uses CONTEXT_COURSE
+ * @uses SEPARATEGROUPS
+ * @param object $course course instance
+ * @param int $selecteduser id of the selected user
+ * @param string $selecteddate Date selected
+ * @param string $modname course_module->id
+ * @param string $modid number or 'site_errors'
+ * @param string $modaction an action as recorded in the logs
+ * @param int $selectedgroup Group to display
+ * @param int $showcourses whether to show courses if we're over our limit.
+ * @param int $showusers whether to show users if we're over our limit.
+ * @param string $logformat Format of the logs (downloadascsv, showashtml, downloadasods, downloadasexcel)
+ * @return void
+ */
function report_log_print_selector_form($course, $selecteduser=0, $selecteddate='today',
$modname="", $modid=0, $modaction='', $selectedgroup=-1, $showcourses=0, $showusers=0, $logformat='showashtml') {
View
2  report/log/settings.php
@@ -17,6 +17,8 @@
/**
* Links and settings
*
+ * Contains settings used by logs report.
+ *
* @package report
* @subpackage log
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
View
2  report/log/version.php
@@ -17,6 +17,8 @@
/**
* Version info
*
+ * This File contains information about the current version of report/logs
+ *
* @package report
* @subpackage log
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
Please sign in to comment.
Something went wrong with that request. Please try again.