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

All courses have the same PAD #40

Closed
joergre opened this issue Jan 12, 2021 · 12 comments
Closed

All courses have the same PAD #40

joergre opened this issue Jan 12, 2021 · 12 comments

Comments

@joergre
Copy link

joergre commented Jan 12, 2021

All Moodle courses are directed to the same PAD. It would be nice if the courses had different PADs.

Jörg Reuter

  • Ferdinand-Braun-Schule Fulda -
@t-schroeder
Copy link

@joergre
Copy link
Author

joergre commented Feb 15, 2021

Leider nicht. Habe den Schlüssel überprüft, das Problem bleibt bestehen.

@jckoester
Copy link

I seem to have the same problem using etherpad-lite 1.8.14 and mod_etherpadlite 2021073000. APIKEY and Cookie-Domain are correct, however the plugin does not create any pads. It always tries to access /p/0 without any success.
The logfile of etherpad does not show any authentication attempts.
Any idea on how to debug further?

@grabs
Copy link
Collaborator

grabs commented Oct 15, 2021

Hi,
the url part "/p/0" means that the Moodle plugin could not create a group pad in etherpad. Usually this is a configuration problem.
You should check the following settings in your settings.json

    // Users must have a session to access pads. This effectively allows only group pads to be accessed.
    "requireSession" : true,

    // Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to group pads and regular pads.
    "editOnly" : true,

    // Users, who have a valid session, automatically get granted access to password protected pads
    "sessionNoPassword" : false,

You also should check that your moodle-server itself can access the etherpad server by using the configured url. That is needed to communicate by the API to create group pads and sessions.

@jckoester
Copy link

Thanks for the hint, it indeed turned out to be a DNS problem that should have been solved long ago.

@grabs
Copy link
Collaborator

grabs commented Oct 16, 2021

Good to hear that.

@grabs grabs closed this as completed Oct 16, 2021
@ThiloPetry
Copy link

Unfortunately we have the same problem and could not solve it yet. All points mentioned here have been checked and should be set correctly. The only difference is that for us require Sessions: False is set, otherwise we get an authorization error.
We are currently using mod_etherpadlite 2019013100

Should we worry about the authorization error since it will never go with these settings, or are there any other ideas on how to proceed?

@grabs
Copy link
Collaborator

grabs commented Dec 2, 2021

Hi Thilo, you really should use the current version 2021073000 from branch "MOODLE_311_STABLE". Please install this version and try again.

@ThiloPetry
Copy link

Thank you for the quick reply.
We have installed the mentioned version but still get the same error messages.
as soon as we set requireSession to true and open an etherpad we get: "Du hast keine Berechtigung, um auf dieses Pad zuzugreifen"(You do not have permission to access this pad).
When we set requireSession to false all pads access the same pad.

@grabs
Copy link
Collaborator

grabs commented Dec 3, 2021

Hi, it seems your moodle plugin can not communicate to your etherpad server. But this is needed to create a unique pad for each etherpad instance.
Check the following things:

  • Can your server, which runs your Moodle (not your internet browser) access the url you have configured for the plugin (etherpadlite | url)? Try a wget command on the commandline.
  • Is the API key (etherpadlite | apikey) valid? Check twice!
  • Is the configured cookie domain (etherpadlite | cookiedomain) configured correctly? If your Moodle runs on "lms.your-domain.org" the etherpad server has to run in a subdomain of "your-domain.org" e.g.: "ep.your-domain.org". For this example the configuration value should be ".your-domain.org".
  • Are the ssl certificates valid on both Moodle and etherpad?
  • What is the pad id of your etherpad url in the iframe src?

Best regards

@ksteitz
Copy link

ksteitz commented Jan 18, 2022

thanks for your checklist and support Andreas!
Thilo belongs to my staff. I´ve checked your list, looks fine so far.
2 questions:

  1. cookie domain: the main-domain is always the one to be set? Our dev-moodle runs with a subdomain like "mdldev.subdomain.maindomain.org" and the etherpad with "epad.subdomain.maindomain.org". Or has it to be "subdomain.maindomain.org" in that case? currently we set ".maindomain.org"
  2. "What is the pad id of your etherpad url in the iframe src?" what exactly do you mean? Each pad has a own moodle acticity-id which is linked in the course-page, but all activities are pointing to pad0, like Thilo described.

Some additional input from our epad Postgres-database:
DB shows that using same pad by all activities maybe caused by missing "uri" in that db-column; in our dev-db it is always "0" instead of e.g. "g.ZJtCh7hbE6EefnI9$Etherpad" (that Hash is an example from key-column in our live-pg-etherpad-DB, table "store" - our live-moodle uses still the old epad-moodle-plugin version 2.7.0 (Build: 2015021100) 2015060301 that works fine)
There is only read-/write-access to pad:0 (revision now at "pad:0:revs:617").
Most entries in dev-DB are from "sessionstorage" (47.011 line out of 49.013 overall = 95,9%; epad-live has only 14% lines with sessionstorage: 1.360.671 out of 9.711.059 lines)

@grabs
Copy link
Collaborator

grabs commented Jan 21, 2022

Hi Klaus,

  1. in my understanding the cookiedomain setting for etherpad could be in your case ".maindomain.org" or ".subdomain.maindomain.org". Both should be possible. Note the dot "." at the beginning.

  2. I was referring to the padid as you mentioned in your additional input e.g.: g.ZJtCh7hbE6EefnI9$Etherpad which should unique for each pad instance in Moodle. This can not be "0". The fact, that you get a "0" means, the group pad has not been created through the api. Maybe your Moodle server can't communicate properly to the etherpad server or vice versa. Maybe the api key is not valid. In my opinion it has nothing to do with the cookie domain. The cookie domain starts to matter in the browser session of the user after the group pad has been created.

Best regards
Andreas

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

No branches or pull requests

6 participants