Commit ad1c11bd authored by Petr Skoda's avatar Petr Skoda
Browse files

move toc to fake block, remove toc width and add new mod settings

parent 065f5c4c
......@@ -152,6 +152,13 @@ function xmldb_book_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2011011600, 'book');
}
if ($oldversion < 2011011601) {
unset_config('book_tocwidth');
// book savepoint reached
upgrade_mod_savepoint(true, 2011011601, 'book');
}
//TODO: migrate the legacy file.php links to new pluginfile.php and file areas per chapter
......
......@@ -19,7 +19,7 @@
*
* @package mod
* @subpackage book
* @copyright 2004-2010 Petr Skoda {@link http://skodak.org}
* @copyright 2004-2011 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
......@@ -70,7 +70,7 @@ if ($confirm) { // the operation was confirmed.
add_to_log($course->id, 'course', 'update mod', '../mod/book/view.php?id='.$cm->id, 'book '.$book->id);
add_to_log($course->id, 'book', 'update', 'view.php?id='.$cm->id, $book->id, $cm->id);
book_check_structure($book->id);
book_preload_chapters($book->id); //fix structure
redirect('view.php?id='.$cm->id);
}
......
......@@ -19,7 +19,7 @@
*
* @package mod
* @subpackage book
* @copyright 2004-2010 Petr Skoda {@link http://skodak.org}
* @copyright 2004-2011 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
......@@ -102,7 +102,7 @@ if ($mform->is_cancelled()) {
add_to_log($course->id, 'book', 'update', 'view.php?id='.$cm->id.'&chapterid='.$data->id, $book->id, $cm->id);
}
book_check_structure($book->id);
book_preload_chapters($book->id); // fix structure
redirect("view.php?id=$cm->id&chapterid=$data->id");
}
......
......@@ -107,7 +107,7 @@ if ($mform->is_cancelled()) {
print_box_start('generalbox boxaligncenter centerpara');
echo '<strong>'.get_string('importing', 'book').':</strong>';
echo '<table cellpadding="2" cellspacing="2" border="1">';
book_check_structure($book->id);
book_preload_chapters($book->id); // fix structure
foreach($refs as $ref) {
$chapter = book_read_chapter($coursebase, $ref);
if ($chapter) {
......
......@@ -36,5 +36,4 @@ $string['printedby'] = 'Надрукаваны';
$string['relinking'] = 'Перакампанаваць';
$string['subchapter'] = 'Параграф';
$string['toc'] = 'Змест';
$string['tocwidth'] = 'Вызначыць шырыню зместу для ўсіх падручнікаў';
$string['top'] = 'наверх';
......@@ -5,7 +5,6 @@ $string['modulenameplural'] = 'Llibres';
$string['pluginname'] = 'Llibre';
$string['toc'] = 'Índex';
$string['tocwidth'] = 'Escolliu l\'amplada de l\'índex per tots els llibres.';
$string['faq'] = 'PMF dels llibres (FAQ)';
$string['customtitles'] = 'Títols personalitzats';
......
......@@ -36,5 +36,4 @@ $string['printedby'] = 'Vytiskl(a)';
$string['relinking'] = 'Relinkuji';
$string['subchapter'] = 'Podkapitola';
$string['toc'] = 'Obsah';
$string['tocwidth'] = 'Vyberte šířku obsahu pro všechny knihy.';
$string['top'] = 'začátek';
......@@ -5,7 +5,6 @@ $string['modulenameplural'] = 'Bücher';
$string['pluginname'] = 'Buch';
$string['toc'] = 'Inhaltsverzeichnis';
$string['tocwidth'] = 'Wählen Sie die Breite des Inhaltsverzeichnisses für alle Bücher aus.';
$string['faq'] = 'Buch FAQ';
$string['customtitles'] = 'Angepasster Titel';
......
......@@ -7,8 +7,6 @@ $string['pluginname'] = 'Book';
$string['pluginadministration'] = 'Book administration';
$string['toc'] = 'Table of contents';
$string['tocwidth'] = 'Select width of the Table of Contents for all books.';
$string['book_tocwidth'] = 'Table of Contents width';
$string['faq'] = 'Book FAQ';
$string['faq_help'] = '
*Why only two levels?*
......@@ -55,6 +53,8 @@ $string['numbering0'] = 'None';
$string['numbering1'] = 'Numbers';
$string['numbering2'] = 'Bullets';
$string['numbering3'] = 'Indented';
$string['numberingoptions'] = 'Available numbering options';
$string['numberingoptions_help'] = 'Select numbering options that should be available when creating new books.';
$string['chapterscount'] = 'Chapters';
......@@ -90,3 +90,5 @@ $string['book:viewhiddenchapters'] = 'View hidden book chapters';
$string['book:import'] = 'Import chapters';
$string['book:print'] = 'Print book';
$string['book:exportimscp'] = 'Export book as IMS content package';
$string['errorchapter'] = 'Error reading book chapter.';
\ No newline at end of file
......@@ -27,5 +27,4 @@ $string['printedby'] = 'Imprimido por';
$string['showpreview'] = 'Mostrar TOC Preliminar';
$string['subchapter'] = 'Subcápitulo';
$string['toc'] = 'Tabla de Contenido';
$string['tocwidth'] = 'Seleciona el Ancho de la Tabla de Contenidos de Todos los Libros.';
$string['top'] = 'arriba';
......@@ -37,5 +37,4 @@ $string['subchapter'] = 'Alaluku';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Suomi';
$string['toc'] = 'Sisällysluettelo';
$string['tocwidth'] = 'Valitse kaikkien kirjojen sisällysluetteloiden leveys.';
$string['top'] = 'Alkuun';
......@@ -32,8 +32,6 @@ $string['top'] = 'Haut';
$string['navprev'] = 'Précédent';
$string['navnext'] = 'Suivant';
$string['tocwidth'] = 'Largeur (en pixels) de la table des matières des livres.';
$string['import'] = 'Importation';
$string['doimport'] = 'Importer';
$string['importing'] = 'Importation';
......
......@@ -32,9 +32,6 @@ $string['top'] = 'atas';
$string['navprev'] = 'Sebelumnya';
$string['navnext'] = 'Selanjutnya';
#$string['tocwidth'] = 'Select width of the Table of the Contents for all books.';
$string['tocwidth'] = 'Pilih lebar Tabel untuk semua buku';
$string['import'] = 'Import';
$string['doimport'] = 'Import';
$string['importing'] = 'Meng-Impor';
......
......@@ -7,7 +7,6 @@ $string['book:import'] = 'Importare capitoli';
$string['book:print'] = 'Stampare libro';
$string['book:read'] = 'Leggere libro';
$string['book:viewhiddenchapters'] = 'Visualizzare capitoli nascosti';
$string['book_tocwidth'] = 'Larghezza sommario';
$string['chapterscount'] = 'Capitoli';
$string['chaptertitle'] = 'Titolo del capitolo';
$string['confchapterdelete'] = 'Sei sicuro di eliminare questo capitolo?';
......@@ -43,5 +42,4 @@ $string['printedby'] = 'Stampato da';
$string['relinking'] = 'Elaborazione dei collegamenti';
$string['subchapter'] = 'Paragrafo';
$string['toc'] = 'Sommario';
$string['tocwidth'] = 'Larghezza in pixel del Sommario per i Libri.';
$string['top'] = 'Ritorna su';
......@@ -5,7 +5,6 @@ $string['modulenameplural'] = 'ブック';
$string['pluginname'] = 'ブック';
$string['toc'] = '目次';
$string['tocwidth'] = 'コンテンツのテーブル幅を選んでください。';
$string['faq'] = 'ブック FAQ';
$string['customtitles'] = 'カスタムタイトル';
......
......@@ -35,5 +35,4 @@ $string['printedby'] = 'Afgedrukt door';
$string['relinking'] = 'Opnieuw linken';
$string['subchapter'] = 'Paragraaf';
$string['toc'] = 'Inhoudstafel';
$string['tocwidth'] = 'Kies de breedte van de inhoudstafel voor alle boeken.';
$string['top'] = 'boven';
......@@ -36,5 +36,4 @@ $string['printedby'] = 'Wydrukowane przez użytkoniwka';
$string['relinking'] = 'Ponowne tworzenie linków';
$string['subchapter'] = 'Podrozdział';
$string['toc'] = 'Spis treści';
$string['tocwidth'] = 'Ustaw szrokość spisu treści dla wszystkich książek';
$string['top'] = 'Góra';
......@@ -5,7 +5,6 @@ $string['modulenameplural'] = 'Livros';
$string['pluginname'] = 'Livro';
$string['toc'] = 'Sumário';
$string['tocwidth'] = 'Selecione a largura do Sumário para todos os livros.';
$string['faq'] = 'Perguntas sobre Livro';
$string['customtitles'] = 'Títulos Personalizados';
......
......@@ -36,5 +36,4 @@ $string['printedby'] = 'Vytlačil(a)';
$string['relinking'] = 'Relinkujem';
$string['subchapter'] = 'Podkapitola';
$string['toc'] = 'Obsah';
$string['tocwidth'] = 'Vyberte šírku obsahu pre všetky knihy.';
$string['top'] = 'začiatok';
......@@ -6,7 +6,6 @@ $string['modulename'] = 'Knjiga';
$string['modulenameplural'] = 'Knjige';
$string['pluginname'] = 'Knjiga';
$string['toc'] = 'Kazalo vsebine';
$string['tocwidth'] = 'Izberite širino kazala vsebine za vse knjige.';
$string['faq'] = 'Knjiga - pogosta vprašanja';
$string['customtitles'] = 'Ločeni naslovi';
$string['editingchapter'] = 'Urejanje poglavja';
......@@ -45,6 +44,5 @@ $string['book:import'] = 'Uvozi poglavja';
$string['book:print'] = 'Natisni knjigo';
$string['book:read'] = 'Beri knjigo';
$string['book:viewhiddenchapters'] = 'Poglej skrita poglavja';
$string['book_tocwidth'] = 'Širina kazala vsebine';
$string['generateimscp'] = 'Generiraj IMS vsebinski paket';
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment