Book import fixes

Book import fixes

autor Petr Skoda -
Počet odpovědí: 8
Obrázek: Core developers Obrázek: Documentation writers Obrázek: Particularly helpful Moodlers Obrázek: Peer reviewers Obrázek: Plugin developers
I have just commited some changes in import code that are based on patches from Jaroslav eděnka. List of changes:
  • better handling of #anchors
  • relative links to non-html files are converted to Moodle absolute links
  • backslashes in links are treated as slashes - MS compatibiltiy hack

skodak
Průměr hodnocení: -
V odpovědi na Petr Skoda

Re: Book import fixes

autor John Isner -
Hi Petr,
I have a question about using CVS to checkout the book module.

Here is is my CVS checkout command:

$ cd /var/www/moodle
$ cvs co -r MOODLE_18_STABLE -d mod/book contrib/plugins/mod/book

This creates a lang directory under the book directory (see screenshot). The book/lang directory must be moved -- or rather merged -- with the 'real' lang directory, which is up one level. In the past, when I installed book using the zip file from modules and plugins, I made these structural changes manually. Now that I am using CVS, do I also have to merge the contents of the lang CVS subdirectories?

I guess the real question is: Why doesn't the book module have lang and mod at the same level so that CVS checkout works without requiring any subsequent restructuring by the administrator?

I'm also wondering how I should update the book module using CVS, since update will have the same structural problems as the initial checkout.

Příloha book_module_cvs_structure_vs_moodle_structure.png
V odpovědi na John Isner

Re: Book import fixes

autor John Isner -
I found the answer to my question. According to the Moodle documentation on non-standard modules,

Some of the modules may contain their own language files. If so then just leave them there, they'll be found automatically.

Book is one of the modules that 'contains its own language files' (contrib/plugins/mod/book/lang). There is no need to move this directory (or merge it with moodle/lang) because Moodle looks for a mod/book/lang directory before looking for moodle/lang/book.

The CVS checkout command for book, and later the CVS update command, are all that's needed.
V odpovědi na John Isner

Re: Book import fixes

autor Ralf Hilgenstock -
Obrázek: Core developers Obrázek: Particularly helpful Moodlers Obrázek: Translators
Hi Jon,

"there is no need to move this directory", Thats not exactly correct. Its correct if you only use the existing lang files. If you try to edit this files in the admin language menu the files in this folder are not found.

Ralf
V odpovědi na Petr Skoda

Book for Moodle 1.8

autor Del Helms -
I recently download the books module for Moodle 1.8 and placed the books folder into the moodle/mod folder. Unfortunately, it is showing up as resource rather than an activity. It works fine, but it is a bit odd I think that it would show up in the wrong pull-down menu.

Moodle 1.8
Mac OS 10.4 client
Apache 1.3.33
PHP 5.2.2
MySQL 4.1
Safari browser

Respectfully,

Del
V odpovědi na Del Helms

Re: Book for Moodle 1.8

autor John Isner -
I always thought Book should be classified as a resource since students do not interact with them in any significant way. I wonder if this was intentional.