Picture of Suzanne Yonesaka
Enrolling students
by Suzanne Yonesaka - Monday, 25 September 2006, 07:04 AM
 
Hi,
Thanks to everyone's help, my new moodle course is set up and I am SO excited! There is a bit of a problem getting students into the course, however.

When students try to join the Moodle, no confirming e-mail is sent. Yet the are listed as participants in the Admin window. They are waiting for me to confirm them, but I have received no notice that memberships are pending, either.

I have a feeling it has to do with Chron.php.  In the Admin, there is a notice about: 
“The cron.php script has not been run for at least 24 hours.”
Since I only joined the Moodle later as an administrator, I'm not really sure what has already been done when setting it up, but I do understand that chron.php is what needs to happen to make Moodle check up on things.

I read the help:
"6. Set up cron -- IMPORTANT!"
But I really can't make heads or tails of it, no matter how many times I read it!  I'm on MacOSX. Any advice?

So, two questions:
(1) What do I need to do to make sure students can enroll?
(2) Is the chron.php a separate issue?

I will have 90 students enrolling within the next week, so I need to figure this out fairly quickly! Either that, or just collect their e-mail addresses on the first day of class, and assign them user names and passwords myself??? (It might be simpler in the long run.)

Many thanks for any help anyone can offer, especially in this busy week with classes just kicking in.

Suzanne




Picture of Eric Hagley
Re: Enrolling students
by Eric Hagley - Monday, 25 September 2006, 09:47 AM
 
Ian, or whoever is looking after the site, will have to go to his cpanel and click on "cron jobs". He will then probably get a choice of standard or advanced unix types. He should choose "standard". There is then a place where entries can be made. In the "entry" box he should type the following:

lynx -dump http://sitename.sitename2.org/moodle/admin/cron.php > /dev/null


If the site you are using is for example mysite.org then the above would become:
lynx -dump http://mysite.org/moodle/admin/cron.php > /dev/null

You then have to fill in the time you want the cron job to run. Moodle suggests every 15 minutes. (thereafter you should also click every hour, every day, every month every weekday).

Then click on "save crontab".
This is outside the moodle site so you will not be able to do this. If you are using Ian's site he will have to go in through cpanel to do this.
Hope you get it up and running.
Eric
Picture of Don Hinkelman
Re: Enrolling students - Setting up Cron
by Don Hinkelman - Monday, 25 September 2006, 09:55 AM
 
Hi Suzanne,

Thanks for sharing your question here on Englishforum.  I think it is a key question that everyone should be aware of to make your Moodle server, or any LMS server to work well.

