MDL-30975 Docs Documenting report/logs

This commit is contained in:
Ankit Kumar Agarwal
2012-02-13 11:06:43 +05:30
committed by Ankit Agarwal
parent fcf64900e6
commit f82de750bf
8 changed files with 83 additions and 4 deletions
+2
View File
@@ -16,6 +16,8 @@
/**
* Capabilities
*
* Defines capablities related to logs
*
* @package report
* @subpackage log
+9 -1
View File
@@ -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;
+2
View File
@@ -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)
+2
View File
@@ -16,6 +16,8 @@
/**
* Lang strings.
*
* Language strings to be used by report/logs
*
* @package report
* @subpackage log
+3 -1
View File
@@ -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(
+61 -2
View File
@@ -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 @@ if (!defined('REPORT_LOG_MAX_DISPLAY')) {
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') {
+2
View File
@@ -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)
+2
View File
@@ -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)