Cannot find data record in database table course_modules.

The error that you may see if you are currently using Moodle may be seen after cron runs or when heavy access occurs.  The error,

!!! Can not find data record in database table course_modules. !!!

The error is related to heavy transactions and what we believe is caching corrupting the database.

To fix the error, you can run this query:

select modinfo from mdl_course where id = PutYourCourseIDHere;

Below, we use MySQL Workbench to run the query on a course id of 2

mysql workbench

Query

 

 

There is also a Moodle plugin that rebuilds all of the site’s cache.

https://moodle.org/plugins/pluginversion.php?id=2400

Unable to fetch available updates data – unexpected cURL error

When working with PHP and Moodle’s LMS, sometimes you have to dig for answers.  The error “Unable to fetch available updates data – unexpected cURL error” actually has a fix that is easy to implement.   Finding the solution was a challenge.

Moodle 2.4 updates using SSL and now you should place a certificate in the Moodledata folder.  Dawn was on this two weeks ago but the documentation was missing something.  (She can find anything on the web!)  Following up on what she had found, I found the solution here:

https://moodle.org/forum/discuss.php?d=218800

Here’s the answer:

“It needs the ca-bundle.crt available at http://curl.haxx.se/ca/cacert.pem – Just copy the contents into a text file and rename it to moodleorgca.crt and place this in the root of the moodledata directory.”   This is a comment found here MDL-36903 on Moodle.org.

cURL CA Certs (referenced in the link above)

MySQL problem writing to database during cron backup

If you receive the error “!!!Error Writing To Database!!!” during a cron backup, this can be related to

Find the my.ini file which is normally located in the MySql folder under program files
(C:\Program Files\MySQL\MySQL Server 5.1).  Edit it by adding or modifying the line -

Max_Allowed_Packet = 100M   (adjust as necessary)

MaxAllowedPacket

Add detailed statistics to Moodle with Piwik

If you have Moodle running on a server with PHP with IIS, you can add detailed statistics with Piwik.  While Moodle Statistics are detailed and is capable of giving analytics.  Piwik can be used on any website to obtain statistical information.

On IIS, go to Piwik and download their latest release.  Extract the file and copy it to your root folder of c:\inetpub\wwwroot.   Set permissions to full control with the security table on the extracted folder. For Network and IUSR accounts.

If you are using Microsoft’s SQL, you will need to download MySQL by using the Microsoft Web App Installer.   Because you have Moodle up and running, select to install MySQL only.  (You should have extracted Piwik and PHP is already running on the server).  Follow the installer’s wizard.

Once installed create a table called Piwik with MySQL.  At the MySQL command line (found in your program files) type:

CREATE DATABASE Piwik

Remove the ; in front of   extension=php_mysqli.dll on the php.ini file.  Save the php.ini file.  You will need to start and stop IIS.

Follow the installation instructions - http://piwik.org/docs/installation/

Open up the index.php file under your Moodle installation on your webserver.  Navigate to the login folder.  Open the index.php file to edit it add the following code at the top of your code (this will make javascript run with php).

<html>
<body>    Add the code your installation tells you after the body tag (following the installation instructions you will see the code the programmer tells you to put in your website) – This can be done for any of the pages.

Sample below

Piwik gives you very detailed analytics.

Piwik is a downloadable, open source (GPL licensed) real time web analytics software program. It provides you with detailed reports on your website visitors: the search engines and keywords they used, the language they speak, your popular pages… and so much more.

Piwik aims to be an open source alternative to Google Analytics, and is already used on more than 200,000 websites.



Here’s a copy of our previous post on Moodle Stats not working -
Need Statistics to show in Moodle ?

We normally try to put freeware and solutions for all users; however this seems to be a problem with Higher Education that use Moodle.

FIRST – In the Date section in your php.ini file – find the line ;date.timezone =, remove the semi-colon from the front of it and set it to the timezone that you have set in Administration > Locations (In the Moodle Administration Settings).  (Mine is America/Chicago). The line in your ini file should look like this date.timezone =’American/Chicago’ .  Save the php.ini and the locations set in Moodle under the Server’s time.  Restart IIS or Apache.

Go to – Modules | Blocks | Statistics   Enter at least 90 days on the graph – Save your settings

Go to – Server | Statistics | Disable Statistics in Moodle |Enter Maximum Processing – All  | Enter Maximum Runtime – Until Complete  | Enter Days to process 365 | Enter a Run Time 5-20 minutes before your current time on your computer (try to do this when at a Time when the server is not in use or has low usage – I am doing this at 12:40 a.m. – the stat time is at 12:30 a.m.)  Go down and Save your Changes!  Yes, It is disabled at this point.

