--- lib.php 2013-01-02 00:15:43.000000000 +0100
+++ lib-new.php 2013-01-02 00:16:20.000000000 +0100
@@ -1393,7 +1392,7 @@
echo "
\n";
foreach ($modinfo->sections[$section->section] as $modnumber) {
- $mod = $modinfo->cms[$modnumber];
+ $mod = $modinfo->get_cm($modnumber);
if ($ismoving and $mod->id == $USER->activitycopy) {
// do not display moving mod
@@ -1517,8 +1516,31 @@
if ($url = $mod->get_url()) {
// Display link itself
+
+ //First, let's see if we are seeing a new modle
+ if(isset($mod->added)){
+ if(!isset($CFG->newicontime)){ //If the newicontime is not configured
+ if(time() - $mod->added < 48*3600) //We set the standard time to 2 days
+ $imgsrc = "img/new.gif";
+ else
+ $imgsrc = $mod->get_icon_url();
+ }
+ else{
+ if(time()-$mod->added < $CFG->newicontime){
+ $imgsrc = "img/new.gif";
+ }
+ else{
+ $imgsrc = $mod->get_icon_url();
+ }
+ }
+ }
+ else{
+ $imgsrc = $mod->get_icon_url();
+ }
+
+ //Now we can plot the icon:
echo 'extra . $onclick .
- ' href="' . $url . '"> .
+ ' href=)
' .
$accesstext . '' .
$instancename . $altname . '';