-- Art
Installation:
- do a full db backup, moddata backup and dirroot backup
- upgrade db to 4.1.x
- upgrade moodle to 1.6dev
- delete old mod/book/*.*
- extract downloaded zip from above into your mod/
- rename book_16 to book
- convert site to unicode - expect problems with not iso-8859-1 encodings
skodak
Thanks for your update. It worked for me.
I wish module Book will be able to import and export data in a near future. If there is a combination between module Book and module SCORM, it will be wonderful.
Hi I am having problem with the lang.
I have installed 1,6 Moodle,
but when I install BOOK (book_16), can not for the world of me get the lang files to play ball, they just refuse to show up in admin (book.php).
Using php 5 and Mysql 5. (database is utf8)
Anyone have any IDEA?
I will fix some minor bugs and small feature requests right after the 1.6 release, please let me know if there are any more unreported problems or annoyances
thanks
skodak
Sorry mates
I'm feeling kind of stupit right now.
You say it works fine for you, so I think what's the diffrence?
Well it's kind of obvious "the Language".....
So I think I should take look at lang.php and there it is en_utf8 is hardcoded there I think for comparing to others.
So I think, Oh I have to put book.php in en_utf8 also.
To check this I just loaded book.php manually in adminlang, and there it is "error cant find c:\...../lang/en_utf8/book.php".
So this has nothing to do with the wonderful Book mod.
Thought you should know.
Sometimes better to try to use the small peanut op there before asking stupid questions.
Thanks for the replies.
Is this table used for building the log-files or so? Has everyone to change this in his own additional modules?
book
(mysql): CREATE TABLE mdl_book ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, course INT(10) UNSIGNED NOT NULL DEFAULT '0', name VARCHAR(255) NOT NULL DEFAULT '', summary TEXT NOT NULL DEFAULT '', numbering TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', disableprinting TINYINT(2) UNSIGNED NOT NULL DEFAULT '0', customtitles TINYINT(2) UNSIGNED NOT NULL DEFAULT '0', timecreated INT(10) UNSIGNED NOT NULL DEFAULT '0', timemodified INT(10) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (id)) COMMENT='Defines book'
(mysql): CREATE TABLE mdl_book_chapters ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, bookid INT(10) UNSIGNED NOT NULL DEFAULT '0', pagenum INT(10) UNSIGNED NOT NULL DEFAULT '0', subchapter TINYINT(2) UNSIGNED NOT NULL DEFAULT '0', title VARCHAR(255) NOT NULL DEFAULT '', content LONGTEXT NOT NULL DEFAULT '', hidden TINYINT(2) UNSIGNED NOT NULL DEFAULT '0', timecreated INT(10) UNSIGNED NOT NULL DEFAULT '0', timemodified INT(10) UNSIGNED NOT NULL DEFAULT '0', importsrc VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (id)) COMMENT='Defines book_chapters'
(mysql): INSERT INTO mdl_log_display VALUES ('book', 'update', 'book', 'name')
1136: Column count doesn't match value count at row 1
Error
(mysql): INSERT INTO mdl_log_display VALUES ('book', 'view', 'book', 'name')
1136: Column count doesn't match value count at row 1
Error
(mysql): INSERT INTO mdl_log_display VALUES ('book', 'view all', 'book', 'name')
1136: Column count doesn't match value count at row 1
Error
(mysql): INSERT INTO mdl_log_display VALUES ('book', 'print', 'book', 'name')
1136: Column count doesn't match value count at row 1
Error
book tables could NOT be set up successfully! |
(mysql): SELECT * FROM mdl_user WHERE id = '2' AND username = 'guest' LIMIT 1
Changing (in bold) the last lines in the MySQL script seems to solve the problem:
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('bookmark', 'add', 'bookmark', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('bookmark', 'update', 'bookmark', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('bookmark', 'view', 'bookmark', 'name');
By the way, the install procedure does not install the languages files for the module book, is that correct?
If you are using 1,6 you have to use book_16.zip otherwise it wont work.
So if you had tried the otherone you have to clean the tables form the database.
http://git.catalyst.net.nz/gitweb?p=moodle-r2.git;a=commitdiff;h=714478e5484686499f2a5cf9f96acf6bca3fbaa7
I am tried to install Book_16 today and everything seemed fine.
But when I try to add the activity it is listed as modulename instead of book_16 in the pulldown menu and i get the reply "This module type doesn't exist".
Where is the problem ?
Yours Felix
P.S. In the admin module interface it is referenced as book_16 but when entering the settings the heading is also moduklename
Where do i have to put them otherwise ?
Hi Felix,
After you unzip book_16 in /mod/ you have to rename the folder "book_16" to just "book".
If you have already tried to run moodle/admin, then you have to go to the Administration Panel and click configuration/modules/ and find book_16 and delete it. Then you have to use "phpMyAdmin" to drop the book tables from the database.
Then run /moodle/admin/ again to rebuild the database and install "book".
That should fix it.
Clarence
That Catalyst patch seems to be obsolete, please look at this bugreport:
http://tracker.moodle.org/browse/MDL-6640
Please, let us try to help each other making the book module up to date
Try this one: http://download.moodle.org/modules/book_16.zip
You will most likely need to drop any tables for the older version of the book module from your database
-Steve
Ang: Re: Ang: Re: Book module in 1.6 2 - obsolete!!
My test is with a fresh Moodle installation, so it is strange that I am getting error messages like if the old version is installed.
My test was also with the package from:
http://download.moodle.org/modules/book_16.zip
It seems like the sql-file in that package is obsolete too.
Any one else?
Re: Ang: Re: Ang: Re: Book module in 1.6 2 - obsolete!!
Ang: Re: Ang: Re: Ang: Re: Book module in 1.6 2 - obsolete!!
That is true, and I use total fresh databases (I make a new one each time) for each try out, I clean the moodledata for any left overs. So it is odd.
Re: Ang: Re: Ang: Re: Ang: Re: Book module in 1.6 2 - obsolete!!
-Steve
Ang: Re: Ang: Re: Ang: Re: Ang: Re: Book module in 1.6 2 - obsolete!!
Yes, I renamed it to: book.
- Jens
Ang: Re: Ang: Re: Ang: Re: Ang: Re: Book module in 1.6 2 - Up to date :-)
I have downloaded the 1.62+ again today and downloaded the Bookmodule.
Installed the 2 scripts with the same procedure as allways - but:
Now it works. - What ever the reason is: Thank you!!
Weird...
-- Art

I can only say I have installed 3 fresh Moodles with the latest book_16 code and with Langhoffs' patch. All failed - and I had no such failures with previous versions.
So coders,- could you try out the latest 1.62+?
It could improve Moodles image if the Q&A included the well known modules like the book.
Art,- does your installation run with MySql 4 or version 5? Mine runs version 5.
BR
Jens
MySQL - 4.1.21-standard
Maybe that's the issue.-- Art
Hello,
I'm getting the following:
(mysql): INSERT INTO mdl_log_display (module, action, mtable, field) VALUES ('bookmark', 'add', 'bookmark', 'name')
1062: Duplicate entry 'bookmark-add' for key 2
Error
(mysql): INSERT INTO mdl_log_display (module, action, mtable, field) VALUES ('bookmark', 'update', 'bookmark', 'name')
1062: Duplicate entry 'bookmark-update' for key 2
Error
(mysql): INSERT INTO mdl_log_display (module, action, mtable, field) VALUES ('bookmark', 'view', 'bookmark', 'name')
1062: Duplicate entry 'bookmark-view' for key 2
Error
(mysql): INSERT INTO mdl_log_display (module, action, mtable, field) VALUES ('book', 'print', 'book', 'name')
1062: Duplicate entry 'book-print' for key 2
Error
book tables could NOT be set up successfully!
----
also, in one of my courses, Recent Activities block Course Updates, I just noticed this:
Warning: print_recent_activity(/home/mysite/public_html/moodle/mod/book_16/lib.php): failed to open stream: No such file or directory in /home/mysite/public_html/moodle/course/lib.php on line 599
Warning: print_recent_activity(): Failed opening '/home/mysite/public_html/moodle/mod/book_16/lib.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/moodle/course/lib.php on line 599
I did rename Book_16 to Book.
I tried the mysql that came with the zip as well as with the modifications by Ger. I get similar 'duplicate entry for x key' error messages.
I reinstalled 3 times, each time deleting the tables that were created,, but I don't know enough about this backend stuff to know what the duplicate keys means.
thanks

As suggested in a separate discussion, please try deleting the Book module from the page Administration >> Configuration >> Modules.
drop table mdl_book;
drop table mdl_book_chapters;
delete from mdl_log_display where module = 'book';
That should remove two tables and 4 entries from the mdl_log_display fields.
If you are using php_my_admin, login normally and look for "book" in the field "module" of table "mdl_log_display." Delete the 4 records the system finds.
HIH,
Kevin Metcalf
After having read all the suggestions and trying them unsuccessfully, the " delete from mdl_log_display where module = 'book' " has done the trick.
And the book module is worth the pains.
Libor
Thankyou Kevin for your instructions on deleting the tables. Even as a novice user I could understand and follow them.
My prob was I installed at book_16, realised the error and renamed the file to book, but hadn't deleted the tables. Just renaming the folder didn't work after the install was already done!
Please note that the Book module for 1.6 is now available in Modules and Plugins. As far as I know, the modules download page is due to be removed very soon.
Helen, what is the place for the most recent versions? I thought it was CVS or does that service stop now we have this?
.. I did a fresh CVS last night but saw that the version of book was much older.. (Or must I specify more then just /contrib for a cvs?)
Most items in Modules and plugins are packages updated each night from CVS, so it shouldn't make any difference whether you use CVS or the Modules and plugins database.
Please note that there are now two versions of the Book module, book.zip and book_16.zip.
Hi all,
I've just installed the book_16 module.
I wanted to migrate the database (http://myserver/moodle/admin/utfdbmigrate.php), but I've got this message:
unicode db migration has already been performed! |
At his time all tables are utf8_general_ci coded, except for mdl_book and mdl_book_chapters that are still latin1_swedish_ci.
Thanks in advance for your help.