mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Changes throughout Moodle to remove any reserved words from the
Moodle tables. ie user -> userid in many tables, plus in user_students start -> starttime and end -> endtime I've just done all this as carefully as I could ... I don't think I missed anything but it's pretty intensive work and I'd be fooling myself if I didn't think I'd missed a couple. Note that this version should pretty much be able to bootstrap itself using PostgreSQL now ... but this is untested
This commit is contained in:
parent
1f48942e7d
commit
ebc3bd2b24
68 changed files with 277 additions and 461 deletions
|
@ -51,10 +51,8 @@ function resource_list_all_resources($courseid=0, $sort="name ASC", $recent=0) {
|
|||
|
||||
|
||||
function resource_user_outline($course, $user, $mod, $resource) {
|
||||
if ($logs = get_records_sql("SELECT * FROM log
|
||||
WHERE user='$user->id' AND module='resource'
|
||||
AND action='view' AND info='$resource->id'
|
||||
ORDER BY time ASC")) {
|
||||
if ($logs = get_records_select("log", "userid='$user->id' AND module='resource'
|
||||
AND action='view' AND info='$resource->id'", "time ASC")) {
|
||||
|
||||
$numviews = count($logs);
|
||||
$lastlog = array_pop($logs);
|
||||
|
@ -71,11 +69,8 @@ function resource_user_outline($course, $user, $mod, $resource) {
|
|||
function resource_user_complete($course, $user, $mod, $resource) {
|
||||
global $CFG, $THEME;
|
||||
|
||||
if ($logs = get_records_sql("SELECT * FROM log
|
||||
WHERE user='$user->id' AND module='resource'
|
||||
AND action='view' AND info='$resource->id'
|
||||
ORDER BY time ASC")) {
|
||||
|
||||
if ($logs = get_records_select("log", "userid='$user->id' AND module='resource'
|
||||
AND action='view' AND info='$resource->id'", "time ASC")) {
|
||||
$numviews = count($logs);
|
||||
$lastlog = array_pop($logs);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// This fragment is called by /admin/index.php
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$module->version = 2002101700;
|
||||
$module->version = 2002122300;
|
||||
$module->cron = 0;
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue