When we first set our module up, we simply completed a series of search & replace for the the phrase "NEWMODULE" and replaced them with our Module's name. This is enough to get the Module registered, but it leaves a very ugly footprint in Moodle.
Our goal right now, is to start some cleanup of these references so the user interface of our Module starts to take shape.
1. UPDATE THE .\mod\inyourface\lang\en_utf8\inyourface.php FILE
Inside the Moodle interface, the text that is displayed during the addition of our activity is controlled by the language file. These string variables are contained in the module's language file. Any modifications we make will take effect immediately.
2. !!! IMPORTANT !!! MOVE THE .\mod\lang folder to the Moodle root directory (move it to .\lang).
If you browse through your Moodle's .\lang directory, you will notice that each module has its own language file.
Here is the contents of the inyourface.php file after a little clean-up.
<?php
$string['inyourface'] = 'Facebook Integration';
$string['modulename'] = 'Facebook Integration';
$string['modulenameplural'] = 'Facebook Integration';
$string['inyourfacefieldset'] = 'Custom Fields';
$string['inyourfaceintro'] = 'Post to Facebook Intro';
$string['inyourfacename'] = 'Post to Facebook';
?>
After making these changes, when you navigate to a course and enter edit mode, you will notice the following changes:
Add Activity Drop Down When Editing a Course:
Click Image to Zoom
The Module's Add Activity Form:
Click Image to Zoom
The Activity Breadcrumb Trail:
Click Image to Zoom
SMALL CHANGES, BIG BANG!
Next Article in Series
hi,
ReplyDeleteI need a help.
I am creating an activity module for moodle. But i am encountering a problem at this step.
When I am navigating to a course and editing is on, after adding an activity the form is not appearing up. Please help me.
hi,
ReplyDeleteI need a help.
I am creating an activity module for moodle. But i am encountering a problem at this step.
When I am navigating to a course and editing is on, after adding an activity the form is not appearing up. Please help me.