Hello!
I am very interested in this modification. I attempted to follow the instructions but I code is displaying on the course edit page. Also I did not know if there was some code which should be placed in the "courseimage.html" & "courseimagealt.html" files so I left their content blank. I placed the steps I follow below with some indication of where I had inserted code in the significant files. I attached an image of how the code is displaying on the corse edit page and how the two fields I added to the database look as well so you would have as mush information as possible.
I hope you can help me out with this.
WP1
--------------------------------------
STEP 1
Inserted two fields into the "mdl_course" table with the values indicated in the instructions. Please see the lower part of the image below.
STEP 2
Inserted code beginning at line 28 in the "course/edit.html". The insrted code is in blue.
<tr valign=top>
<td align="right"><P><?php print_string("shortname") ?>:</td>
<td><input type="text" name="shortname" maxlength="15" size="10" value="<?php p($form->shortname) ?>">
<?php helpbutton("courseshortname", get_string("shortname")) ?>
<?php if (isset($err["shortname"])) formerr($err["shortname"]); ?>
</td>
</tr>
<tr valign=top>
<td><P><?php print_string("courseimage") ?>:</td>
<td><input type="text" name="image" maxlength="100" size="50" value="<?php p($form->image) ?>">
< ?php helpbutton("courseimage", get_string("courseimage")) ?>
</td>
</tr>
<tr valign=top>
<td><P><?php print_string("courseimagealt") ?>:</td>
<td><input type="text" name="alternate" maxlength="100" size="50" value="<?php p($form->alternate) ?>">
<?php helpbutton("courseimagealt", get_string("courseimagealt")) ?>
</td>
</tr>
<tr valign=top>
<td align="right"><P><?php print_string("summary") ?>:</td>
<td><?php
print_textarea($usehtmleditor, 10, 50, 660, 200, "summary", $form->summary);
helpbutton("text", get_string("helptext"));
if (isset($err["summary"])) formerr($err["summary"]);
?>
</td>
</tr>
STEP 3
Placed the following code at line - 797 - in the "/lang/en/moodle.php" (My language is english). The insrted code is in blue.
$string['todaylogs'] = 'Today's logs';
$string['courseimage'] = "Associated Image";
$string['courseimage'] = "Alternate text";
$string['toomanytoshow'] = 'There are too many users to show';
STEP 4
I changed line - 1152 - in "/course/lib.php". The insrted code is in blue.
if ($courses) {
foreach ($courses as $course) {
echo "<br><img src=\"$course->image\" alt=\"$course->alternate\" title=\"$course->alternate\"><br><br>";
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
$moddata[]="<a $linkcss title=\"$course->shortname\" ".
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</a>";
$modicon[]=$icon;
}
$fulllist = "<p><a href=\"$CFG->wwwroot/course/index.php\">".get_string("fulllistofcourses")."</a>...";
} else {
$moddata = array();
$modicon = array();
$fulllist = get_string("nocoursesyet");
}
}
STEP 5
Created two files named - "courseimage.html" & "courseimagealt.html" for Helpfiles /lang/en/help. However, I do not know what code should be used in these file if any. Are they to be blank "html" files?