From 472a28cab4cba532b0db91dfbc829095f47829ef Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 24 Feb 2005 23:50:24 +0000 Subject: [PATCH] Now the get_participants() standard function is working inside wiki module Merged from MOODLE_14_STABLE --- mod/wiki/lib.php | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/mod/wiki/lib.php b/mod/wiki/lib.php index a674133ecb1..e1fa47dfda8 100644 --- a/mod/wiki/lib.php +++ b/mod/wiki/lib.php @@ -1,4 +1,4 @@ -prefix}user u, + {$CFG->prefix}wiki_entries e, + {$CFG->prefix}wiki_pages p + WHERE e.wikiid = '$wikiid' and + p.wiki = e.id and + u.id = p.userid"); + + //Get users from wiki_entries + $st_entries = get_records_sql("SELECT DISTINCT u.id, u.id + FROM {$CFG->prefix}user u, + {$CFG->prefix}wiki_entries e + WHERE e.wikiid = '$wikiid' and + u.id = e.userid"); + + //Add entries to pages + if ($st_entries) { + foreach ($st_entries as $st_entry) { + $st_pages[$st_entry->id] = $st_entry; + } + } + + return $st_pages; } + ////////////////////////////////////////////////////////////////////////////////////// /// Any other wiki functions go here. Each of them must have a name that /// starts with wiki_