Moodle

Cannot delete forums

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.7
  • Fix Version/s: 1.7.2, 1.8
  • Component/s: AJAX
  • Labels:
    None
  • Environment:
    Win2003 server
    MSSQL 2005
    PHP 5.1.6.
    ODBTP ver. 1.1.4
  • Affected Branches:
    MOODLE_17_STABLE
  • Fixed Branches:
    MOODLE_17_STABLE, MOODLE_18_STABLE

Description

I am not able to delete forums. When I click delete, they dissapear from the GUI, but they are not deletet in the DB and comes back after a refresh.

PS : MSSQL are not in the DB list in the tracker.

Activity

Hide
Thomas Forsberg added a comment -

One more detail: If I try to go into another forum after I have tried to delete a forum, the bowser hangs and after a comes with a warning that a script is running that slows down the computer and ask if I want to terminate it.

Show
Thomas Forsberg added a comment - One more detail: If I try to go into another forum after I have tried to delete a forum, the bowser hangs and after a comes with a warning that a script is running that slows down the computer and ask if I want to terminate it.
Hide
Vy-Shane Sin Fat added a comment -

This is not a forum-specific problem. The problem occurred during the deletion of course modules (resources and activities) by the new ajax interface.

course/rest.php was not calling the module cleanup function <modname>_delete_instance().

I've committed a fix in 1.7 and 1.8. Could you verify that it's working fine now, and if so, close the bug?

Show
Vy-Shane Sin Fat added a comment - This is not a forum-specific problem. The problem occurred during the deletion of course modules (resources and activities) by the new ajax interface. course/rest.php was not calling the module cleanup function <modname>_delete_instance(). I've committed a fix in 1.7 and 1.8. Could you verify that it's working fine now, and if so, close the bug?
Hide
Ken Wilson added a comment -

Confirm that the problem still exists (w2k3, mysql - not mssql, 1.7 and 1.8dev).

One observation: if the number of posts in the new forum settings is changed from the default of 5 items, then the news forum is not displayed on the student view, but the record is still in the mdl_forum table. When editing the course again as administrator, the forum re-appears (as expected given that the entry is still in the forum table). Looks like the database changes aren't being commited?

Show
Ken Wilson added a comment - Confirm that the problem still exists (w2k3, mysql - not mssql, 1.7 and 1.8dev). One observation: if the number of posts in the new forum settings is changed from the default of 5 items, then the news forum is not displayed on the student view, but the record is still in the mdl_forum table. When editing the course again as administrator, the forum re-appears (as expected given that the entry is still in the forum table). Looks like the database changes aren't being commited?
Hide
Ken Wilson added a comment -

Re-opening as it is still a problem. Any possibility of looking into this? Thanks.

Show
Ken Wilson added a comment - Re-opening as it is still a problem. Any possibility of looking into this? Thanks.
Hide
Vy-Shane Sin Fat added a comment -

Okay, we're reproduced the deleting problem on IE. I'm looking into this.

Ken, I couldn't reproduce the news forum problem. Could you give me a walkthrough?

Show
Vy-Shane Sin Fat added a comment - Okay, we're reproduced the deleting problem on IE. I'm looking into this. Ken, I couldn't reproduce the news forum problem. Could you give me a walkthrough?
Hide
Ken Wilson added a comment -

Walkthrough as follows:
Part 1

  • create new course CF101, topics format with defaults and administrator as teacher
  • delete the News Forum
  • turn editing off
  • News forum is listed (shown as deleted in Recent Activity block)
  • Turn editing on again to double-check and it is still there.
    Part 2
  • click on settings in CF101 course
  • change the number of news items to show to any number other than 5 (the default)
  • delete the News Forum
  • turn editing off and forum is still listed
  • switch to role to student and forum is still listed.
    So, I'm thinking that the changes aren't written to the database.
