Lesson module Problem

Lesson module Problem

by Crescenciano Olvera -
Number of replies: 5

Hi all,

I am trying to use Moodle and the Mr. Ray lesson module and after some instalation problems I upload the firts lesson in a course, but the display do not show the TOC in the left of the display and below the lesson I have the next error mesage:

<>Warning>: Invalid argument supplied for foreach() in /home/sintegr/public_html/moodle/mod/lesson/view.php on line 1001

I was finding some advice in the lesson forum but I can not find any help, will appreciate every support and comments,

Thank you

Average of ratings: -
In reply to Crescenciano Olvera

Re: Lesson module Problem

by Michael Penney -
Hi Crescenciano, are you using the zip download or the latest code in CVS?

The zip requires the styles for the left menu to be added to your theme (see the comments and styles under <?php //CDC added CSS functions ?> in styles php in the FormalWhite theme on the download).

If you are getting this with the CVS version, we'll check it out and get a fix up asap. Does the warning go away if you disable the left menu?
In reply to Michael Penney

Re: Lesson module Problem

by Crescenciano Olvera -

Hi Michael, I appreciate your help,

I download the zip file from the modules in moodle and then I upload in my site by the web site control panel, I upload the lesson module in the ../moodle/mod directory and the languaje files intheir place only.

After that I download from the moodle modules and upload in my site the book and the dialogue modules by the same way, that is all,

Can you tell me what other action I must to do?

I will wainting your answer, Thank you very much for your support,

Crescenciano

In reply to Crescenciano Olvera

Re: Lesson module Problem

by Michael Penney -
Hi Crescenciano, for that version of lesson, you need the left menu styles in your them. Download the formal white 508 theme from the files directory:
http://learn.humboldt.edu/course/view.php?id=21&topic=3

In that theme's folder, in styles.php, the end of the file, you see some lines->

<?php //CDC added CSS functions ?>
.hidden-label {
    display: none;
}

.footer {
  color: <?PHP echo $THEME->body?>;
  padding-top:40px; margin-top:40px;
}
 
.footer a:link, .footer v:link, .footer a:visited {
    color: <?PHP echo $THEME->body?>;
}

.leftmenu { <?php //in view.php in lesson mod ?>
    width:140px;
    height:530px;
    margin-top:-18px;

    white-space:nowrap;
}

.leftmenu1 { <?php //in lesson.php in lesson mod ?>
    width:140px;
    height:530px;
    margin-top:-6px;

    white-space:nowrap;
}

.lmlinks {
    width:140px;
    height:400px;
    overflow:auto;
    <?php //white-space:nowrap; ?>
    padding-left:7px;
    padding-top:4px;
   
}


.leftmenu a:link, .leftmenu a:active, .leftmenu a:visited, .leftmenu1 a:link, .leftmenu1 a:active, .leftmenu1 a:visited{
font-size:.7em;
}

.lmMainlinks a:link, .lmMainlinks a:active, .lmMainlinks a:visited{
font-size:.9em;
}

.slidepos {
padding-left:153px; margin-top:-480px;
 font-family:Arial;
}

.viewpos {
}

Add these lines to the end of your styles.php in the theme file you are using (back it up first) and the left menu should work fine.

Alternatively, you can download the latest lesson from 1.5 CVS and use that, in that one the css for left menu is internal to the module.

In reply to Michael Penney

Re: Lesson module Problem

by Crescenciano Olvera -

Hi Michael,

I copied the code section of your reply in the styles.php file and I open my lesson site to review the operation of the left menu, I was working as a teacher in the site and the left menu is there, I will create a usser test account to made some test as student.

The warning advice that I was receiving is not there, Thank very much for your support, I feel the all problem is solved,

Crescenciano,

In reply to Crescenciano Olvera

Re: Lesson module Problem

by Crescenciano Olvera -

Hi Michael,

For many reasons I changed my host service supplier and I recharged the 1.4.1 Moodle version, with a new host supplier, I made it as follows:

1.- My host supplier upload via Fantastico the Moodle 1.3.1, after that I rename it as oldmoodle directory.

2.- I upload the Moodle 1.4.1 as a moodle directory.

3.- I copy the config.php file and the uploaddata directory in to the Moodle directory.

4.- I uploaded the lessonlcd, book and the dialogue modules.

5.- I copied the code in php of your message and pase it in the style.php file from my theme.

When I charge a lesson the TOC is placed in the left, but the system send me again the next:

<>Warning ><>

: Invalid argument supplied for foreach() in /home/sintegr/public_html/moodle/mod/lesson/view.php on line 1001

Can you help me with this problem?

I will appreciate your answer.

Crescenciano.

>