Instant student Q&A forum view all posts upon making own post--without edit or delete-own post capability

Instant student Q&A forum view all posts upon making own post--without edit or delete-own post capability

by Thomas Mellin -
Number of replies: 3

Dear Colleagues,

With Moodle 3.9, my code modification allowed students to:

  1. Instantaneously read others' Q & A posts after making their own post
  2. Never edit or delete own post

The successful method was to edit mod/forum/lib.php as follows:

-----

After /** Include required files */, add

$CFG->maxeditingtime = 0;

-----

This method appears to no longer work with 4.0dev+.  Any suggestions?

Sincerely,

Tom

Average of ratings: -
In reply to Thomas Mellin

Re: Instant student Q&A forum view all posts upon making own post--without edit or delete-own post capability

by Thomas Mellin -
'Got even better features/functionality than I expected!

  1. Students can post to Q&A and edit or delete within maxeditingtime so long as they do not leave or reload the page.
  2. Page refresh before maxeditingtime immediately reveals others' posts and removes student edit & delete capability.
Moodle 4.0dev+
SSH access via Ubuntu Linux
mod/forum
sudo nano lib.php
^W
maxedit
(add line shown in the image below on which the cursor is present)


In reply to Thomas Mellin

Re: Instant student Q&A forum view all posts upon making own post--without edit or delete-own post capability

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Why are you hacking core files to achieve this?

The setting can be adjusted down to 1 minute in the admin UI (just search for 'maxeditingtime' in the admin settings) or you can put $CFG->maxeditingtime = 0; in your site's config.php and that will allow you to set it to 0, without touching any core files.
Average of ratings: Useful (1)
In reply to Davo Smith

Re: Instant student Q&A forum view all posts upon making own post--without edit or delete-own post capability

by Thomas Mellin -

Davo,

Thank you for this feedback.  It's good to know that config.php is the safe place for setting variables not in the admin GUI.

Two things I meant to emphasize, though:

  1. I want to leave the normal maxeditingtime in place for standard forums
  2. By placing maxeditingtime of zero in the code affecting only Q and A forums, the option for students to instantly see the Q and A forum posts of others upon page reload is created, while also eliminating student edit/delete as the 'cost' of seeing others' posts.

Would this functionality be possible through an if{ command in config.php?  It seems to me that the config.php route would create a global maxeditingtime affecting all forum types.

Tom