Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
ad1c11bd
Commit
ad1c11bd
authored
Jan 16, 2011
by
Petr Skoda
Browse files
move toc to fake block, remove toc width and add new mod settings
parent
065f5c4c
Changes
29
Hide whitespace changes
Inline
Side-by-side
db/upgrade.php
View file @
ad1c11bd
...
...
@@ -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
...
...
delete.php
View file @
ad1c11bd
...
...
@@ -19,7 +19,7 @@
*
* @package mod
* @subpackage book
* @copyright 2004-201
0
Petr Skoda {@link http://skodak.org}
* @copyright 2004-201
1
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
);
}
...
...
edit.php
View file @
ad1c11bd
...
...
@@ -19,7 +19,7 @@
*
* @package mod
* @subpackage book
* @copyright 2004-201
0
Petr Skoda {@link http://skodak.org}
* @copyright 2004-201
1
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
"
);
}
...
...
import.php
View file @
ad1c11bd
...
...
@@ -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) {
...
...
lang/be/book.php
View file @
ad1c11bd
...
...
@@ -36,5 +36,4 @@ $string['printedby'] = 'Надрукаваны';
$string
[
'relinking'
]
=
'Перакампанаваць'
;
$string
[
'subchapter'
]
=
'Параграф'
;
$string
[
'toc'
]
=
'Змест'
;
$string
[
'tocwidth'
]
=
'Вызначыць шырыню зместу для ўсіх падручнікаў'
;
$string
[
'top'
]
=
'наверх'
;
lang/ca/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
...
...
lang/cs/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
lang/de/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
...
...
lang/en/book.php
View file @
ad1c11bd
...
...
@@ -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
lang/es/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
lang/fi/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
lang/fr/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
...
...
lang/id/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
...
...
lang/it/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
lang/ja/book.php
View file @
ad1c11bd
...
...
@@ -5,7 +5,6 @@ $string['modulenameplural'] = 'ブック';
$string
[
'pluginname'
]
=
'ブック'
;
$string
[
'toc'
]
=
'目次'
;
$string
[
'tocwidth'
]
=
'コンテンツのテーブル幅を選んでください。'
;
$string
[
'faq'
]
=
'ブック FAQ'
;
$string
[
'customtitles'
]
=
'カスタムタイトル'
;
...
...
lang/nl/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
lang/pl/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
lang/pt_br/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
...
...
lang/sk/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
lang/sl/book.php
View file @
ad1c11bd
...
...
@@ -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'
;
?>
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment