Book import fixes

Book import fixes

Petr Skoda -
回帖数:8
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 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
回复Petr Skoda

Re: Book import fixes

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.

附件 book_module_cvs_structure_vs_moodle_structure.png
回复John Isner

Re: Book import fixes

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.
回复John Isner

Re: Book import fixes

Ralf Hilgenstock -
Core developers的头像 Particularly helpful Moodlers的头像 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
回复Ralf Hilgenstock

Re: Book import fixes

John Isner -
Ralf,
I see you already created issue MDL-9361 "Ability to edit language in third party modules and plugins w/o copying the language files". I voted for it and I also added a note to the documentation.
回复Petr Skoda

Book for Moodle 1.8

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
回复Del Helms

Re: Book for Moodle 1.8

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.