Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/report/outline/locallib.php
Go to the documentation of this file.
00001 <?php
00002 // This file is part of Moodle - http://moodle.org/
00003 //
00004 // Moodle is free software: you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation, either version 3 of the License, or
00007 // (at your option) any later version.
00008 //
00009 // Moodle is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00016 
00026 defined('MOODLE_INTERNAL') || die;
00027 
00028 require_once(dirname(__FILE__).'/lib.php');
00029 require_once($CFG->dirroot.'/course/lib.php');
00030 
00031 function report_outline_print_row($mod, $instance, $result) {
00032     global $OUTPUT, $CFG;
00033 
00034     $image = "<img src=\"" . $OUTPUT->pix_url('icon', $mod->modname) . "\" class=\"icon\" alt=\"$mod->modfullname\" />";
00035 
00036     echo "<tr>";
00037     echo "<td valign=\"top\">$image</td>";
00038     echo "<td valign=\"top\" style=\"width:300\">";
00039     echo "   <a title=\"$mod->modfullname\"";
00040     echo "   href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".format_string($instance->name,true)."</a></td>";
00041     echo "<td>&nbsp;&nbsp;&nbsp;</td>";
00042     echo "<td valign=\"top\">";
00043     if (isset($result->info)) {
00044         echo "$result->info";
00045     } else {
00046         echo "<p style=\"text-align:center\">-</p>";
00047     }
00048     echo "</td>";
00049     echo "<td>&nbsp;&nbsp;&nbsp;</td>";
00050     if (!empty($result->time)) {
00051         $timeago = format_time(time() - $result->time);
00052         echo "<td valign=\"top\" style=\"white-space: nowrap\">".userdate($result->time)." ($timeago)</td>";
00053     }
00054     echo "</tr>";
00055 }
 All Data Structures Namespaces Files Functions Variables Enumerations