Bibliography module

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Bibliography module.

Introduction

The Bibliography module makes it easy to show and use bibliographic references in your Moodle course. It is contributed by Universidade do Porto, Nuno Barbosa and Susana Leitão. It was built based on the glossary module, using same code design and interface patterns.

It allows you to:

  • Create different bibliography activities in a course
  • Create instances in each bibliography
  • Manually insert new entries in a bibliography activity
  • View bibliographic references by citekey, date, author, instance
  • Comment bibliography entries
  • Let students contribute to bibliography with their own entries
  • Import and export references in bibtex format
  • Reference to bibliography entries from your resources and automatically add them as a footnote
  • You can also add the HTML editor bib icon and easily choose the bibliographic reference you want to add to your webpage.

Installation

Package installation

  • Select the "bibliography_package.zip"
  • Unzip the .zip file into the /moodle folder of your Moodle site
    • The package contains:
      • The activity module - which is the the core of the module
      • The filter - enabling the inclusion of references from your course bibliographies in your web pages
      • A patch to install the html editor bib icon
  • Login to the Moodle site as administrator and
  • In site administration block click on notifications
  • Moodle will install the Bibliography activity
  • Activate Bibliography filter on Modules>Filters administration

(You may use [bib-citekey] to reference a bibliographic entry with a certain citekey.)

  • Optionally you may install the HTML editor bib icon - which will allow you to easily select the bibliographic reference you want to include on your webpage - by:
    • Running the patch on mod/bibliography/bibliography.patch
    • Installing it manually as described bellow

Optional HTML editor bib icon

Will let you easily choose the bibliographic reference you want to add to your webpage. The installation of this feature will require changing code in some Moodle files.

  • Unpacking the opt_bibicon.zip file into the /moodle folder
  • It will create:
    • moodle/lib/editor/htmlarea/images/icon_ins_bib.gif
    • moodle/lib/editor/htmlarea/popups/dialog_bib.css
    • moodle/lib/editor/htmlarea/popups/dlg_ins_bib.php
    • moodle/lang/en_utf8/bibliography.php
  • It will also create:
    • moodle/lib/adminlib_example.php - Add bib icon in html editor
    • moodle/lib/editor/htmlarea/htmlarea_example.php - Call popup when clicking bib icon
  • Use diff command to view differences between adminlib_example.php and original adminlib.php, htmlarea_example.php and original htmlarea.php
  • Save your existing copy of moodle/lib/adminlib.php and moodle/lib/editor/htmlarea/htmlarea.php and insert the diff lines.

You can see bellow the code lines you will have to add to those 2 files. You may also change moodle/lib/editor/htmlarea/dialog.js to custom the popup window size.

Changes adminlib.php

To be able to add your bib icon, save your existing copy of adminlib.php and insert this line:

                    'insertbib' => 'em.icon.bib.gif',

below this line:

                    'insertsmile' => 'em.icon.smile.gif',

and save. The line can really be placed anywhere in that array, but by providing a specific location it will help when addressing requests for assistance in hiding buttons.

The array is employed by the admin GUI (Site Administration-> Appearance->HTML editor) to provide you the Administrator with the ability to hide buttons in the HTML editor via editorhidebuttons. Once you have installed Bibliography module and added the button, you can use the GUI to hide the insertbib button.

Changes htmlarea.php

Add insertbib to this.toolbar array:

                    this.toolbar = [ ... "insertbib","insertsmile", "insertchar",... ]

Add insertbib to this.btnList array:

                    this.btnList = {...insertbib: ["Insert Bibliography", "icon_ins_bib.gif", false, function(e) {e.execCommand("insertbib");} ],...

Add Moodle hack - insertbib after Moodle hack - insertSmile:

 /// Moodle hack - insertbib
 HTMLArea.prototype._insertBib = function() {
   // Make sure that editor has focus
   this.focusEditor();
   var sel = this._getSelection();
   var range = this._createRange(sel);
   var editor = this;  // for nested functions
   this._popupDialog("dlg_ins_bib.php?id=<?php echo $id; ?>", function(imgString) {
       if(!imgString) {
           return false;
       }
       if (HTMLArea.is_ie) {
           range.pasteHTML(imgString);
       } else {
           editor.insertHTML(imgString);
       }
       return true;
   }, null);
 };

Insert case "insertbib":

       case "insertsmile": this._insertSmile(); break;
       case "insertbib": this._insertBib(); break;
       case "insertchar": this._insertChar(); break;


Changes dialog.js

Add the popup size:

       case "dlg_ins_smile": x = 330; y = 320; break;
       case "dlg_ins_bib": x = 540; y = 320; break; 

And that's all...

User Manual

Add Bibliography activity

To add a bibliography:

  1. Press "Turn editing on"
  2. Select Bibliography on "Add an activity"
  3. Fill "Bibliography Fullname"
  4. Describe you bibliography on "Bibliography Intro"
  5. Choose general settings (see below)
  6. Press "Save..." button.

General settings

  • "Entries shown per page" choose the number of items you want to display per page
  • "Allow comments" choose if you want to allow comments about your bibliography entries
  • "Allow students to insert entries" choose if you want to let students contribute to bibliography with their own entries

Viewing a bibliography

Browse options

You can browse bibliographies according to the following options:

  • Browse by citekey
  • Browse by date (year)
  • Browse by author
  • Browse by category (if there are any categories added)

Search options

You can also search for a given word using the Search field.

Adding/editing a bibliography entry

To add a glossary entry:

  1. From the bibliography page, click the "Add a new entry" button.
  2. Choose your entry type (available 8 different types)
  3. Fill the required fields (Title, Year, Authors)
  4. Fill some other fields (entry type specific)
  5. Fill the fields common to all entry types like "Available on", "Categories", "Keywords".
  6. If you want to add an attachment, such as a picture or an article, you can attach it below the Keyword(s) text area.
  7. Click the "Save changes" button to add your bibliography entry.

Bibliography comments

If you enabled comments on the bibliography entries, users will see a little cartoon speech balloon icon in the lower right-hand corner of the definition block. When you click on the balloon, you're taken to the comment entry page. Add your comment then click the "Save changes" button. Once you've saved your comment, Moodle will display all of the comments for the entry. When you return to the main bibliography page, you'll see a new message next to the speech balloon telling you how many comments there are for the entry.

Editing bibliography categories

Categories may be created to help organize your bibliography entries.

To create a bibliography category:

  1. Click the "Browse by category" tab in the main page of the bibliography.
  2. Click the "Edit categories" button on the left side of the page.
  3. Click the "Add category" button on the resulting Categories page.
  4. Give the category a name.
  5. Click the "Save changes" button.

Importing/Exporting entries

To import bibliography entries via a bibtex file (.bib):

  1. Follow the "Import entries" link at the top right of the main bibliography page.
  2. Browse for the exported entries bibtex file on your computer.
  3. If you want to import to a category, select which one.
  4. Click the "Save changes" button. You'll then see a report of the entries and categories added to the bibliography.

To export bibliography entries to a bibtex file (.bib):

  1. Follow the "Export entries" link at the top right of the main bibliography page.
  2. Click "Export to BibTex file".
  3. Save the automatically generated BibTex file on your computer.

Reference from html resources

You can reference to bibliography entries from your html resources and automatically add them as a footnote. You have 2 ways to accomplish that:

  1. Insert the mark [bib-citekeyname] where citekeyname is the citekey from the entry you want to make reference
  2. If the Optional HTML editor bib icon is installed you should follow these steps:
    1. On your html editor bar click "bib" icon and a popup will open with all the course bibliography entries
    2. Choose the reference you want to add clicking the arrow