Bibliography module: Różnice pomiędzy wersjami
Nie podano opisu zmian |
Nie podano opisu zmian |
||
(Nie pokazano 14 pośrednich wersji utworzonych przez tego samego użytkownika) | |||
Linia 1: | Linia 1: | ||
==Introduction== | |||
The Bibliography module makes it easy to show and use bibliographic references in your Moodle course. It is contributed by [http://www.up.pt Universidade do Porto], [http://moodle.org/user/view.php?id=1111047&course=1 Nuno Barbosa] and [http://moodle.org/user/view.php?id=141886&course=1 Susana Leitão]. It was built based on the glossary module, using same code design and interface patterns. | The Bibliography module makes it easy to show and use bibliographic references in your Moodle course. It is contributed by [http://www.up.pt Universidade do Porto], [http://moodle.org/user/view.php?id=1111047&course=1 Nuno Barbosa] and [http://moodle.org/user/view.php?id=141886&course=1 Susana Leitão]. It was built based on the glossary module, using same code design and interface patterns. | ||
Linia 9: | Linia 11: | ||
* Let students contribute to bibliography with their own entries | * Let students contribute to bibliography with their own entries | ||
* Import and export references in bibtex format | * 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. | |||
You can also | |||
==Installation== | ==Installation== | ||
===Package installation=== | |||
* | * Select the "[http://download.moodle.org/download.php/packages/bibliography_package.zip 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 | * Login to the Moodle site as administrator and | ||
* In site administration block click on notifications | * In site administration block click on notifications | ||
* Moodle will install the Bibliography | * 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 | |||
* Activate filter on Modules>Filters administration | |||
You may use [bib-citekey] to reference a bibliographic entry with a certain citekey. | |||
===HTML editor bib icon=== | ===Optional HTML editor bib icon=== | ||
Will let you easily choose the bibliographic reference you want to add to your webpage. | 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. | The installation of this feature will require changing code in some Moodle files. | ||
* Unpacking the | * Unpacking the [http://elearning.up.pt/moodle-modules/opt_bibicon.zip opt_bibicon.zip] file into the /moodle folder | ||
* It will create | * It will create: | ||
** moodle/lib/editor/htmlarea/images/icon_ins_bib.gif | ** moodle/lib/editor/htmlarea/images/icon_ins_bib.gif | ||
** moodle/lib/editor/htmlarea/popups/dialog_bib.css | ** moodle/lib/editor/htmlarea/popups/dialog_bib.css | ||
Linia 56: | Linia 48: | ||
* Save your existing copy of moodle/lib/adminlib.php and moodle/lib/editor/htmlarea/htmlarea.php and insert the diff lines. | * 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 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 ==== | ==== Changes adminlib.php ==== | ||
Linia 106: | Linia 98: | ||
'''case "insertbib": this._insertBib(); break;''' | '''case "insertbib": this._insertBib(); break;''' | ||
case "insertchar": this._insertChar(); 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... | And that's all... | ||
==User Manual== | |||
===Add Bibliography activity=== | |||
To add a bibliography: | |||
#Press "Turn editing on" | |||
#Select Bibliography on "Add an activity" | |||
#Fill "Bibliography Fullname" | |||
#Describe you bibliography on "Bibliography Intro" | |||
#Choose general settings (see below) | |||
#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: | |||
#From the bibliography page, click the "Add a new entry" button. | |||
#Choose your entry type (available 8 different types) | |||
#Fill the required fields (Title, Year, Authors) | |||
#Fill some other fields (entry type specific) | |||
#Fill the fields common to all entry types like "Available on", "Categories", "Keywords". | |||
#If you want to add an attachment, such as a picture or an article, you can attach it below the Keyword(s) text area. | |||
#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: | |||
#Click the "Browse by category" tab in the main page of the bibliography. | |||
#Click the "Edit categories" button on the left side of the page. | |||
#Click the "Add category" button on the resulting Categories page. | |||
#Give the category a name. | |||
#Click the "Save changes" button. | |||
===Importing/Exporting entries=== | |||
To import bibliography entries via a bibtex file (.bib): | |||
#Follow the "Import entries" link at the top right of the main bibliography page. | |||
#Browse for the exported entries bibtex file on your computer. | |||
#If you want to import to a category, select which one. | |||
#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): | |||
#Follow the "Export entries" link at the top right of the main bibliography page. | |||
#Click "Export to BibTex file". | |||
#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: | |||
# Insert the mark [bib-citekeyname] where citekeyname is the citekey from the entry you want to make reference | |||
# If the Optional HTML editor bib icon is installed you should follow these steps: | |||
## On your html editor bar click "bib" icon and a popup will open with all the course bibliography entries | |||
## Choose the reference you want to add clicking the arrow | |||
[[Category:Contributed code]] | [[Category:Contributed code]] |
Aktualna wersja na dzień 10:15, 26 paź 2010
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
- The package contains:
- 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:
- Press "Turn editing on"
- Select Bibliography on "Add an activity"
- Fill "Bibliography Fullname"
- Describe you bibliography on "Bibliography Intro"
- Choose general settings (see below)
- 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:
- From the bibliography page, click the "Add a new entry" button.
- Choose your entry type (available 8 different types)
- Fill the required fields (Title, Year, Authors)
- Fill some other fields (entry type specific)
- Fill the fields common to all entry types like "Available on", "Categories", "Keywords".
- If you want to add an attachment, such as a picture or an article, you can attach it below the Keyword(s) text area.
- 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:
- Click the "Browse by category" tab in the main page of the bibliography.
- Click the "Edit categories" button on the left side of the page.
- Click the "Add category" button on the resulting Categories page.
- Give the category a name.
- Click the "Save changes" button.
Importing/Exporting entries
To import bibliography entries via a bibtex file (.bib):
- Follow the "Import entries" link at the top right of the main bibliography page.
- Browse for the exported entries bibtex file on your computer.
- If you want to import to a category, select which one.
- 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):
- Follow the "Export entries" link at the top right of the main bibliography page.
- Click "Export to BibTex file".
- 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:
- Insert the mark [bib-citekeyname] where citekeyname is the citekey from the entry you want to make reference
- If the Optional HTML editor bib icon is installed you should follow these steps:
- On your html editor bar click "bib" icon and a popup will open with all the course bibliography entries
- Choose the reference you want to add clicking the arrow