Show
Ken Wilson added a comment - Walkthrough as follows: Part 1
  • create new course CF101, topics format with defaults and administrator as teacher
  • delete the News Forum
  • turn editing off
  • News forum is listed (shown as deleted in Recent Activity block)
  • Turn editing on again to double-check and it is still there. Part 2
  • click on settings in CF101 course
  • change the number of news items to show to any number other than 5 (the default)
  • delete the News Forum
  • turn editing off and forum is still listed
  • switch to role to student and forum is still listed. So, I'm thinking that the changes aren't written to the database.
Hide
Vy-Shane Sin Fat added a comment -

Hi Ken,

Thanks for taking the time to spell out the steps. I've looked into this and news and social forums appear to be special. They are considered to be course forums, and will be (re)created automatically in the following situations:

  • Weekly course formats will create a news forum if none exists in the course.
  • Social course formats will create a social forum if none exists in the course.
  • The news_items block will create a news forum if none exists in the course where the block is present.

This behavior seems to be by design. It does pose a usability issue though, when some forums appear to be un-deletable.

Cheers,
Vy

Show
Vy-Shane Sin Fat added a comment - Hi Ken, Thanks for taking the time to spell out the steps. I've looked into this and news and social forums appear to be special. They are considered to be course forums, and will be (re)created automatically in the following situations:
  • Weekly course formats will create a news forum if none exists in the course.
  • Social course formats will create a social forum if none exists in the course.
  • The news_items block will create a news forum if none exists in the course where the block is present.
This behavior seems to be by design. It does pose a usability issue though, when some forums appear to be un-deletable. Cheers, Vy
Hide
Vy-Shane Sin Fat added a comment -

AJAX deletion of activities/resources with firefox seems to work right now, but not with IE. I'm working on a fix.

Show
Vy-Shane Sin Fat added a comment - AJAX deletion of activities/resources with firefox seems to work right now, but not with IE. I'm working on a fix.
Hide
Ken Wilson added a comment -

Vy - thanks for the info on the forums, everything is clear now . I'll await info on the AJAX problems with IE. Thanks. Ken.

Show
Ken Wilson added a comment - Vy - thanks for the info on the forums, everything is clear now . I'll await info on the AJAX problems with IE. Thanks. Ken.
Hide
Ken Wilson added a comment -

Vy - just a thought... is it possible that the automatically created news forums can not have the delete icon. This would clear the usability issue you mentioned.

Show
Ken Wilson added a comment - Vy - just a thought... is it possible that the automatically created news forums can not have the delete icon. This would clear the usability issue you mentioned.
Hide
dave k added a comment -

I had a similar problem where I created a quiz and a lesson to see what they were and then couldn't delete either activity (or the forum). I tried deleting directly from the database, but that didn't work.

The workaround is to turn off AJAX and then delete the block. That worked for me.

ps. I'm new to bugtracking, so let me know if I should open/close a report or where else this might go.

Show
dave k added a comment - I had a similar problem where I created a quiz and a lesson to see what they were and then couldn't delete either activity (or the forum). I tried deleting directly from the database, but that didn't work. The workaround is to turn off AJAX and then delete the block. That worked for me. ps. I'm new to bugtracking, so let me know if I should open/close a report or where else this might go.
Hide
Vy-Shane Sin Fat added a comment -

Ken, regarding not showing the delete button for the above cases. I've given it some thought. It would be very hard to implement this cleanly right now. And messy in code. The function that prints the buttons will have to be aware of different situations that are only very specific for the delete button. I think at this stage it's probably not worth hacking this in.

Show
Vy-Shane Sin Fat added a comment - Ken, regarding not showing the delete button for the above cases. I've given it some thought. It would be very hard to implement this cleanly right now. And messy in code. The function that prints the buttons will have to be aware of different situations that are only very specific for the delete button. I think at this stage it's probably not worth hacking this in.
Hide
Vy-Shane Sin Fat added a comment -

Let's track this one in MDL-8287 from now on.

Show
Vy-Shane Sin Fat added a comment - Let's track this one in MDL-8287 from now on.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: