Moodle two Columns in a topic

I want to have similar layout in Moodle like the one here

Basically I want to have an Image at the left and the activities at the right of one topic.

I tried to use Labels to insert images and its ok, but I cannot align the activities at the right of the image.

Does anyone knows a plugin that can do that?

preguntado el 31 de julio de 12 a las 15:07

1 Respuestas

I haven't tested it deeply but it should work:

What You can do is modifying /course/format/YOURFORMAT/format.php - Search for where the activities are printed:

print_section($course, $thissection, $mods, $modnamesused);

And replace this line above by:

$allsectionmods = explode(",", $thissection->sequence);
foreach ($allsectionmods as $modnumber) {
    if (empty($mods[$modnumber])) {
    $firstmod = array($modnumber => $mods[$modnumber]);
echo '<div style="float:left">';
print_section($course, $thissection, $firstmod, $modnamesused);
echo '</div>';
echo '<div>';
print_section($course, $thissection, $mods, $modnamesused);
echo '</div>';
echo '<div style="clear:both">';

This will print the first item of each section at the left side of the others (as they are floating.) Now you just have to ensure that the first item of each section is a label containing an image.

Respondido 01 ago 12, 13:08

Well I tried it but it doesn't work, actually it does not do anything different. I followed your instructions but nothing. - Christos312

I edited my answer, there was a litle mistake with the $allsectionmods variable name. Maybe you already saw it. Is Moodle displaying errors? - benomita

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.