On the SQL Server run the following query -

delete from mdl_stats_daily;
delete from mdl_stats_weekly;

delete from mdl_stats_monthly;
delete from mdl_config where name like ‘%stats%’;

Open up Moodle and now Enable Statistics and SAVE

Run cron from the command line – (Windows users, at the command prompt type -
c:\php\php.exe -f C:\inetpub\wwwroot\admin\cron.php

This should have worked…good luck!

No Graph in Stats? 
Go to Server | System Paths and make sure you specify GD is installed.  You must also take away the ; in front of  extension=php_gd2.dll in your php.ini file.  If you modify your php.ini, you must restart your webserver.

Critical bug found in latest PHP release, users advised against updating

PHP users are advised against upgrading to the latest (5.3.7) release of the scripting language because a critical flaw has been spotted only a day before its release.  Critical bug found in latest PHP release, users advised against updating.

Becoming a nurse

If you have ever thought about becoming an LPN or CNA, you’ll find that you have to take an exam prior to starting class.  In today’s busy world prospective students may not have time to attend classes to prepare for this entrance exam.

Because this is a technology blog, and the buzz words of today are asynchronous training and cloud computing; here’s how we overcame the technical challenges of delivering class online while saving money.

The Tennessee Technology Center at Shelbyville will be offering the Allied Health (LPN, CNA, PCT/Medical Assistant) Test preparation as an online course through the TTC Shelbyville Learning Management System this fall.  Using technology to deliver the course online, the course will include sections on Numerical Skills/Pre-Algebra Placement Test and Reading.

The Allied Health LMS allows the student to access the course anywhere at any time.   There are two sections of the  test that students are tested on: Pre-Algebra and Reading. The minimum required score for acceptance into the registration process (Exam) may vary, depending on the school to which students are applying and the class into which the students want to enroll. Included with the course are 24 videos delivered by Kate Jacobs, Technology Foundations Teacher.   The videos have been optimized for delivery on any computer including mobile tablets and smartphones.    In addition to the videos, the course includes 78 detailed handouts along with eight practice exams. So how did we overcome the challenges?

Already being overwhelmed by the amount of work we can sometimes have, the IT department implemented the Moodle Learning Management system which is rated as one of the best free LMS systems available.   The cost of the server (we build our own) was only 20% of purchasing a server from a vendor.   The handouts were converted as PDFs and over 10 hours of instruction was recorded and converted to play on iPads, Android and computers.   The videos were compressed and optimized so that minimum bandwidth is used and can be delivered to low speed internet connections.

Adding users to Moodle is easy and fast.  Registration and classes can ‘clean’ up automatically and with logging, students can be monitored with state of the art communication providing ‘on the go’ students with the best possible experience.   Instructors can monitor student logins and progress so delivery quality can be monitored.

Opensource and freeware used -

Any Video Converter (free or inexpensive)

Stats Not Working on Moodle?

Need Statistics to show in Moodle ?

We normally try to put freeware and solutions for all users; however this seems to be a problem with Higher Education that use Moodle.

FIRST – In the Date section in your php.ini file – find the line ;date.timezone =, remove the semi-colon from the front of it and set it to the timezone that you have set in Administration > Locations (In the Moodle Administration Settings).  (Mine is America/Chicago). The line in your ini file should look like this date.timezone =’American/Chicago’ .  Save the php.ini and the locations set in Moodle under the Server’s time.  Restart IIS or Apache.

Go to – Modules | Blocks | Statistics   Enter at least 90 days on the graph – Save your settings

Go to – Server | Statistics | Disable Statistics in Moodle |Enter Maximum Processing – All  | Enter Maximum Runtime – Until Complete  | Enter Days to process 365 | Enter a Run Time 5-20 minutes before your current time on your computer (try to do this when at a Time when the server is not in use or has low usage – I am doing this at 12:40 a.m. – the stat time is at 12:30 a.m.)  Go down and Save your Changes!  Yes, It is disabled at this point.

On the SQL Server run the following query -

delete from mdl_stats_daily;

delete from mdl_stats_weekly;

delete from mdl_stats_monthly;
delete from mdl_config where name like ‘%stats%’;

Open up Moodle and now Enable Statistics and SAVE

Run cron from the command line – (Windows users, at the command prompt type -
c:\php\php.exe -f C:\inetpub\wwwroot\admin\cron.php

This should have worked…good luck!

No Graph in Stats?
Go to Server | System Paths and make sure you specify GD is installed.  You must also take away the ; in front of  extension=php_gd2.dll in your php.ini file.  If you modify your php.ini, you must restart your webserver.



Nida E-Learning added to IM Class

Butch Arnold, Industrial Maintenance instructor at TTC Shelbyville has recently networked a dozen or more PLCs, installed RSLinx and Rockwell software to further implement tools students can use in the classroom.   After his installation of Motoman Robots and Green Training  (Wind Turbines and solar power), his recent addition includes Nida’s E-Learning Suite that allows students to use our Moodle Learning Management System to login and use and access their lessons 24/7 (Nida software is SCORM compliant).

For more information on Nida visit their website

.   x   

Motoman Demo

RSLinx by Rockwell Automation

Allow programming of multiple Rockwell Automation Software, the picture below from Rockwell Automation shows how this RSLinx, RSLogix 5000 and other hardware can be used.

The combination of all of this software and hardware makes this one of the most technical industrial maintenance classes in the state.

How Moodle Can Help Higher Education

In today’s economy, e-learning can be expensive.  With licensing fees and tons of technical personal, many of today’s e-learning solutions costs colleges, universities and k-12 a ton of money. Moodle can save these organizations money and because it is open source and free, it can be used for non-profits and commercial businesses.

We recently put a sub $1000 server in place with 4 GB of RAM, Quad-Core, and a Terra-byte of hard drive space (2 500 GB Hard Drives).  With Dawn, Mike and I double checking each other, we were done in a couple of hours.    Moodle was loaded along with PHP and Microsoft’s SQL.  After tweaking the server out and configuring the software, we were able to begin loading information.  The Moodle guys and girls have produced an application that if you follow the instructions, you can install it.  User friendly and easy to navigate makes Moodle easier to use than the larger organizations.

Benefits for Students

  • Online Tasks
  • Online Tests
  • Saves Paper / Keeps you organized
  • Grades
  • Blogs
  • Quizzes
  • Movies (embedded or uploaded)
  • PowerPoints (embedded or linked)
  • Supports Microsoft Office
  • Google or Microsoft Maps
  • many many more features…

Our goal is to put our classes online.  Not necessarily to teach online but to have the materials available for students if they are out or if the instructor is absent and a sub can’t make it in time.

Moodle Benefits

How to embed a Map Into Moodle

Moodle is an online learning Management System.  This powerful OpenSource system allows for elearning for K-Higher Ed.

Map

Wanting to add a map to our Moodle Beta e-learning site, I added this code to Moodle and came up with an excellent Bird’s Eye view of our school.   You will have to change the Latitude and longitude of your location.

<base target=”_self”>
 <script type=”text/javascript” src=”http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2″></script>  
           <script type=”text/javascript”>     
              var map = null;      
                var SpaceNeedle = new VELatLong(35.485729111, -86.420983111);  
                      var pinLocation = new VELatLong(35.485729111, -86.420983111);   
                           function GetMap()      
                             {         
                               map = new VEMap(‘myMap’);    
                                      map.LoadMap(SpaceNeedle, 17);     
                                            // Let me know if a birdseye scene is available       
                                                map.AttachEvent(“onobliqueenter”, OnObliqueEnterHandler);    
                                                    }         function OnObliqueEnterHandler()      
                                                      {       
                                                          if(map.IsBirdseyeAvailable())     
                                                                {          
                                                                    var TopOfNeedle = new VELatLong(35.485729111, -86.420983111);   
                                                                                map.SetBirdseyeScene(TopOfNeedle); 
                                                                                          }    
                                                                                              } 
                                                                                             
    </script>

</head>
<body onload=”GetMap();” bgcolor=”#008080″>   

 <center>
   <div id=’myMap’ style=”position:relative; width:735px; height:553px;”></center> 

Step by Step Instructions

  • Navigate to your site
  • Login
  • Turn on Editing
  • Navigate to where you want the map inserted
  • Select Resources
  • Compose a webpage
  • Title the page
  • Navigate to the Full Text Area
  • Toggle HTML source  <>
  • Copy and paste the above code adjusting the Latitude and longitude along with the width and height

Resource to find Lat and long: http://www.batchgeocode.com/lookup/

  • Select Course Blocks
  • Save

 Log in and turn editing on   Create a Webpage   Title Embed and paste your code  Check Course Blocks and Save