What ever it is it effects all messages regardless of who sends them. Im starting to think something on the server changed and is causing it. I deleted the message module and let it reinstall but problems is still there.
Chad Parmentier
Beiträge von Chad Parmentier
I'm stuck, not sure if a student is playing with chat/bombs or what.
When messages are received they repeat every 8-10 seconds.
I attached a screen shot.
When messages are received they repeat every 8-10 seconds.
I attached a screen shot.
I am still a newbie but very progressive. I was thinking about working with some local programmers in trying to develop a flash based live streaming video module for Moodle. Something out there that is similar is Stickam player. I would like to have the player embedded in Moodle and controlled from Moodle, as to insure a secure environment for students but have the ability to embed the player in other websites. If a section in Moodle could produce html code that could be pasted into another site basically causing the feed in the website to mirror whats happening on the Moodle mod. What do you all think about this? I hope the programmers don't ask to much for their work but if I can get this I want to offer it as open source. I thought about attempting to get the mod to work with blackboard to but charge BB users, that might pay for our version and allow communication between BB and Moodle users, we can just keep the better features huh? Anyway just curious.
Hi i am running 1.5.3. Moodle is set to cron every 5 min and the cron runs according to server but email fails to send from forums. But if a cron is run from the browser, or command line, everything works great. At first I had my SMTP set to the mail server i.e mail.virtuallanguagearts.org then I erased it so moodle would use internal mail, result was same problem. FYI here is a copy of the cron I am running...
#0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/php /home/virtual/site307/fst/var/www/html/moodle/admin/cron.php
*/5 * * * * cd /home/virtual/site307/fst/var/www/html/moodle/admin; /usr/bin/php cron.php
Moodle is installed in the html folder in a folder called moodle. So the index pulls a webpage and you link from the index.html into moodle, index.php.
I am completely stumped.
the following is the cron.php itself if this helps
#! /usr/bin/php
<?PHP // $Id: cron.php,v 1.68 2005/05/17 00:18:37 martinlanghoff Exp $
/// This script looks through all the module directories for cron.php files
/// and runs them. These files can contain cleanup functions, email functions
/// or anything that needs to be run on a regular basis.
///
/// This file is best run from cron on the host system (ie outside PHP).
/// The script can either be invoked via the web server or via a standalone
/// version of PHP compiled for CGI.
///
/// eg wget -q -O /dev/null 'http://moodle.somewhere.edu/admin/cron.php'
/// or php /web/moodle/admin/cron.php
$starttime = microtime();
/// The following is a hack necessary to allow this script to work well
/// from the command line.
define('FULLME', 'cron');
/// The current directory in PHP version 4.3.0 and above isn't necessarily the
/// directory of the script when run from the command line. The require_once()
/// would fail, so we'll have to chdir()
if (!isset($_SERVER['REMOTE_ADDR']) && isset($_SERVER['argv'][0])) {
chdir(dirname($_SERVER['argv'][0]));
}
require_once("../config.php");
if (!$alreadyadmin = isadmin()) {
unset($_SESSION['USER']);
unset($USER);
unset($_SESSION['SESSION']);
unset($SESSION);
$USER = get_admin(); /// Temporarily, to provide environment for this script
}
//unset test cookie, user must login again anyway
setcookie('MoodleSessionTest'.$CFG->sessioncookie, '', time() - 3600, '/');
/// Start output log
$timenow = time();
mtrace("
#0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/php /home/virtual/site307/fst/var/www/html/moodle/admin/cron.php
*/5 * * * * cd /home/virtual/site307/fst/var/www/html/moodle/admin; /usr/bin/php cron.php
Moodle is installed in the html folder in a folder called moodle. So the index pulls a webpage and you link from the index.html into moodle, index.php.
I am completely stumped.
the following is the cron.php itself if this helps
#! /usr/bin/php
<?PHP // $Id: cron.php,v 1.68 2005/05/17 00:18:37 martinlanghoff Exp $
/// This script looks through all the module directories for cron.php files
/// and runs them. These files can contain cleanup functions, email functions
/// or anything that needs to be run on a regular basis.
///
/// This file is best run from cron on the host system (ie outside PHP).
/// The script can either be invoked via the web server or via a standalone
/// version of PHP compiled for CGI.
///
/// eg wget -q -O /dev/null 'http://moodle.somewhere.edu/admin/cron.php'
/// or php /web/moodle/admin/cron.php
$starttime = microtime();
/// The following is a hack necessary to allow this script to work well
/// from the command line.
define('FULLME', 'cron');
/// The current directory in PHP version 4.3.0 and above isn't necessarily the
/// directory of the script when run from the command line. The require_once()
/// would fail, so we'll have to chdir()
if (!isset($_SERVER['REMOTE_ADDR']) && isset($_SERVER['argv'][0])) {
chdir(dirname($_SERVER['argv'][0]));
}
require_once("../config.php");
if (!$alreadyadmin = isadmin()) {
unset($_SESSION['USER']);
unset($USER);
unset($_SESSION['SESSION']);
unset($SESSION);
$USER = get_admin(); /// Temporarily, to provide environment for this script
}
//unset test cookie, user must login again anyway
setcookie('MoodleSessionTest'.$CFG->sessioncookie, '', time() - 3600, '/');
/// Start output log
$timenow = time();
mtrace("
");
mtrace("Server Time: ".date('r',$timenow)."\n\n");
/// Run all cron jobs for each module
mtrace("Starting activity modules");
if ($mods = get_records_select("modules", "cron > 0 AND (($timenow - lastcron) > cron)")) {
foreach ($mods as $mod) {
$libfile = "$CFG->dirroot/mod/$mod->name/lib.php";
if (file_exists($libfile)) {
include_once($libfile);
$cron_function = $mod->name."_cron";
if (function_exists($cron_function)) {
mtrace("Processing module function $cron_function ...", '');
if ($cron_function()) {
if (! set_field("modules", "lastcron", $timenow, "id", $mod->id)) {
mtrace("Error: could not update timestamp for $mod->fullname");
}
}
mtrace("done.");
}
}
}
}
mtrace("Finished activity modules");
if (!empty($CFG->langcache)) {
mtrace('Updating languages cache');
get_list_of_languages();
}
/// Run all core cron jobs, but not every time since they aren't too important.
/// These don't have a timer to reduce load, so we'll use a random number
/// to randomly choose the percentage of times we should run these jobs.
srand ((double) microtime() * 10000000);
$random100 = rand(0,100);
if ($random100 < 20) { // Approximately 20% of the time.
mtrace("Running clean-up tasks...");
/// Unenrol users who haven't logged in for $CFG->longtimenosee
if ($CFG->longtimenosee) { // value in days
$longtime = $timenow - ($CFG->longtimenosee * 3600 * 24);
if ($students = get_users_longtimenosee($longtime)) {
foreach ($students as $student) {
if (unenrol_student($student->userid, $student->course)) {
mtrace("Deleted student enrolment for user $student->userid from course $student->course");
}
}
}
}
/// Delete users who haven't confirmed within required period
$oneweek = $timenow - ($CFG->deleteunconfirmed * 3600);
if ($users = get_users_unconfirmed($oneweek)) {
foreach ($users as $user) {
if (delete_records("user", "id", $user->id)) {
mtrace("Deleted unconfirmed user for ".fullname($user, true)." ($user->id)");
}
}
}
flush();
/// Delete old logs to save space (this might need a timer to slow it down...)
if (!empty($CFG->loglifetime)) { // value in days
$loglifetime = $timenow - ($CFG->loglifetime * 3600 * 24);
delete_records_select("log", "time < '$loglifetime'");
}
flush();
/// Delete old cached texts
if (!empty($CFG->cachetext)) { // Defined in config.php
$cachelifetime = time() - $CFG->cachetext;
delete_records_select("cache_text", "timemodified < '$cachelifetime'");
}
flush();
if (!empty($CFG->notifyloginfailures)) {
notify_login_failures();
}
flush();
sync_metacourses();
} // End of occasional clean-up tasks
if (!isset($CFG->disablescheduledbackups)) { // Defined in config.php
//Execute backup's cron
//Perhaps a long time and memory could help in large sites
@set_time_limit(0);
@raise_memory_limit("128M");
if (file_exists("$CFG->dirroot/backup/backup_scheduled.php") and
file_exists("$CFG->dirroot/backup/backuplib.php") and
file_exists("$CFG->dirroot/backup/lib.php") and
file_exists("$CFG->libdir/blocklib.php")) {
include_once("$CFG->dirroot/backup/backup_scheduled.php");
include_once("$CFG->dirroot/backup/backuplib.php");
include_once("$CFG->dirroot/backup/lib.php");
require_once ("$CFG->libdir/blocklib.php");
mtrace("Running backups if required...");
if (! schedule_backup_cron()) {
mtrace("ERORR: Something went wrong while performing backup tasks!!!");
} else {
mtrace("Backup tasks finished.");
}
}
}
if (!empty($CFG->enablerssfeeds)) { //Defined in admin/variables page
include_once("$CFG->libdir/rsslib.php");
mtrace("Running rssfeeds if required...");
if ( ! cron_rss_feeds()) {
mtrace("Something went wrong while generating rssfeeds!!!");
} else {
mtrace("Rssfeeds finished");
}
}
/// Run the enrolment cron, if any
require_once("$CFG->dirroot/enrol/$CFG->enrol/enrol.php");
$enrol = new enrolment_plugin();
$enrol->cron();
if (!empty($enrol->log)) {
mtrace($enrol->log);
}
//Unset session variables and destroy it
@session_unset();
@session_destroy();
mtrace("Cron script completed correctly");
$difftime = microtime_diff($starttime, microtime());
mtrace("Execution took ".$difftime." seconds");
?>
Thanks for your response. I had my web host put this in place of the other cron and they are now confused. The cron runs great from a browser, and thier logs show this cron as running but I only get email from the subscribed forums when I manually run a cron. The web host is olm.net and they are running linux redhat, apache, MySQL, ensim.
(This is a masters project for the University of Michigan) I am tring to show schools that open source software is a valid alternative and saves money.
FYI here is a read out of what happens when I run the cron manually.
#! /usr/bin/php
Server Time: Mon, 13 Feb 2006 01:24:59 -0500
Starting activity modules
Processing module function assignment_cron ...done.
Processing module function chat_cron ...done.
Processing module function forum_cron ...
Success
Processing post 44
.... mailed to 6 users.
done.
Processing module function journal_cron ...done.
Processing module function workshop_cron ...done.
Processing module function ipodcast_cron ...
Checking English Essentials Podcast for unpublished podcasts
Checking Martin Dougiamas on moodle for unpublished podcasts
done.
Finished activity modules
Updating languages cache
Running backups if required...
Checking backup status...INACTIVE
Backup tasks finished.
Running rssfeeds if required...
Generating rssfeeds...
assignment: ...NOT SUPPORTED (file)
chat: ...NOT SUPPORTED (file)
choice: ...NOT SUPPORTED (file)
forum: generating ...OK
glossary: generating ...OK
hotpot: ...NOT SUPPORTED (file)
journal: ...NOT SUPPORTED (file)
label: ...NOT SUPPORTED (file)
lesson: ...NOT SUPPORTED (file)
quiz: ...NOT SUPPORTED (file)
resource: ...NOT SUPPORTED (file)
scorm: ...NOT SUPPORTED (file)
survey: ...NOT SUPPORTED (file)
wiki: ...NOT SUPPORTED (file)
workshop: ...NOT SUPPORTED (file)
book: ...NOT SUPPORTED (file)
flash: ...NOT SUPPORTED (file)
ipodcast: ...NOT SUPPORTED (function)
Ending rssfeeds......OK
Rssfeeds finished
Cron script completed correctly
Execution took 5.314337 seconds
(This is a masters project for the University of Michigan) I am tring to show schools that open source software is a valid alternative and saves money.
FYI here is a read out of what happens when I run the cron manually.
#! /usr/bin/php
Server Time: Mon, 13 Feb 2006 01:24:59 -0500
Starting activity modules
Processing module function assignment_cron ...done.
Processing module function chat_cron ...done.
Processing module function forum_cron ...
Success
Processing post 44
.... mailed to 6 users.
done.
Processing module function journal_cron ...done.
Processing module function workshop_cron ...done.
Processing module function ipodcast_cron ...
Checking English Essentials Podcast for unpublished podcasts
Checking Martin Dougiamas on moodle for unpublished podcasts
done.
Finished activity modules
Updating languages cache
Running backups if required...
Checking backup status...INACTIVE
Backup tasks finished.
Running rssfeeds if required...
Generating rssfeeds...
assignment: ...NOT SUPPORTED (file)
chat: ...NOT SUPPORTED (file)
choice: ...NOT SUPPORTED (file)
forum: generating ...OK
glossary: generating ...OK
hotpot: ...NOT SUPPORTED (file)
journal: ...NOT SUPPORTED (file)
label: ...NOT SUPPORTED (file)
lesson: ...NOT SUPPORTED (file)
quiz: ...NOT SUPPORTED (file)
resource: ...NOT SUPPORTED (file)
scorm: ...NOT SUPPORTED (file)
survey: ...NOT SUPPORTED (file)
wiki: ...NOT SUPPORTED (file)
workshop: ...NOT SUPPORTED (file)
book: ...NOT SUPPORTED (file)
flash: ...NOT SUPPORTED (file)
ipodcast: ...NOT SUPPORTED (function)
Ending rssfeeds......OK
Rssfeeds finished
Cron script completed correctly
Execution took 5.314337 seconds