Adding SCORM 1.2 to Moodle 2.0


How can you upload SCORM 1.2 package to Moodle 2.0? or Is your SCORM Packages is not working in Moodle 2.0?

When I upload SCORM1.2 to Moodle 2.0 and try to access the SCORM file, I was getting this error message

" Sorry, the requested file could not be found"  The reason I was getting this error because of the file names and they way I zipped the contents before I upload to Moodle.

This is what I have to do to make my SCORM 1.2 package work for me in Moodle 2.0.  I hope this will help you or get some idea about how you can upload SCROM 1.2 package to Moodle 2.0

1.  Go to to your folder where you have your SCORM 1.2 files are located.

2. Do not right click and zip the file. If you right click and create a zip package, it creates folder with in folder.  

SCORM Package for Moodle

3. Go inside of your folder and select all or CTRL + A and Right click on any file WinZip | Add to Zip |

 select-all-files-zip-2

4. Keep your zip file name simple.
I had problem after uploading SCORM file with long name with spaces

wrong-file-name-3-1

Simple name for SCORM package
My SCROM package worked in Moodle when I renamed the file with simple name with out any spaces

simple-name-scorm-2-1

5. Go to your Moodle site and Add an Activity and SCORM Package

add-an-activity-scorm-package

6.  Add a name and description for your SCROM package and choose a package file

scorm-general-4

7.  When you choose a file, File Picker window will open and select Upload a file and browse and attach your SCROM File

upload-scorm-package-to-moodle-5

8. Select your SCROM package and open and click on Upload this file to Moodle

upload-zip-scorm-file-to-moodle-6

9.  Your  SCORM package is ready for Moodle.  

open-scorm-package-7

10. When you click your SCROM package, you will get a option to preview or normal mode. Click on Normal and Enter to see your QUIZ

 open-scorm-in-moodle-7

11. Successfully uploaded SCROM 1.2 package to Moodle 2.0

scorm-quiz-in-moodle-8

Maximum file upload size in Moodle


In Moodle 2.X, by default maximum upload file size is 2MB. How do you increase the max upload size for Moodle?

The solution which you see here apply to you if your Moodle is running in a Shared Hosting.  Right now my Moodle site is hosted at Bluehost.com and using cPanel.

1. Use your FTP client and connect to your Moodle server and open public_html folder.  In public_html folder you will find a file called php.in.  Click on php.in file and press edit button.

Editing PHP.INI fine in Moodle

2.  The php.in file which you open will have one line.  You need to add

upload_max_filesize = 20M
post_max_size = 20M

to your php.in file and save the file to your server.  If you want to increase the file size just change the numbers

Upload Max file Size  in Moodle

3.  Now login to your Moodle site as administrator
Go to Site Administration | Security | Site Policies | Maximum Uploaded file section

This specifies a maximum size that uploaded files can be throughout the whole site. This setting is limited by the PHP settings post_max_size and upload_max_filesize, as well as the Apache setting LimitRequestBody. In turn, maxbytes limits the range of sizes that can be chosen at course level or module level. If ‘Server Limit’ is chosen, the server maximum allowed by the server will be used.

Click on the drop down list and you should see your new maximum uploaded file size in Moodle.  Select your new maximum uploaded file size and click OK


maximum_uploaded_file_moodle

4. Also go to Course Administration | Edit Settings|  if you don’t see the new maximum uploaded file size , just click on the dropdown and apply new size 

edit_course_settings_maximum_upload_size

Your site configuration might not be secure. Please make sure that your dataroot directory in Moodle


Your site configuration might not be secure. Please make sure that your dataroot directory (/home3/parent/public_html/datarootdir) is not directly accessible via web.

Above is a typical message you get when you login into Moodle if it’s installed  in shared hosting.

Your site configuration might not be secure. Please make sure that your dataroot director

How do we block dataroot directory not directly accessible via web? 

We have to move dataroot directory from public_html folder to the root of your web hosting. Here are the instructions what you have to do to move the dataroot folder away from public_html in Moodle.

1. Connect to your web server using any FTP client (I am using WS_FTP) and go to public_html folder.

public-html-moodle

2. In public_html folder find dataroot folder.  Download this folder to your desktop or any where in your computer. You can also copy and past the folder in the root folder but it take long time. Do not delete the datarootdir in public_html folder NOW.

datarootdir-in-moodle

3. Now move datarootdir to your root directory. Root directory is folder/

move-datarootdir-to-root-folder

4. Once you moved datarootdir folder into Root directory, click on public_html folder and edit config.php file.  We need to change the path so that it can point to new location of datarootdir folder.

open-config-php

5.  This is how your config.php file will look like.  Where it says $CFG—>dataroot = “/home/root/public_html/datarootdir’; you need to change this to “/home/root/datarootdir’.  Just remove /public_html  line  and save the file.

remove-public-html

 

6. Now if you log back into Moodle, you will not see

Your site configuration might not be secure. Please make sure that your dataroot directory (/home3/parent/public_html/datarootdir) is not directly accessible via web.

message anymore. now you can go to your public_html folder and delete your datarootdir

Convert MySQL Database from MyISAM to INNODB


Installed Moodle 2.0 using shared hosting. When I logon to my Moodle site,  this is the message I am getting

"Database tables are using MyISAM database engine, it is recommended to use ACID compliant engine with full transaction support such as InnoDB."

In my previous post I mention that you can change the MyISAM database engine to InnoDB using phpMyAdmin : Convert MyISAM to INNODB using phpMyAdmin for Moodle but it will take some time to change each table one by one.

I was looking for a good solutions to convert the MYISAM engine to InnoDB very fast and I found a blog which gives very good instructions.How to Migrate Your MySQL Database from MyISAM to INNODB

Two problem I found in the above post:

1. I was not able to see the video files from work to see the full instruction

2. It shows how to import the database but not showing what are the limitations involved in when you host Moodle in shared hosting environment.

Here are the instructions how you can resolve "Database tables are using MyISAM database engine, it is recommended to use ACID compliant engine with full transaction support such as InnoDB."  message in your Moodle 2.x

 

My current Moodle site is hosted at http://www.bluehost.com and I installed Moodle using Simple Scripts.  When you install Moodle using Simple Scripts, it will create MySQL Database and User name by default.

1. Login to your control Panel. Go where it says Database and you can see MySQL Database and phpMyAdmin. 

image

2. Click on MySQL Database to your current database

MySQL Database to your current database

As you can see Moodle installation created a database and user name.  We are going to export the current database and change MyISAM to INNODB and import back to MySQL using myPHPAdmin

3. Go to phpMyAdmin and export your database

Export Database using phpMyAdmin

 

For the database name you can leave it as since it’s know the current database name and click GO

image

 

Save the file

 

Exporting Database from myPHPAdmin

 

 

4. Open your database file in any tools which you have. In my case, I am using Dreamweaver.

Click on CTRL + F  to  find and replace of "myISAM" with "INNODB" (without quotes, of course) in the SQL dump text file

 

Find-myISAM-Replace-Innodb

5. Go to the top of the sql file which you opened and enter SET AUTOCOMMIT = 0;

set-autocommit=0

 

6. Now go to the end of the file and enter  COMMIT; and save your file.

image

 

Now  are going to import this file into phpMyAdmin but before we do that we have to drop the current database.

7. Go back to phpMyAdmin, Since I am hosting my Moodle in shared hosting I don’t have any options to drop a database.  

Drop Database from myPHPAdmin

8. When I run the SQL query Drop Database “database_name” I got following error message.  Drop Database statements are disabled

 

drop-database-statement-are-disabled 

9. Only way I can drop the database is by going to Cpanel and delete the database from MySQL Admin.  Login to your control panel

Click on MySQL Databases

mysql-database-cpanel

Delete your current database

delete-database-file

10. Confirmation to delete database

 

delete-database-mysql

 

11. Now create a new database but the name should be same as the one which you deleted.  Add user to Database.

 

Create new database in MySQL

 

12. When you add user to Database and give all privileges.

Manger User Privileges

 

13. Open your myPHPAdmin and you will see your empty database and now import your modified database

Import Database  to change to INNODB

14. You can see the Database from MyISAM to INNODB are changed. 

from MyISAM to INNODB are changed

If you open your Moodle right now it should work and you wont’ see the error message any more.  This is how you can change your MyISAM to INNODB. 
It took me while to figure it and good luck

Convert MyISAM to INNODB using phpMyAdmin for Moodle


How to convert from MyISAM to InnoDB using phpMyAdmin?

When Installed Moodle 2.x, following message are showing up in the font page of Moodle.

Database tables are using MyISAM database engine, it is recommended to use ACID compliant engine with full transaction support such as InnoDB.

Moodle Error : Database tables are using MyISAM database engine

When searched for “convert MyISAM to InnoDB using phpMyAdmin” in Google, I got many responses and I also found a link from Moodle which didn’t help me at all.

I finally found this article from http://richardcummings.info/convert-myisam-to-innodb-using-phpmyadmin/comment-page-1 and the instructions says

You can convert from MyISAM to InnoDB in phpMyAdmin with just a few clicks. To convert your data tables from MyISAM to InnoDB in phpMyAdmin, you will select the table, click the “Operations” tab, and then choose InnoDB from the drop down box next to the “Storage Engine” type. Click “Go” and you are done!

I couldn’t find the Drop Down box next to “ Storage Engine” After playing around, I came to know where to find drop down box

 
1. Go to phpMyAdmin

2. Select your database and click on Structure icon

convert MyISAM to InnoDB using phpMyAdmin

 

3. This is what you will see when you click on structure icon

convert MyISAM to InnoDB for Moodle

4.  Now click on Operations tab and now you will see Storage Engine and if you click on the drop down, you can see InnoDB.  Select InnoDB and click GO

image

5. Now if you go back to your database table, you can see type is changed to InnoDB

converted MyISAM to InnoDB using phpMyAdmin Storage Engine

 

Using this method you can easily  convert your database from MyISAM to InnoDB using phpMyAdmin. 

Many Thanks to Richard Cummings