This guide gives instructions for building a Learning Object Metadata (LOM) repository on Drupal 5.x and PHP 5.1.x.
Please note that this guide is intended for the version 2 of the repository setup, please read the New Features from the v1 of the Learning Repository at the Features page for a list of changes.
In case of any issues with downloading the content required for the repository or installation problems, please contact the respected authors of the content over the Contact form of the website (in the contact form choose "Web site" under the Category). We will be happy to provide any assistance needed.
Completing this step-by-step guide will result in a repository with the following features:
Please note that some of the fields specified in the schema are missing, the fields were left out to fit the needs of the JEM project.
Demonstration: The JEM Learning Repository is built following these guidelines.
Please click the module names to find out more about the module.
| Name | Purpose |
|---|---|
| CCK | CCK is used to create the record type that models the learning resource |
| CCK Author Name Module | This is a custom module built to fit the requirements of the learning repository. Due to compatibility reasons, this module cannot be run simultaneously with the CCK Full Name module |
| Content Templates | Contemplate is used to create the views and the input form for the CCK learning resource content type |
| Date Module | The date module is a flexible date/time field type for the cck content module with two ways of storing the date |
| Image / Image Attach Module | Allows users with proper permissions to upload images into Drupal |
| Profile Module | A Drupal core module, must be enabled |
| Taxonomy Hide Module | Enables to setup list of categories which terms will not be listed in reference term list during node view |
| Taxonomy Import Module | This is required for importing the necessary taxonomies |
| Taxonomy Module | A Drupal core module, must be enabled |
| Taxonomy XML | The module is required for importing and exporting the taxonomies |
| Views Module | The views module provides a flexible method for Drupal site designers to control how lists of content (nodes) are presented |
Before you install, please note that the module uses DOM commands to write the exported record, for this reason your system must be using PHP 5.1.x, preferred version is PHP 5.2.5 and above.
Please make sure to follow the installation steps in the defined order; failure in completing the steps might result in a broken Drupal installation.
The above vocabularies marked as LOM v1.2 are complete on basis of the IMS Learning Resource Meta-Data Information Model (Version 1.2.1 Final Specification), the ones marked as LOM v1.0 are for the older version. The older version is required providing support for IEEE LOM v1.0 on the LOM Import (separate module). For the Language taxonomy, the specification does not state a static vocabulary but we have decided to add some pre defined languages into it, this is to make the usage easier. Additional languages can be added or removed to the vocabulary, please read "Post Installation and Modifications" for further reference. After importing we strongly encourage to check under Administer -> Content Management -> Categories that all the related vocabularies are correctly associated to the content type.
create table lom_counter(nid int, count int)
<script>
var iCount;
function count() {
iCount++;
//alert("Count = "+iCount);
showCount();
}
function zero() {
iCount = 0;
}
function getCount() {
node=document.getElementById("valCount");
iCount = node.innerHTML;
}
function showCount() {
node=document.getElementById("displayCount");
node.innerHTML = +iCount;
}
</script>Modify the <body> tag so that it looks something like the following:
<body onload="getCount(),showCount()">
If you chose to change the name of the menu, make sure to edit the URL under the Page on each of the three views to match the target of the menu item which was created before
In some cases you might want to add or remove some of the tags defined in the IMS specification. To do this, you must first either add/remove the necessary fields in the content type or add/remove the vocabularies that you want, in case you want to keep an existing vocabulary you can also just unlink it from the content type in the categories settings at Administration -> Content management -> Categories.
After the vocabularies or content type fields are added, you must modify the content template to show the newly created fields or vocabularies. Also, you must modify the input form in lom_record.tpl.php to show/hide the fields or vocabularies in the input form and also modify the body template in your content type template.
The views provided with the guide do not include the "Register and login to add your learning resource" texts seen on the header of every view for the repository on the JEM website, eg. http://www.jem-thematic.net/repository/by_title as the (base) url which the link is pointing to is specific for every installation. To add these links, edit the three views at Administer -> Site building -> Views (the views are called by_title, by_author, by_date) and add the following to the header section of every view 8make sure to change the url to point to your own Drupal installation:
<div class="quicklinks">Register and login to <a href="http://www.jem-thematic.net/node/add/lom-record">add your learning resource</a></div>
Also, add login to your website over ftp or similar and add the following to your style.css under /themes/<mytheme>/:
.quicklinks {
border-left:1px solid #AABBCC;
border-right:2px solid #AABBCC;
border-top:1px solid #AABBCC;
border-bottom:2px solid #AABBCC;
font-size:120%;
margin-top: 5px;
margin-bottom:1em;
padding:0.5em;
text-align:right;
font-weight: bold;
min-width: 300px;
max-width: 400px;
float:right;
}
To remove the RSS support for the learning repository views, edit the three views at Administer -> Site building -> Views (the views are called by_title, by_author, by_date). Scroll down to the Arguments section and remove the argument type RSS: RSS Feed Selector for each of the three views separately.
If you want to rename any of the existing vocabularies related to the Learning Resource, make sure to change the vocabulary names which appear in the SQL queries at the beginning of the body template of the content type template and at the beginning of the lom_record.tpl.php. If these are not changed the fields will not show in the outputted node and in the input form.
If you wish to add terms to already existing and configured vocabularies or change properties of one of the vocabularies (except disable), no changes are needed in the code. We would appreciate it if you would inform us of additions, especially to the Living Taxonomy, in relation to fields of applications of Mathematics (e.g. Physics).
Before taking any steps on upgrading your repository, we strongly encourage you to backup your current content template, content type and vocabularies. We also provide the old code in the download section in case something goes wrong with the upgrade.
To update from the old version of the repository, please do the following steps:
Upgrade the vocabularies
Remove the old vocabularies (except for the LOM LivingTaxonomy and LOM Keywords) and re-import the following vocabularies:
Make sure not to reimport the LOM Keywords vocabulary because this will overwrite the keywords for your existing records.
Update your content type
Update the content template
Update the page template
The entire guide can be downloaded and printed by using the Printer-friendly version. To download the software package (vocabularies etc) for creating this repository, please fill in our survey on usage of the repository after which the download will start automatically. The download is free of charge but the survey is needed for statistical purposes when reporting about the JEM project.
The code in the download package is for version 2 of the repository, for version 1 please contact us over the contact form.