You are probably correct that the issue is because "cron" has not been set up.  It is a basic step in moodle setup and perhaps because Ian has not really used his site (I understand you are borrowing a course from Ian's site), that everything has been made ready.

So here is what you have to do.  First, find out the correct cron setting--it looks like Eric has given one.  You can also look in the setup/installation manual of moodle to find the correct setting it needs.  Second, go into your cPanel of your site (not the admin of moodle). Cron is outside of moodle and outside of your local computer OS (MacOSX) and you must have admin status of the cPanel.  In cPanel, you can set up a cron (also called "crontab"), so that every five minutes or so all emails are sent out of your Moodle site.

In the meantime, if you want to enroll students without confirming emails, you can set your authentication to "No Verification".  This will allow them to use the site while you figure out cron.  But the problem with this method is that students can mistype their email address--and in my experience, about 10-20% will mistype and you will have to fix those addresses manually.  So it could make more trouble for you overall. 

If you are ready to try out cPanel, give me a phone call and I can walk you through it.  smile    Don
Picture of Suzanne Yonesaka
Re: Enrolling students - Setting up Cron
by Suzanne Yonesaka - Monday, 25 September 2006, 12:01 PM
 
Thank you, Eric and Don, for your super-fast replies. It looks like Ian will need to take care of this, as the "uber-administrator". I will give you a call, Don, when he is ready!

In the meantime, I will tell students that I am confirming them by hand and will ask them to send me an e-mail after they try to join the Moodle. Then I can go online and confirm them. I'd rather do that than have their addresses be wrong and never know about it until the end of the semester.

Thanks again!
Suzanne
Picture of Suzanne Yonesaka
Re: Enrolling students - Setting up Cron
by Suzanne Yonesaka - Monday, 25 September 2006, 07:12 PM
 
Hi Eric and Don,

Thanks for your very clear instructions. Ian and I did the cPanel cron. I'm not sure if it is working, though. The message "The cron.php maintenance script has not been run for at least 24 hours" is still there. In the logs, there are several messages "ERROR: Could not instantiate mail function." Posts to the Moodle forum seem to suggest a firewall problem, which I can't even pretend to figure out.

Anyway, I am happily approving students' accounts by hand and it is working OK. Thanks so much for all of your help.

Suzanne
Picture of Eric Hagley
Re: Enrolling students - Setting up Cron
by Eric Hagley - Monday, 25 September 2006, 11:14 PM
 
If you did this from inside Hokkai Gakuen, I know that their firewall is one of the toughest in Sapporo. You may have to try it again from outside of the Uni. Once it is set up though it works in Hokkai's environment.
Also, there should be a button in your moodle main page admin section where the "The cron.php maintenance script has not been run for at least 24 hours" message comes up. The button should say "run cron job now". If there isn't one, you can type into your browser address bar

http://mysite.org/moodle/admin/cron.php

if your site is http://mysite.org/moodle

this should run the cron. If there are no problems you should get a message at the bottom saying
Cron script completed correctly
Execution took 0.589214 seconds

or something to that effect.
If there are problems, the maybe you'll need to have a look again at the cron job. I'm at Hokkai tomorrow and can pop in and have a look at lunch time if you'd like. Let me know - I'll be in the part timers' room at a little before 9am.
Eric
Picture of Suzanne Yonesaka
Re: Enrolling students - Setting up Cron
by Suzanne Yonesaka - Thursday, 28 September 2006, 09:21 AM
 
Good morning, Eric and Don, my mentors!

This is where we are with the cron and getting students to enroll. At this point, I am enrolling them by hand when they come to me saying "nothings happening!" And I pat them on the back and reassure them that its not their fault.

(1) Ian followed Eric's instructions using a computer outside the HGU firewall. He input the numbers in the c-panel. I don't know if he understood how to check it if was working. After that, students still were not getting e-mails confirming their request to join the Moodle.

(2) I found the following on the Moodle.org documents:

********
Your web-based control panel may have a web page that allows you to
set up this cron process.
If you are using CPanel, login then look for the heading "Advanced" on
the page. Click on Cron Jobs -> Advanced (unix style). Enter the
following for the cron to run every 30 minutes.
Email address for output: emailaddress@mydomain.con (I think they
meant "com" --SY)
Minute:*/30
Hour:*
Day:*
Month:*
Weekday:*
Command: wget -q -O /dev/null http://www.mydomain.com/moodle/admin/cron.php
Click Commit Changes. Check your email for the output.
********
Ian input this from a computer outside the HGU firewall (at his home). Of course, I was not there, so I am not exactly sure what he did.

(3) Also I ran the php script from my own computer at home just now by adding "cron.php" to the end of the address in the browser and it said it was completed. However, the "cron has not been run for at least 24 hours" message is still there.

(4) I set up a dummy account to test whether e-mail responses were being returned. I got an error message, and the site logs say" ERROR: Could not instantiate mail function." Could it be that Ian needs to set up something for sending and receiving e-mails in his account? Or is it in the configuration section of Moodle. Nothing has been filled in in that section, and I have a feeling that there should be something.

Obviously, its like the sight-impaired leading the sight-impaired right now. And its a bit awkward for me to keep going back to Ian, asking him to try this or that. I'm sorry to bother you with such basic questions. But if you have any more ideas, I'd appreciate it!

Suzanne
Picture of Eric Hagley
Re: Enrolling students - Setting up Cron
by Eric Hagley - Thursday, 28 September 2006, 10:15 AM
 
I'm wondering if it may be something to do with Ian's hosting company. Who does he use? Some hosting companies are a little strict with cron as it uses a lot of resources on the server. If you could find out by asking Ian to ask the server if he is allowed to run cron Jobs, it will be a start.
Eric
Picture of Sonoyo Ishikawa
Re: Enrolling students - Setting up Cron
by Sonoyo Ishikawa - Thursday, 28 September 2006, 10:41 AM
 
Hi.
I would recommend Ian to contact his hosting company to let him know exact command he should input in CPanel.
I had a difficult time setting up cron through my CPanel before. I contacted my host company, and they told me to input this in the "command" portion: */15 * * * * /usr/bin/php -q /home/mydomain/public_html/moodle/admin/cron.php

Every hosting searvice requires different commnad, I guess. Ian may need to input the right command for his CPanel.
Hope your cron will work. Good luck.
Picture of Peter Ruthven-Stuart
Re: Enrolling students - Setting up Cron
by Peter Ruthven-Stuart - Thursday, 28 September 2006, 01:23 PM
 
Hello,

Suzanne any luck?

Perhaps these screenshots might help. I have 4 moodles running on a hosted server (Bluehost), and the cron jobs were all automatically set by Fantastico, the system that many hosting companies provide to 'easify' the installation of various software packages such as Moodle.

Any way, when I go to my CPanel and click on 'Cron Jobs' the next thing I see is this:

Cron Jobs Pleas choose

If I click on [ Standard ],  I see this:

Standard Cron Job Manager

You'll see that the 'command line' is almost the same as what Eric suggested, however notice the quotation marks either side of the cron.php URL. I imagine that this will make a difference. Then again, as Sonoyo suggests, depending on the hosting company and their system, the syntax of the command line might be a little different.

If I click on [ Advanced (Unix Style) ], the next screen I see is this:

Advanced Cron Manager

Yes, I know it says "Standard Cron Manager", but that's a mistake, this is my Advanced Cron Manager. Here's how it has been set:

Minute
Hour
Day
Month
Weekday
Command
*/15
*
*
*
*
lynx -dump 'http://moodle.petesweb.org/admin/cron.php' > /dev/null

I have also attached a copy of the the 'Crontab Syntax' page from the help file of Cronnix, a piece of software that runs cron jobs on Mac servers. You don't need this software, but the attached pdf (see top right of this message), may be of help.

Finally, if there is a link to Cron Jobs in your CPanel then it is highly likely that your hosting company allows you to execute them. So, from what you have written, I would say that the Cron Job syntax is incorrect, or your mail system has not been setup correctly. One way to check this is to go to a Forum within one of your courses, and before you click on the [ Post to forum ] button, make sure that you are subscribed to the forum: at the bottom of the screen where you write a new post there is a pulldown menu, you should choose "Send me email copies of posts to this forum", then click the - Mail now - checkbox. If your mail system has been correctly set up, you should get a copy of your post sent to you within a few minutes, regardless of whether or not the cron job is correct. Note that this [ Mail now ] option is, I think a feature new to Moodle 1.6, so you may not be able to do this. Also, when I set up my 4 moodle on the hosted server, I did not have to make any mail settings, either within the Moodle admin, nor the CPanel admin, it just worked.

If you need more detailed help, you or Ian are welcome to email me. Although, I'm sure with all those Moodlers in Sapporo you'll have the problem fixed in no time big grin .

Best of luck.
Picture of Don Hinkelman
Re: Enrolling students - Setting up Cron
by Don Hinkelman - Thursday, 28 September 2006, 06:13 PM
 
Lovely screenshots, Peter!  This a mini-manual we all need.

By the way, everyone, at the CALL Workshop-October 21st, Peter is leading two workshops.  See attached schedule.  smile
Picture of Suzanne Yonesaka
Re: Enrolling students - Setting up Cron
by Suzanne Yonesaka - Thursday, 28 September 2006, 07:10 PM
 
Thank you all, dear Moodlers, for all of your advice. I have been trying all sorts of things all day long in between classes.

The last thing that Ian and I did was to follow Peter's detailed instructions from here at school. However, it doesnt seem to be working, so I will ask Ian to try it again tonight from home, outside the firewall. Also, he has asked his provider for the script as well (just in case.)

Also, I followed Peter's excellent instructions on checking whether or ot the mail function was really processing. In fact, I changed my own e-mial from a Hokkai gakuen address to a gmail address just in case it was being blocked by a firewall. I ran the cron.php script and it said: Could not instantiate mail function. So it seems that there is something wrong there as well.

Anyway, I will let you all know how things are going after Ian tries again!

One thing I have learned: How great the Moodle support community is!

Still hanging in there,
Suzanne