mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-15109 glossary dml conversion
This commit is contained in:
parent
ea05eebf92
commit
ae8c356614
27 changed files with 558 additions and 628 deletions
|
@ -1,11 +1,10 @@
|
|||
<?php // $Id$
|
||||
|
||||
function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $ratings=NULL, $aliases=true) {
|
||||
|
||||
global $CFG, $USER;
|
||||
global $CFG, $USER, $DB;
|
||||
|
||||
|
||||
$user = get_record('user', 'id', $entry->userid);
|
||||
$user = $DB->get_record('user', array('id'=>$entry->userid));
|
||||
$strby = get_string('writtenby', 'glossary');
|
||||
|
||||
if ($entry) {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php // $Id$
|
||||
|
||||
function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode='',$hook='',$printicons=1,$ratings=NULL, $aliases=true) {
|
||||
global $CFG, $USER;
|
||||
global $CFG, $USER, $DB;
|
||||
|
||||
|
||||
$user = get_record('user', 'id', $entry->userid);
|
||||
$user = $DB->get_record('user', array('id'=>$entry->userid));
|
||||
$strby = get_string('writtenby', 'glossary');
|
||||
|
||||
$return = false;
|
||||
|
@ -22,6 +22,7 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode
|
|||
echo '</div>';
|
||||
|
||||
$fullname = fullname($user);
|
||||
$by = new object();
|
||||
$by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.$course->id.'">'.$fullname.'</a>';
|
||||
$by->date = userdate($entry->timemodified);
|
||||
echo '<span class="author">'.get_string('bynameondate', 'forum', $by).'</span>';
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php // $Id$
|
||||
|
||||
function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $ratings=NULL, $aliases=true) {
|
||||
global $CFG, $USER;
|
||||
global $CFG, $USER, $DB;
|
||||
|
||||
|
||||
$user = get_record('user', 'id', $entry->userid);
|
||||
$user = $DB->get_record('user', array('id'=>$entry->userid));
|
||||
$strby = get_string('writtenby', 'glossary');
|
||||
|
||||
$return = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue