Subtree merged git://github.com/skodak/moodle-mod_book.git (master branch) into mod...
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Sun, 20 May 2012 19:43:40 +0000 (21:43 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Sun, 20 May 2012 19:43:40 +0000 (21:43 +0200)
60 files changed:
1  2 
mod/book/.gitignore
mod/book/README.md
mod/book/backup/moodle1/lib.php
mod/book/backup/moodle2/backup_book_activity_task.class.php
mod/book/backup/moodle2/backup_book_settingslib.php
mod/book/backup/moodle2/backup_book_stepslib.php
mod/book/backup/moodle2/restore_book_activity_task.class.php
mod/book/backup/moodle2/restore_book_stepslib.php
mod/book/db/access.php
mod/book/db/install.xml
mod/book/db/log.php
mod/book/db/subplugins.php
mod/book/db/upgrade.php
mod/book/db/upgradelib.php
mod/book/delete.php
mod/book/edit.php
mod/book/edit_form.php
mod/book/index.php
mod/book/lang/en/book.php
mod/book/lib.php
mod/book/locallib.php
mod/book/mod_form.php
mod/book/move.php
mod/book/pix/add.png
mod/book/pix/chapter.png
mod/book/pix/icon.png
mod/book/pix/nav_exit.png
mod/book/pix/nav_next.png
mod/book/pix/nav_prev.png
mod/book/pix/nav_prev_dis.png
mod/book/pix/nav_sep.png
mod/book/settings.php
mod/book/show.php
mod/book/styles.css
mod/book/tool/exportimscp/db/access.php
mod/book/tool/exportimscp/imscp.css
mod/book/tool/exportimscp/index.php
mod/book/tool/exportimscp/lang/en/booktool_exportimscp.php
mod/book/tool/exportimscp/lib.php
mod/book/tool/exportimscp/locallib.php
mod/book/tool/exportimscp/pix/generate.png
mod/book/tool/exportimscp/version.php
mod/book/tool/importhtml/db/access.php
mod/book/tool/importhtml/import_form.php
mod/book/tool/importhtml/index.php
mod/book/tool/importhtml/lang/en/booktool_importhtml.php
mod/book/tool/importhtml/lib.php
mod/book/tool/importhtml/locallib.php
mod/book/tool/importhtml/version.php
mod/book/tool/print/db/access.php
mod/book/tool/print/index.php
mod/book/tool/print/lang/en/booktool_print.php
mod/book/tool/print/lib.php
mod/book/tool/print/locallib.php
mod/book/tool/print/pix/book.png
mod/book/tool/print/pix/chapter.png
mod/book/tool/print/print.css
mod/book/tool/print/version.php
mod/book/version.php
mod/book/view.php

index 0000000,0000000..043a39b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++# See gitignore(5) man page for more details
++#
++*~
++*.swp
++/tags
++/TAGS
++/cscope.*
++/.patches/
++/.idea/
++/nbproject/
++CVS
++.DS_Store
++/.settings/
++/.project
++/.buildpath
++/.cache
index 0000000,c4161c1..c4161c1
mode 000000,100644..100644
--- /dev/null
index 0000000,9d4dcc9..9d4dcc9
mode 000000,100755..100755
--- /dev/null
index 0000000,378b3c5..378b3c5
mode 000000,100644..100644
--- /dev/null
index 0000000,217f0f1..217f0f1
mode 000000,100644..100644
--- /dev/null
index 0000000,c83481a..c83481a
mode 000000,100644..100644
--- /dev/null
index 0000000,7a0979d..7a0979d
mode 000000,100644..100644
--- /dev/null
index 0000000,d131499..d131499
mode 000000,100644..100644
--- /dev/null
index 0000000,dcf49d6..dcf49d6
mode 000000,100644..100644
--- /dev/null
index 0000000,7fb9b97..7fb9b97
mode 000000,100644..100644
--- /dev/null
index 0000000,1957003..1957003
mode 000000,100644..100644
--- /dev/null
index 0000000,ffa942d..ffa942d
mode 000000,100644..100644
--- /dev/null
index 0000000,0000000..64d23da
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,105 @@@
++<?php
++// This file is part of Book module for Moodle - http://moodle.org/
++//
++// Moodle is free software: you can redistribute it and/or modify
++// it under the terms of the GNU General Public License as published by
++// the Free Software Foundation, either version 3 of the License, or
++// (at your option) any later version.
++//
++// Moodle is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License
++// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
++
++/**
++ * This page lists all the instances of book in a particular course
++ *
++ * @package    mod
++ * @subpackage book
++ * @copyright  2004-2011 Petr Skoda  {@link http://skodak.org}
++ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
++ */
++
++require(dirname(__FILE__).'/../../config.php');
++require_once(dirname(__FILE__).'/locallib.php');
++
++$id = required_param('id', PARAM_INT);           // Course Module ID
++
++$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
++
++unset($id);
++
++require_course_login($course, true);
++$PAGE->set_pagelayout('incourse');
++
++/// Get all required strings
++$strbooks        = get_string('modulenameplural', 'mod_book');
++$strbook         = get_string('modulename', 'mod_book');
++$strsectionname  = get_string('sectionname', 'format_'.$course->format);
++$strname         = get_string('name');
++$strintro        = get_string('moduleintro');
++$strlastmodified = get_string('lastmodified');
++
++$PAGE->set_url('/mod/book/index.php', array('id' => $course->id));
++$PAGE->set_title($course->shortname.': '.$strbooks);
++$PAGE->set_heading($course->fullname);
++$PAGE->navbar->add($strbooks);
++echo $OUTPUT->header();
++
++add_to_log($course->id, 'book', 'view all', 'index.php?id='.$course->id, '');
++
++/// Get all the appropriate data
++if (!$books = get_all_instances_in_course('book', $course)) {
++    notice(get_string('thereareno', 'moodle', $strbooks), "$CFG->wwwroot/course/view.php?id=$course->id");
++    die;
++}
++
++$usesections = course_format_uses_sections($course->format);
++if ($usesections) {
++    $sections = get_all_sections($course->id);
++}
++
++$table = new html_table();
++$table->attributes['class'] = 'generaltable mod_index';
++
++if ($usesections) {
++    $table->head  = array ($strsectionname, $strname, $strintro);
++    $table->align = array ('center', 'left', 'left');
++} else {
++    $table->head  = array ($strlastmodified, $strname, $strintro);
++    $table->align = array ('left', 'left', 'left');
++}
++
++$modinfo = get_fast_modinfo($course);
++$currentsection = '';
++foreach ($books as $book) {
++    $cm = $modinfo->cms[$book->coursemodule];
++    if ($usesections) {
++        $printsection = '';
++        if ($book->section !== $currentsection) {
++            if ($book->section) {
++                $printsection = get_section_name($course, $sections[$book->section]);
++            }
++            if ($currentsection !== '') {
++                $table->data[] = 'hr';
++            }
++            $currentsection = $book->section;
++        }
++    } else {
++        $printsection = '<span class="smallinfo">'.userdate($book->timemodified)."</span>";
++    }
++
++    $class = $book->visible ? '' : 'class="dimmed"'; // hidden modules are dimmed
++
++    $table->data[] = array (
++        $printsection,
++        "<a $class href=\"view.php?id=$cm->id\">".format_string($book->name)."</a>",
++        format_module_intro('book', $book, $cm->id));
++}
++
++echo html_writer::table($table);
++
++echo $OUTPUT->footer();
index 0000000,a6a246c..a6a246c
mode 000000,100644..100644
--- /dev/null
index 0000000,7591051..7591051
mode 000000,100644..100644
--- /dev/null
index 0000000,5cfc7bc..5cfc7bc
mode 000000,100644..100644
--- /dev/null
index 0000000,1a5c6ec..1a5c6ec
mode 000000,100644..100644
--- /dev/null
index 0000000,6a2011d..6a2011d
mode 000000,100644..100644
--- /dev/null
index 0000000,bda131f..bda131f
mode 000000,100644..100644
Binary files differ
index 0000000,d84cac0..d84cac0
mode 000000,100644..100644
Binary files differ
index 0000000,41095ef..41095ef
mode 000000,100644..100644
Binary files differ
index 0000000,4c129f0..4c129f0
mode 000000,100644..100644
Binary files differ
index 0000000,1e11bd9..1e11bd9
mode 000000,100644..100644
Binary files differ
index 0000000,b08bbda..b08bbda
mode 000000,100644..100644
Binary files differ
index 0000000,3f61922..3f61922
mode 000000,100644..100644
Binary files differ
index 0000000,35139a0..35139a0
mode 000000,100644..100644
Binary files differ
index 0000000,0ab07e2..0ab07e2
mode 000000,100644..100644
--- /dev/null
index 0000000,fdda808..fdda808
mode 000000,100644..100644
--- /dev/null
index 0000000,d09189d..d09189d
mode 000000,100644..100644
--- /dev/null
index 0000000,9e4396d..9e4396d
mode 000000,100644..100644
--- /dev/null
index 0000000,e4f2add..e4f2add
mode 000000,100644..100644
--- /dev/null
index 0000000,fcb6861..fcb6861
mode 000000,100644..100644
--- /dev/null
index 0000000,6316768..6316768
mode 000000,100644..100644
--- /dev/null
index 0000000,37b5a68..37b5a68
mode 000000,100644..100644
--- /dev/null
index 0000000,de7090a..de7090a
mode 000000,100644..100644
Binary files differ
index 0000000,4a7ce67..4a7ce67
mode 000000,100644..100644
--- /dev/null
index 0000000,cf87c1f..cf87c1f
mode 000000,100644..100644
--- /dev/null
index 0000000,9e557ca..9e557ca
mode 000000,100644..100644
--- /dev/null
index 0000000,59eb547..59eb547
mode 000000,100644..100644
--- /dev/null
index 0000000,37d87b5..37d87b5
mode 000000,100644..100644
--- /dev/null
index 0000000,2a96e4b..2a96e4b
mode 000000,100644..100644
--- /dev/null
index 0000000,fe57fb2..fe57fb2
mode 000000,100644..100644
--- /dev/null
index 0000000,b1949dd..b1949dd
mode 000000,100644..100644
--- /dev/null
index 0000000,54e8012..54e8012
mode 000000,100644..100644
--- /dev/null
index 0000000,c3b7164..c3b7164
mode 000000,100644..100644
--- /dev/null
index 0000000,a5c9080..a5c9080
mode 000000,100644..100644
Binary files differ
index 0000000,99ecd29..99ecd29
mode 000000,100644..100644
Binary files differ
index 0000000,7b7cced..7b7cced
mode 000000,100644..100644
--- /dev/null
index 0000000,e566b67..e566b67
mode 000000,100644..100644
--- /dev/null
index 0000000,0000000..45fceae
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,34 @@@
++<?php
++// This file is part of Book module for Moodle - http://moodle.org/
++//
++// Moodle is free software: you can redistribute it and/or modify
++// it under the terms of the GNU General Public License as published by
++// the Free Software Foundation, either version 3 of the License, or
++// (at your option) any later version.
++//
++// Moodle is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License
++// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
++
++/**
++ * Book plugin version info
++ *
++ * @package    mod
++ * @subpackage book
++ * @copyright  2004-2012 Petr Skoda  {@link http://skodak.org}
++ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
++ */
++
++defined('MOODLE_INTERNAL') || die;
++
++$module->version   = 2012042100; // The current module version (Date: YYYYMMDDXX)
++$module->requires  = 2011070100; // Requires this Moodle version
++$module->cron      = 0;          // Period for cron to check this module (secs)
++$module->component = 'mod_book'; // Full name of the plugin (used for diagnostics)
++
++$module->maturity  = MATURITY_STABLE;
++$module->release   = "2.1 (20111105)"; // User-friendly version number
index 0000000,afec9da..afec9da
mode 000000,100644..100644
--- /dev/null