mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Apache log intergration. In apache conf file one can use ${MOODULEUSER}n in LogFormat to get the current logged in username in moodle. Implemented by Patrick Li.
This commit is contained in:
parent
8465c58a8d
commit
a559eee64e
2 changed files with 15 additions and 0 deletions
|
@ -209,6 +209,15 @@ php_value post_max_size 2M
|
|||
<pre>cp lib/htaccess .htaccess</pre>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
<p>(Optional) To include the username of the current user in the Apache access log, add the following into your httpd.conf:</p>
|
||||
<blockquote>
|
||||
<pre>
|
||||
LogFormat "%h %l %{MOODLEUSER}n %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" moodle
|
||||
CustomLog "/your/path/to/log" moodle</pre>
|
||||
</blockquote>
|
||||
<p>And then replace the "/your/path/to/log" to your http access log or to a new one. If your Moodle copy runs in a virtual host, add the lines in the corresponding <VirtualHost> block. Please refer to the Apache documentation for more information.</p>
|
||||
</blockquote>
|
||||
<p> </p>
|
||||
<h3 class="sectionheading"><a name="database"></a>4.2 Creating a database</h3>
|
||||
|
||||
|
|
|
@ -409,6 +409,12 @@ global $THEME;
|
|||
}
|
||||
}
|
||||
|
||||
/// Apache log intergration. In apache conf file one can use ${MOODULEUSER}n in
|
||||
/// LogFormat to get the current logged in username in moodle.
|
||||
if ($USER && function_exists('apache_note')) {
|
||||
apache_note('MOODLEUSER', $USER->username);
|
||||
}
|
||||
|
||||
/***
|
||||
*** init_performance_info() {
|
||||
***
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue