Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table of Contents and PDF export of the entire wiki #84

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

joeltsch
Copy link

This change makes it possible to export the entire wiki as pdf-file or html site, over a dropown button to the right of the "Participation by user" link.
It is possible to choose if the exported content should be in standard alphabetical or hierarchical order, like it is in the Wiki index.

This Pull request also includes the changes of Pull request #60, which can be closed.

Steffen Pegenau and others added 28 commits April 5, 2016 11:55
Create a wiki with the settings 'seperate groups' and 'seperate wiki for
each group'.
Open the wiki, you will get the message that the page has not been created
yet.
Reload the page and you will receive a db write error.

table: ouwikis_subwikis
I think the problem is related to two uniqueness restrictions:
1. There must be only one entry for a group and wiki
2. There must be only one entry for a wiki and user (a seperate wiki for
every user)

In case of group wikis the user field is NULL. When opening the wiki
first, an table entry is generated. When opening it the second time,
Moodle tries to generate a second entry. But there already is the same
combination of wiki and user (NULL)

- The user-id is written to every entry in the mentioned table to avoid
  collisions of wikiid<->NULL
- When getting the subwiki, moodle shall not look for user=NULL

This may lead to problems in case of seperate wikis for every user
There are two constraints on the table ouwiki_subwikis
1. combination of wikiid and groupid must be unique
2. combination of wikiid and userid must be unique

Example:
Two subwikis for different groups resulted in
wikiid: 1 groupid: 1 userid: NULL
wikiid: 1 groupid: 2 userid: NULL

On MSSQL this is prohibited by constraint 2 and
the creation of the second subwiki resulted in
an exception.

To fix this the magic number is used as userid or groupid in case
they are NULL.
@joeltsch joeltsch changed the title PDF export of the entire wiki and Table of Contents Table of Contents and PDF export of the entire wiki Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant