|
Moodle Tips!
|
Written by Ken Task
|
|
Monday, 09 August 2010 10:52 |
Food for thought: IF the ISD allows the Moodle server a by-pass to YouTube your ISD can view YouTube content without the fear of finding some inappropriate content via YouTube.
This filter does NOT provide the 'related videos' scroller at the bottom of the player as in default embedded links.
Because the FULL URL to the resource is required in the filter tags, students may not be able to access as there might not be a bypass for students in the filtering system. Many Teachers, however, might have a 'override'. Since Moodle tracks, there is accountability - ie, Moodle will log user action in creating the YouTube link.
Does require some additional supports be installed. (easy to do on Ubuntu or CentOS, BTW)
See it in action: http://moodle.tcea.org/bisdmoodle/ (right on the front page)
From the CVS 'readme':
-- Youtube filter 1.0 -- -- original code by Adam Schechter June 2009 -- -- Designed under Moodle 1.9.5 -- -- PHP version 5.1.6 --
1. Introduction
The youtube filter uses a custom delimiting tag inserted anywhere within the text of a resource to embed and display an embedded youtube player without having to paste the embed code into the HTML of the page. It is also designed to ignore youtube links placed in standard tags.
2. Dependencies/Installation
To run the youtube filter, your system might need some new stuff: - php-devel (libraries that have phpize) - pecl-http (for HTTP GET call out to youtube API - use 'pecl install' command) - simplexml (PHP module) - gcc (or any other C-compiler)
I was alerted to the following how-to for installing PEAR and pecl libraries, and I'll outline the steps here briefly. The URL has more details. My commands are for CentOS/Red Hat linux; the how-to website uses Ubuntu; your commands might be slightly different.
URL: http://www.markfosteronline.com/2009/01/04/how-to-install-a-php-pecl-extensionmodule-on-ubuntu/
1. Install PEAR using your favorite package manager (I use yum, and sudo/root access will be required): sudo yum install php-pear
2. Install the PHP development packages. There's some stuff in there that will make things run behind the scenes: sudo yum install php-devel
3. Install the libcurl development package: sudo yum install curl-devel
4. Install the pecl_http extension: sudo pecl install pecl_http
5. Add the following to your php.ini file (/etc/php.ini in CentOS/Red Hat), in the Dynamic Extensions section: extension=http.so
6. Finally, restart apache to load the extension: sudo /etc/init.d/httpd restart
Now, copy the entire youtubefilter folder into moodle/filter/ and you should be right as rain.
3. Usage
- Enable the filter from the administration menu in Moodle: Modules->Filters->Manage filters - There are 3 available sizes for the embed window, on the filter settings page. - To embed the youtube video, enclose the video URL in [youtube] tags. Note that there is no closing tag ([/youtube]) - simply use the regular tag again. - Videos that cannot be embedded will display with an error message and a standard html link to the video on youtube. - Youtube links placed placed inside of tags are designed to display normally as HTML. - The filter does its best to strip out additional php GET parameters Ex: anything after the video ID root in the URL, starting with the first '&': http://www.youtube.com/watch?v=ahuduPpZJQA(-->)&feature=featured) - Multiple links can be placed within a page.
Examples: - RIGHT: -- This is some text of a page.[youtube]http://www.youtube.com/watch?v=zs2XiyLYJOo[youtube] This is some more text in a page. -- This is some text that has a non-embedable video. [youtube]http://www.youtube.com/watch?v=ahuduPpZJQA&feature=featured[youtube] -- This is some text of a page.This video will show up as a standard html link. This is some more text in a page.
- WRONG: -- This is some text of a page.[youtube]http://www.youtube.com/watch?v=zs2XiyLYJOo[/youtube] This is some more text in a page. -- This is some text of a page. http://www.youtube.com/watch?v=zs2XiyLYJOo This is some more text in a page.
- Advanced quirk: A youtube url that is placed in a resource that is the only text on the page will display, but will not if any other text or HTML on the page exists.
|
|
Last Updated on Monday, 09 August 2010 11:11 |
|
|
Written by Ken Task
|
|
Saturday, 07 August 2010 17:15 |
A way to force running of those cron jobs for each …
Directions for a CentOS/RHE layout where /var/www/html/ is web root and /usr/local/bin/ is directory used for scripts and in environmental path of root user.
Create a text file (moodlesites.txt) that list the directories of the moodles.
As root user: cd /var/www/html/ [ENTER]
ls -1 > moodlesites.txt [ENTER]
nano moodlesites.txt [ENTER] remove lines that contain NON-moodle directories. Save: [CTRL][X] Save [y]
mv moodlesites.txt /usr/local/bin/
cd /usr/local/bin/ nano runallcrons [ENTER]
copy and paste the following into the 'runallcrons' script: ---- begin below this line ----
#!/bin/bash # # echo $1; for i in `cat moodles.txt` do echo "Site in que: $i"; echo 'Press ENTER to begin running cron. Be PATIENT! Let it run!'; read $p; php -f /var/www/moodlesites/$i/admin/cron.php; echo 'Press ENTER for next Moodle Site.'; read $p; done echo 'Done!';
---- end clip above this line ---
Save the file: [CTRL][X] when prompted to save, Y.
chmod u+x runallcrons [ENTER]
Test your script. From any location: runallcrons
The script is interactive. Requires you to press ENTER to continue to the next Moodle. (those prompts can be removed from the script). This pausing allows one to see the execution of each.
One reason to leave it interactive is to see errors on backups. If running top in another terminal session one can monitor the usage also.
|
|
Last Updated on Sunday, 08 August 2010 03:53 |
|
Written by Ken Task
|
|
Tuesday, 03 August 2010 10:19 |
Is Moodle 2.0 in your immediate future? If so, what OS will it run upon? CentOS 5.5 , Ubuntu 10.04 LTS, or Windows 2008?
See: http://docs.moodle.org/en/Upgrading_to_Moodle_2.0
The makers of PHP have announced a release for 5.2.14:
http://www.php.net/archive/2010.php#id2010-07-22-1
at the same time, PHP warns users that this release marks the end of active support for 5.2.
"Following this release the PHP 5.2 series will receive no further active bug maintenance. Security fixes for PHP 5.2 might be published on a case by cases basis. All users of PHP 5.2 are encouraged to upgrade to PHP 5.3."
Moodle 2.0 Preview 4 Requires: PHP 5.2.8, MySQL 5.0.25
Strategic decisions …
Many had thought Red Hat Enterprise was the way to go with a Moodle (open source box) for good reasons - grand-daddy of all things Linux, commercial support, etc.. However, when one considers the purpose of the server (assuming we are talking Moodle here), RHE presents some small hurdles in the version of PHP.
It looks like, however, RHE owners will have to upgrade to RHEL-6 to get php 5.3.x. OR, the harder route, would be to download the source and compile PHP 5.3 yourself making sure you've set all the 'right' support switches for MySQL and Apache. OR, possibly, install from a Fedora distro: 12, 13, and latest rawhide provides 5.3.0, 5.3.1 and 5.3.3 respectively. http://distrowatch.com/table.php?distribution=redhat http://distrowatch.com/table.php?distribution=fedora
CentOS 5.x (which is based on RHE 5) does have a repository for folks that need/require higher versions of PHP - c5-testing (which is NOT really a 'testing' repo as the name suggest, but, rather, a repo for users that need apps higher versions not supplied by RHE).
Example … recently updated PHP on a CentOS 5.5 server which has the c5-testing repo in the repo list. Here's command used to upgrade the PHP:
yum --disablerepo=* --enablerepo=c5-testing update php*
Testing repo, however, only takes PHP to version 5.2.10 - which is good enough to run Moodle 2.0 but, might not be getting regular updates.
http://distrowatch.com/table.php?distribution=centos
While somewhat painful to do, one could chose Ubuntu and replace the RHE or CentOS on the same hardware using the latest "Long Term Support" server version. Ubuntu 10.04 LTS lucid has PHP version 5.3.2
http://distrowatch.com/table.php?distribution=ubuntu
So, if we're talking a Moodle 2.0 box (maybe even one for Joomla's), you've some decisions to make.
Windows … not up on that 'world' but did hear that Server 2008 could and comes with PHP from Zend. But even there, what version is the PHP? Saw this in comments of an announcement concerning MS and Zend collaborating on providing PHP for Windows 2008 server
"I bought one license of Zend Core and I'm using it on a Windows Server 2003 machine. I noticed that Zend Core is still using PHP 5.2.6. When does Zend plan to update Zend Core to PHP 5.2.9? Thank you."
http://devzone.zend.com/article/3233
So, is there an advantage in running Windows Server 2008 to get PHP up to a supported version? Uhhh, nope.
From what I've written above, most might be best off using Ubuntu 10.04 LTS. Guess it depends upon how much one wants to 'gamble' that no issues of real significance concerning security of a server running 5.2.x and Moodle/Joomla/Drupal/WordPress, etc.
Time to roll the dice?
If anyone runs Red Hat Enterprise or Windows 2008 server have you investigated the PHP situation? If so, please share your findings and your strategy when it comes to Moodle 2.0.
|
|
Last Updated on Sunday, 08 August 2010 03:54 |
|
Written by Ken Task
|
|
Monday, 02 August 2010 08:00 |
One of the issues with running MNet'd Moodles is the length of time the certificates are valid. The default is 28 days. This means MNet'd access gets or could get interrupted every 28 days until a new certificate is obtained.
Uhhh ... not good for K12 schools who use Moodle like PowerPoint. And not good for Moodle server administrators who don't like one more monthly chore.
Is there a fix? Yes.
Add the following line to the config.php file of an MNet'd Moodle:
$CFG->mnetkeylifetime = '120';
Change the number 120 for however many days you'd like the certificate to be valid. The ';' at the end is important, so don't forget it.
Probably need to have the other MNet'd Moodle use the same settings ... otherwise, what's the point? :\
Found this tip over at Moodle.org forums. It took a while to find! Sharing this with other MoodleMasters/Moodlers using MNet in the hopes it will be easier to find.
|
|
Last Updated on Sunday, 08 August 2010 03:54 |
|
Written by Ken Task
|
|
Monday, 02 August 2010 07:56 |
Could be php support for tidy is not installed! By default tidy is not compiled into the original php package on CentOS 5.x. You can check via this command: php -m That should provide a list for all the mods php supports. Towards the bottom of the listing you should see tidy listed. If you do not, here's the "fix"! As root user: yum -y install php-tidy libtidy [ENTER] Remember to restart apache for it to pick up on changes to php. /sbin/service httpd restart [ENTER] Now go do some copy and paste from a Word doc in a Moodle web page to see if the "junk" isn't cleaned out for ya on the fly! ;) Credit where credit is due ... SOS member Randon Lance of ESC15 put me onto this issue. Thanks, Randon!
|
|
Written by Ken Task
|
|
Tuesday, 27 July 2010 23:48 |
Section 26: See ALL Instant Messages in Moodle
Please see: http://moodle.tcea.org/kensmoodle/ in the Advanced Moodle Administraton course.
The Advanced Moodle Adminstration (golinux) course has the following sections:
Symlinks How to take advantage of the capability of the Linux operating system to ease the "pain" of Moodle Administration ... There's a "Follow Up" section area for Symlinks Backing Up Your Moodle Using Webmin for Backups CVS Installation of a Development Moodle (or a new Moodle instance) Getting Large Files Into Moodle Courses (larger than upload limit) LDAP Authentication for Windows AD AND OpenLDAP (linux) Moodle Database: Care and Feeding! Using Webmin for MySQL Database Maintainence Parent Role in Moodle Math and Moodle Quickie for Installing Webmin Quickie for restoring a downed Moodle from backups suggested in this course. Server Operating System Updates How to stress test an Apache server The Coo-Coo's Egg - Moodle 2009 Style! ClamAV - why? Cause we must! Using Webmin to Install Moodle Admin Report Block pesky IP's from attempting to do harm to your web server
|
|
Written by Ken Task
|
|
Saturday, 17 July 2010 20:48 |
a web page? This excellent YouTube movie will show you how:
Click below for new window http://www.youtube.com/watch?v=XtHPUh_BaxM
|
|
Written by Ken Task
|
|
Saturday, 17 July 2010 20:42 |
If you've added some additional mods/blocks/themes to Moodle, by far, the easiest way to upgrade is CVS. The 'long way' requires one to either move or create some method of getting those add-ons into the new Moodle. IMHO, easier to leave the Moodle in place and run CVS. You might get more than you need, but it is an "easy button" when one compares the steps involved.
BEFORE doing anything such as this, BACKUP your Moodle - the directory at your web root AND do a mysql dump of the database! DON'T IGNORE THIS! (author not responsible!!!!)
The first time one updates a Moodle instance via CVS one has to issue two commands:
cvs -d:pserver:anonymous@us2.cvs.moodle.org:/cvsroot/moodle login;
cvs -z3 -d:pserver:anonymous@us2.cvs.moodle.org:/cvsroot/moodle co -P -d moodle -r MOODLE_19_WEEKLY moodle;
The first will prompt for a password. Just press ENTER.
After it has completed, hit the admin directory of the Moodle: http://[yoursite]/[yourmoodle]/admin/
That should begin the process and eventually you will be forced to login as an Admin level user to finish the update.
Once you've successfully done that, create a text file (we're going to make it an executable script to run via command line OR from Webmin as a button) called 'update'. In the 'update' script, copy and paste the following:
echo 'moving version.php to .old'; mv version.php version.php.old; echo 'updating via cvs ...'; cvs update -dP; echo 'CVS update completed ...'; echo 'Setting permissions ...'; chown apache:apache * -R; ls -l version.php; fgrep '$release' version.php; echo 'Now hit Admin Notifications of this Moodle to update the database.'; echo 'Done.';
To make 'update' executable: chmod u+x update [ENTER]
To run it from the command line as root user: cd /var/www/html/[yourmoodleinstance] [ENTER] ./update [ENTER]
To run it as a button in Webmin:
Login to Webmin Go to: Others -> Custom Commands -> Create a new custom command In description box: CVS Update Moodle Command: /var/www/html/[yourmoodledir]/update Run in directory: /var/www/html/[yourmoodledir]/ Run As: root and check the box for 'Use user's environment' Save the button
Now before trying the button, BACKUP your Moodle!
Remember that either way, the update is not complete until you step through the update in Moodle itself. The update will be run when you hit admin in your Moodle. It is important one does that as there could be new options for you to set/consider.
If you have 'oodles of Moodles' … ie, more than one installation ... that has undergone an initial update via CVS, copy the 'update' script into each instances directory. You need to make adjustments to your Webmin button then. The button could take a directory argument before clicking the 'do it' button.
Please see Moodle.org's information concerning upgrading: http://docs.moodle.org/en/Administrator_documentation#Installation_.26_Upgrading http://docs.moodle.org/en/Upgrading http://docs.moodle.org/en/Upgrading#Using_CVS
|
|
Written by Ken Task
|
|
Saturday, 17 July 2010 20:41 |
In order to get or explore Math possibilities in Moodle, some additional software on server must be installed.
CentOS example:
As root user: yum install tetex tetex-fonts tetex-dvips tetex-latex ghostscript
As MoodleMaster/Admin Level user in Moodle Site Administration -> Modules -> Filters -> Manage Filters Un-hide Algebra Notation and TeX Notation
Settings for TeX Notation: IF the install above went ok, there should be nothing to change. Look for the check marks and Save Changes.
Path of latex binaryfilter_tex_pathlatex (check mark) Default: /usr/bin/latex Path of dvips binaryfilter_tex_pathdvips (check mark) Default: /usr/bin/dvips Path of convert binaryfilter_tex_pathconvert (check mark) Default: /usr/bin/convert
Create a web page resource (this taken from the famous "Moodle Features Demo" course) with the following:
Name: Mathematics notation Summary: Moodle is a unique system in providing easy ways to produce good looking mathematics. Web Page content: -- begin copy below this line -- TeX Filter This filter allows you to type in any standard Tex within dollars signs, anywhere in Moodle (including forums etc) like this:
$$$ \Bigsum_{i=\1}^{n-\1}\frac1{\Del~x}\Bigint_{x_i}^{x_{i+\1}}\{\frac1{\Del~x}\big[(x_{i+1}-x)y_i^{5$\star}\big]-f(x)\}^\2dx$$$
and it will be displayed efficiently like this:
$$ \Bigsum_{i=\1}^{n-\1}\frac1{\Del~x}\Bigint_{x_i}^{x_{i+\1}}\{\frac1{\Del~x}\big[(x_{i+1}-x)y_i^{5$\star}\big]-f(x)\}^\2dx$$
Algebra Filter The algebra filter is similar but allows a more informal calculator-like notation within @@@ characters:
@@@cosh(x,2)-sinh(x,2)=1@@@
@@cosh(x,2)-sinh(x,2)=1@@ -- end copy ... do NOT include this line --
Reference: Moodle vs. .... http://www.csun.edu/~hcmth008/lms_documents/moodle_versus_webct_1.1.html
DragMath http://www.deeringmath.com/DragMath/index.html
Test your math filters: http://[your_moodle]/[moodle_dir]/filter/tex/texdebug.php
Khan Academy - YouTube WORTH SUBSCRIBING!
Algebra 1
Variable Expressions Order of Operations Patterns and Equations Equations and Inequalities Domain and Range of a Function Functions as Graphs Word Problem Solving Plan 1 Word Problem Solving Strategies Integers and Rational Numbers Addition of Rational Numbers Subraction of Rational Numbers Multiplication of Rational Numbers Distributive Property Division of Rational Numbers Square Roots and Real Numbers Problem Solving Word Problems 2 One Step Equations Two-Step Equations Multi-Step Equations Equations with Variables on Both Sides Ratio and Proportion Scale and Indirect Measurement Percent Problems Word Problem Solving 3 The Coordinate Plane Graphing Using Intercepts Graphs of Linear Equations Slope and Rate of Change Graphs Using Slope-Intercept Form Direct Variation Models Linear Function Graphs Word Problem Solving 4 Linear Equations in Slope Intercept Form Linear Equations in Point Slope Form Linear Equations in Standard Form Equations of Parallel and Perpendicular Lines Fitting a Line to Data Predicting with Linear Models Using a Linear Model Inequalities Using Addition and Subtraction Inequalities Using Multiplication and Division Multi-Step Inequalities Compound Inequalities Absolute Value Equations Absolute Value Inequalities Graphing Inequalities Solving Linear Systems by Graphing Solving Linear Systems by Substitution Solving Systems of Equations by Elimination Solving Systems of Equations by Multiplication Special Types of Linear Systems Systems of Linear Inequalities Exponent Properties Involving Products Exponent Properties Involving Quotients Zero, Negative, and Fractional Exponents Scientific Notation Exponential Growth Functions Exponential Decay Functions Geometric Sequences (Introduction) Word Problem Solving- Exponential Growth and Decay Addition and Subtraction of Polynomials Multiplication of Polynomials Special Products of Binomials Polynomial Equations in Factored Form Factoring Quadratic Expressions Factoring Special Products Factor by Grouping and Factoring Completely Graphs of Quadratic Functions Solving Quadratic Equations by Graphing Solving Quadratic Equations by Square Roots Solving Quadratic Equations by Completing the Square Using the Quadratic Formula Proof of Quadratic Formula Discriminant of Quadratic Equations Khan Academy Vision and Social Return Linear, Quadratic, and Exponential Models Identifying Quadratic Models Identifying Exponential Models Quadratic Regression Graphs of Square Root Functions Radical Expressions with Higher Roots More Simplifying Radical Expressions How to Rationalize a Denominator Extraneous Solutions to Radical Equations Radical Equation Examples More Involved Radical Equation Example Pythagorean Theorem Distance Formula Midpoint Formula Visual Pythagorean Theorem Proof Average or Central Tendency: Arithmetic Mean, Median, and Mode Range, Variance and Standard Deviation as Measures of Dispersion Stem and Leaf Plots Histograms Box-and-whisker Plot Proportionality Asymptotes of Rational Functions Another Rational Function Graph Example A Third Example of Graphing a Rational Function Polynomial Division Simplifying Rational Expressions Multiplying and Dividing Rational Expressions Adding Rational Expressions Example 1 Adding Rational Expressions Example 2 Adding Rational Expressions Example 3 Solving Rational Equations Two more examples of solving rational equations Surveys and Samples |
|
Written by Ken Task
|
|
Sunday, 04 July 2010 11:26 |
Moodle Tip - a restricted Student Account for Moodle testing.
Granted there are multiple ways of doing XYZ in Moodle. This is just one.
There is a 'view as student' if you are Teacher in a course, but what if you desired to let other ISD's SEE the insides of your Moodle without messing something up? Could give them non-editing Teacher accounts … which you'll have to clean up/out sometime. Or one could create such accounts in advance, restrict them, then provide 'hints' on the front page of your Moodle for users to use (hopefully, you'll be responding to fewer EMail request for access, etc..).
Here's an idea (actually implemented on some TCEA Area Moodles) that would allow anyone who figures out the hint to login to your Moodle as a student to see what's going on (could do the same for a restricted 'teacher account' as well).
Login as Admin Manually create a user hpotter Name: Harry Potter Login: hpotter EMail: hpotter@[yourmoodleserver] (example: hpotter@moodle.tcea.org]) Server is not setup to accept mail from the outside, but on the server itself - if Linux - an EMail account can be created to 'trap' hpotter EMail. Password: wizard
Logout and then test. Do NOT enroll Harry in any classes just yet.
Log back in as Admin level user.
From Admin menu go to: -> Users - Permissions - Define Roles Edit the Student role and make a duplicate of the student role and edit the duplicate with the following:
Name: hpotter Student Shortname: hpotter_student In permissions, find: 1. change own password and set to prohibit 2. edit own user profile set to prohibit (might also want to look at other rules - blogs, as an example. The above might be good enough for ya!)
After you've done the above, go to: Users - Permissions - Assign system roles - hpotter Student role and add Harry's account to that role.
Logout from Admin. Login as Harry. Check to see if you can change profile and password.
Logout from Harry. Login as Admin.
On the front page of the Moodle, create an HTML block with the following parameters:
Title: Harry Lives Here! In the body: text that says: 'hpotter was a _". a wizard image with the the alternate text set to 'wizard'. This is the login password hint for anyone to login as Harry!
You could let anyone using hpotter enroll in courses themselves, OR you could 'pre-enroll' hpotter in selected courses.
Tell your teachers about this so they won't freak out on ya. They could use to get a 100% true look at their own courses as student. (minus the restrictions, of course).
Here's what it looks like:

Here's one site where you can try it out ... hint ... hold your mouse over the 'wizard' to see the popup hint for the password.
http://moodle.tcea.org/area5/
|
|
Last Updated on Sunday, 04 July 2010 11:32 |
|
Written by Ken Task
|
|
Thursday, 15 April 2010 15:40 |
|
Situation: 4 BCIS courses ... all 're-inventing the wheel' to some extent as all use the same text books, have the same practice files, etc..
Suggestion: Create a BCIS Meta Course that contains those items each individual course is duplicating. Then link to the child courses (which, in this case, are the 4 other BCIS courses).
A meta course takes enrollments from the child courses so students don't have to sign up for yet another course they are just auto-magically enrolled when the MoodleMaster associates the Meta course with the "child" courses.
One would want to acquire and install a block that will facilitate navigation of Moodle back to related courses:
http://docs.moodle.org/en/Related_courses_block
The related courses block: http://moodle.org/mod/data/view.php?d=13&rid=1723
Notes on installing: upload the zip to the moodle root. Unzip there.
For more information on Meta courses and uses, please see: http://docs.moodle.org/en/Metacourses |
|
|
|
|
|
|
Page 1 of 3 |
|
|
Total Views: 1077
|