由 Ross Stanbridge 发起的话题

Hi,

Statistics are not working for my moodle site.  When I run the cron, either scheduled or manually, I get the following output (with debug settings set to developer).

Running auth crons if required...
Running daily statistics gathering, starting at 1223942400:
1:0 2:0 3:1 <div class="notifytiny" style="text-align:center"><br /><br />UPDATE mdl_stats_daily
                   SET stat2 = (SELECT COUNT(DISTINCT ra.userid)
                                  FROM mdl_role_assignments ra JOIN mdl_context ctx
                  ON ctx.id = ra.contextid
             CROSS JOIN mdl_course c
             JOIN mdl_role_capabilities rc
                  ON rc.roleid = ra.roleid LEFT OUTER JOIN mdl_course_categories cc1
                            ON cc1.id = c.category
                                 WHERE ra.roleid = mdl_stats_daily.roleid AND
                                       c.id = mdl_stats_daily.courseid AND
                                       ((rc.capability = 'moodle/course:view' )
               AND rc.permission = 1 AND rc.contextid = 1
               AND (ctx.contextlevel = 10
                    OR (c.id = ctx.instanceid AND ctx.contextlevel = 50) OR (cc1.id = ctx.instanceid AND ctx.contextlevel = 40))) AND
                                       EXISTS (SELECT 'x'
                                                 FROM mdl_log l
                                                WHERE l.course = mdl_stats_daily.courseid AND
                                                      l.userid = ra.userid AND l.time &gt;= 1223942400  AND l.time  &lt; 1224028800))
                 WHERE mdl_stats_daily.stattype = 'enrolments' AND
                       mdl_stats_daily.timeend = 1224028800 AND
                       mdl_stats_daily.courseid IN
                          (SELECT DISTINCT l.course
                             FROM mdl_log l
                            WHERE l.time &gt;= 1223942400  AND l.time  &lt; 1224028800)<ul style="text-align:left"><li>line 103 of lib\dmllib.php: call to debugging()</li><li>line 255 of lib\statslib.php: call to execute_sql()</li><li>line 468 of admin\cron.php: call to stats_cron_daily()</li></ul></div>
<div class="notifytiny" style="text-align:center"><br /><br />SELECT name FROM mdl_config WHERE name = 'statsrunning'<ul style="text-align:left"><li>line 686 of lib\dmllib.php: call to debugging()</li><li>line 1134 of lib\dmllib.php: call to get_recordset_sql()</li><li>line 1098 of lib\dmllib.php: call to get_field_sql()</li><li>line 648 of lib\moodlelib.php: call to get_field()</li><li>line 476 of lib\adminlib.php: call to set_config()</li><li>line 559 of lib\statslib.php: call to set_cron_lock()</li><li>line 468 of admin\cron.php: call to stats_cron_daily()</li></ul></div>
...error occured, completed 0 days of statistics.
Cron script completed correctly

 My Moodle setup is: Moodle 1.9.3+ (20081015), Apache 2.2, Php 5.2.6, MS SQL 2005 and FreeTDS

Cheers,

Ross

Moodle in English -> General help -> My Moodle not working

Ross Stanbridge -

"My Moodle" has stopped working on our system.  10% of the time it works.  The other 90% of the time we now get the following output (with debugging switched on):


Ambiguous column name 'sortorder'.

SELECT c.id,c.sortorder,c.shortname,c.idnumber,c.category,c.fullname,c.teacher,c.teachers,c.student,c.students,c.guest,c.startdate,c.visible,c.newsitems,c.cost,c.enrol,c.groupmode,c.groupmodeforce,c.*, ctxid, ctxpath, ctxdepth, ctxlevel, categorypath FROM ( SELECT c.id, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, cc.path AS categorypath FROM mdl_course c JOIN mdl_course_categories cc ON c.category=cc.id JOIN mdl_context ctx ON (c.id=ctx.instanceid AND ctx.contextlevel=50) JOIN mdl_role_assignments ra ON (ra.contextid=ctx.id AND ra.userid=2) UNION SELECT c.id, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, cc.path AS categorypath FROM mdl_course c JOIN mdl_course_categories cc ON c.category=cc.id JOIN mdl_context ctx ON (c.id=ctx.instanceid AND ctx.contextlevel=50) JOIN mdl_role_capabilities rc ON (rc.contextid=ctx.id AND (rc.capability='moodle/course:view' )) ) inline_view INNER JOIN mdl_course c ON inline_view.id = c.id ORDER BY visible DESC,sortorder ASC
  • line 686 of lib\dmllib.php: call to debugging()
  • line 1065 of lib\accesslib.php: call to get_recordset_sql()
  • line 936 of lib\datalib.php: call to get_user_courses_bycap()
  • line 68 of my\index.php: call to get_my_courses()
No course information to show.
 

Our Moodle setup is Moodle 1.9.3 (20081015), Apache 2.2, Windows 2003, PHP 5.2 and MS SQL 2005 (with FreeTDS DB connection).

Hi,

I've got a strange problem where if I move a course between course categories I can no longer edit the contents of that course!  I can still see the contents of the course but the editing buttons don't appear when I click "Turn Editing On", although I can add new content.  NB: course can always be edited by Moodle Administrator.

I'm currently running Moodle 1.9.2 (20080820).

Cheers,

Ross

Does anyone know if it is possible to put your MoodleData folder on a mapped network drive, (shared from another windows machine). We've tried it but keep getting a message repeated 3 times at the top of out Moodle site saying "Error: you need to create the directory Y:\MoodleData with web server write access". We've managed to rule out permissions. It seems that Moodle simply won't look at mapped network drives on a windows setup.

Any help, (even if it's just telling me that it definitely won't work), would be most appreciated.

Thanks

Ross Stanbridge