Moodle
  1. Moodle
  2. MDL-10221

Can't delete course items with Ajax enabled

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.7, 1.9.3
    • Fix Version/s: 1.9.6
    • Component/s: AJAX and JavaScript
    • Labels:
      None
    • Environment:
      Windows 2003 Server IIS5, MySql 5.0.18, PHP 5.2.1
    • Database:
      MySQL
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      29380

      Description

      Having problems deleting course items with Ajax enabled.
      When I delete any item (resource or activity) with Ajax enabled the item disappears after the confirmation box. When the course page is reloaded the deleted item reappears.

      Disabling Ajax allows items to be deleted successfully.

      1. 20091028_mdl-10221.patch
        0.8 kB
        Rossiani Wijaya
      2. Ajax delete resource it reappears.doc
        267 kB
        Teresa Gibbison
      1. screenshot-1.jpg
        337 kB

        Issue Links

          Activity

          Hide
          A. T. Wyatt added a comment -

          Also happening to us!
          WIMP--XP server, IIS 6
          mysql 4.1.22
          php 5.1.2

          Turned ajax off for a while, sadly.

          Show
          A. T. Wyatt added a comment - Also happening to us! WIMP--XP server, IIS 6 mysql 4.1.22 php 5.1.2 Turned ajax off for a while, sadly.
          Hide
          James Marshall added a comment - - edited

          We are having this problem too. Although we are experiencing it using Moodle 1.7.2+ We haven't upgraded to 1.8 yet but if we do I will check and report back.

          Windows Server 2003
          IIS 6
          PHP 5.2.3
          MySQL 5.0.2
          Moodle 1.7.2+

          We are using IE6 and when AJAX is enabled dragging and dropping topics and deleting resources is very tempremental. It doesn't work more often than not.

          When deleting a resource you get a confirmation box (with a resource ID that is wrong) and the resource appears deleted. However when you refresh the page or turn the editing off the resource appears again.

          We have had to turn AJAX off which is a bummer - great feature

          James

          Show
          James Marshall added a comment - - edited We are having this problem too. Although we are experiencing it using Moodle 1.7.2+ We haven't upgraded to 1.8 yet but if we do I will check and report back. Windows Server 2003 IIS 6 PHP 5.2.3 MySQL 5.0.2 Moodle 1.7.2+ We are using IE6 and when AJAX is enabled dragging and dropping topics and deleting resources is very tempremental. It doesn't work more often than not. When deleting a resource you get a confirmation box (with a resource ID that is wrong) and the resource appears deleted. However when you refresh the page or turn the editing off the resource appears again. We have had to turn AJAX off which is a bummer - great feature James
          Hide
          Jeff Therrien added a comment - - edited

          I'm having this problem in the 1.9 Beta as well, with the same symptoms as the comments above.

          Show
          Jeff Therrien added a comment - - edited I'm having this problem in the 1.9 Beta as well, with the same symptoms as the comments above.
          Hide
          Sabine Aligé added a comment -

          We're having the same problem on 1.9 beta 2, Mandriva Linux 2007.1, mysql 5.0.35, apache 2.2.4,
          (my husband does NOT have the same problem on 1.8+, Mandriva Linux 2007.0, mysql 5.0.24, apache 2.2.3)

          Show
          Sabine Aligé added a comment - We're having the same problem on 1.9 beta 2, Mandriva Linux 2007.1, mysql 5.0.35, apache 2.2.4, (my husband does NOT have the same problem on 1.8+, Mandriva Linux 2007.0, mysql 5.0.24, apache 2.2.3)
          Hide
          Shawn Beattie added a comment -

          We were working fine under WIMP with a Moodle 1.8 install from around August 1st. We had upgraded from 1.6.3. Once we upgraded to the latest 1.8.3+ code this week, AJAX deleting stopped working. Perhaps that is a clue to the solution? I can pull files from the specific version that worked and swap them out if someone can direct me to the right file(s). Faculty loved AJAX for the one term we had it...

          Show
          Shawn Beattie added a comment - We were working fine under WIMP with a Moodle 1.8 install from around August 1st. We had upgraded from 1.6.3. Once we upgraded to the latest 1.8.3+ code this week, AJAX deleting stopped working. Perhaps that is a clue to the solution? I can pull files from the specific version that worked and swap them out if someone can direct me to the right file(s). Faculty loved AJAX for the one term we had it...
          Hide
          Dan Poltawski added a comment -

          Hi I just tried this out on the latest 1.9 beta and its gone, can you see if you still have the same issue?

          If it doesn't work what browser are you using and which version of php do you have?

          thanks

          Show
          Dan Poltawski added a comment - Hi I just tried this out on the latest 1.9 beta and its gone, can you see if you still have the same issue? If it doesn't work what browser are you using and which version of php do you have? thanks
          Hide
          Evan Kendall added a comment -

          Hi,

          I noticed this bug, where with Ajax enabled on course homepage, when I delete an assignment (the only thing I tested), it did not delete the entry. It did delete the assignment, rendering a textless icon that links to an assignment that cannot be found. Did I explain that okay?

          Moodle 1.9 Beta 3
          PHP 5.2.1
          MySQL 4.1.21 (or 22?)
          Apache 1.3.3
          Linux

          Browser: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071128 Iceweasel/2.0.0.11 (Debian-2.0.0.11-1)

          thanks

          Show
          Evan Kendall added a comment - Hi, I noticed this bug, where with Ajax enabled on course homepage, when I delete an assignment (the only thing I tested), it did not delete the entry. It did delete the assignment, rendering a textless icon that links to an assignment that cannot be found. Did I explain that okay? Moodle 1.9 Beta 3 PHP 5.2.1 MySQL 4.1.21 (or 22?) Apache 1.3.3 Linux Browser: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071128 Iceweasel/2.0.0.11 (Debian-2.0.0.11-1) thanks
          Hide
          Jon Cochran added a comment -

          Hi,

          I've also been bitten by this bug in Moodle 1.9 Beta 4.

          The interesting note here is, it works fine with our Firefox users. The bug only seems to affect IE users.

          Show
          Jon Cochran added a comment - Hi, I've also been bitten by this bug in Moodle 1.9 Beta 4. The interesting note here is, it works fine with our Firefox users. The bug only seems to affect IE users.
          Hide
          Marty Gilbert added a comment -

          Our users, both IE and Firefox alike, experience this issue.

          --Marty

          Show
          Marty Gilbert added a comment - Our users, both IE and Firefox alike, experience this issue. --Marty
          Hide
          P P added a comment -

          Same here with firefox

          Linux
          Apache 2.2.10
          MySql 5.0.5
          PHP 5.2.6
          Moodle 1.9.2

          Tested on both Windows Vista and Ubuntu GNU/Linux machines (amd64) with Firefox 3.0.5

          Show
          P P added a comment - Same here with firefox Linux Apache 2.2.10 MySql 5.0.5 PHP 5.2.6 Moodle 1.9.2 Tested on both Windows Vista and Ubuntu GNU/Linux machines (amd64) with Firefox 3.0.5
          Hide
          Mike Tilley added a comment -

          We have the same issue with version 1.9.3+(build 20090107)

          windows 2003 server
          iis6 using fast cgi for php
          php 5.2.8
          mssql 2005

          issues in both IE7 and Firefox

          it would be nice if this could be fixed or at leat a way of fixing it distributed because our teachers really like the functionality and ease of use when editing their courses with ajax enabled but we are going to have to disable it until this is resolved.

          Show
          Mike Tilley added a comment - We have the same issue with version 1.9.3+(build 20090107) windows 2003 server iis6 using fast cgi for php php 5.2.8 mssql 2005 issues in both IE7 and Firefox it would be nice if this could be fixed or at leat a way of fixing it distributed because our teachers really like the functionality and ease of use when editing their courses with ajax enabled but we are going to have to disable it until this is resolved.
          Hide
          Nicolas Connault added a comment -

          It would be nice if it could be reproduced! The reports here almost all show different server specs and different moodle versions, and none of the ones I've tried have displayed this bug. Maybe you could give us more information:

          1. Does it happen in all your courses?
          2. What language do you use?
          3. What theme do you use?
          4. Any extra information you feel would be useful?

          Show
          Nicolas Connault added a comment - It would be nice if it could be reproduced! The reports here almost all show different server specs and different moodle versions, and none of the ones I've tried have displayed this bug. Maybe you could give us more information: 1. Does it happen in all your courses? 2. What language do you use? 3. What theme do you use? 4. Any extra information you feel would be useful?
          Hide
          Mike Tilley added a comment -

          We usually use a custom theme based on the formal white one. I have swapped to the standard theme on our test server (IIS 6, php 5.2.8, moodle 1.9.3+(build 20090107) which is the same spec as our live server. The error happens on every course including a course i just created. If i turn debugging on in ie i get the attached error.

          I hope this helps in some way.

          Mike

          Show
          Mike Tilley added a comment - We usually use a custom theme based on the formal white one. I have swapped to the standard theme on our test server (IIS 6, php 5.2.8, moodle 1.9.3+(build 20090107) which is the same spec as our live server. The error happens on every course including a course i just created. If i turn debugging on in ie i get the attached error. I hope this helps in some way. Mike
          Hide
          Mike Tilley added a comment -

          Sorry - forgot to mention that I have attached a screenshot of the error.

          Mike

          Show
          Mike Tilley added a comment - Sorry - forgot to mention that I have attached a screenshot of the error. Mike
          Hide
          Mike Tilley added a comment -

          Weird...

          I've just tested for this issue at home (local machine running xamp php version 5.2.6) and the items delete fine. I am using a different build at home though (1.93+ build 20081119 and 1.9.3 build 20090114) I will try these versions on our test server at work in the morning and post my findings.

          Hope this helps

          Show
          Mike Tilley added a comment - Weird... I've just tested for this issue at home (local machine running xamp php version 5.2.6) and the items delete fine. I am using a different build at home though (1.93+ build 20081119 and 1.9.3 build 20090114) I will try these versions on our test server at work in the morning and post my findings. Hope this helps
          Hide
          Lawrence Eric Meyer added a comment -

          Yep this issue spawned twice now in my site (1.9.2 I believe)

          I created a class for a professor and was demoing how to add and remove items. Deletion failed to "stick". You could delete the item. but on refresh it failed to stay deleted. I deleted the course and recreated it - no problems with that one now.

          Today a course that had been working has stopped. In IE you can't move via AJAX at all. Dragging and dropping an item causes it to disappear, and the move right and left arrow will move items only until the next screen refresh. In Firefox (v 2.0.02) the arrows will work, but dragging an item causes it to disappear, and the "move" sprite to stay on the screen (almost as if it hooked the item and then forgot how to let go?)

          My other courses are working fine. No sitewide changes have occurred recently, and it is happening on only one of 6 classes.

          If someone wants more detailed information send me an email: lmeyerjr "at" mdc "dot" edu and we'll see what we can find 8)

          Show
          Lawrence Eric Meyer added a comment - Yep this issue spawned twice now in my site (1.9.2 I believe) I created a class for a professor and was demoing how to add and remove items. Deletion failed to "stick". You could delete the item. but on refresh it failed to stay deleted. I deleted the course and recreated it - no problems with that one now. Today a course that had been working has stopped. In IE you can't move via AJAX at all. Dragging and dropping an item causes it to disappear, and the move right and left arrow will move items only until the next screen refresh. In Firefox (v 2.0.02) the arrows will work, but dragging an item causes it to disappear, and the "move" sprite to stay on the screen (almost as if it hooked the item and then forgot how to let go?) My other courses are working fine. No sitewide changes have occurred recently, and it is happening on only one of 6 classes. If someone wants more detailed information send me an email: lmeyerjr "at" mdc "dot" edu and we'll see what we can find 8)
          Hide
          Matthew N added a comment -

          I transitioned between servers with different LAMP setups and encountered this problem today using 1.9.4 (Build 20090128). My solution will work for those people who get an entry in their error log when an item is deleted stating:
          client denied by server configuration: /path/to/moodle/course/rest.php
          as in MDL-17745.

          The default policy in the new apache configuration (provided by the control panel) was to only accept the GET, POST, OPTIONS, & PROPFIND methods. The issue is that Moodle uses the 'DELETE' method and so I had to modify my apache configuration to allow the DELETE method so that the section now looks like this:

          <LimitExcept GET POST OPTIONS PROPFIND DELETE>
          Order deny,allow
          Deny from all
          </LimitExcept>

          Since this seems to be a common issue with the number of votes and watchers, maybe Moodle should not use the DELETE method and instead use POST for deletions with a query parameter to specify the action to take?

          Show
          Matthew N added a comment - I transitioned between servers with different LAMP setups and encountered this problem today using 1.9.4 (Build 20090128). My solution will work for those people who get an entry in their error log when an item is deleted stating: client denied by server configuration: /path/to/moodle/course/rest.php as in MDL-17745 . The default policy in the new apache configuration (provided by the control panel) was to only accept the GET, POST, OPTIONS, & PROPFIND methods. The issue is that Moodle uses the 'DELETE' method and so I had to modify my apache configuration to allow the DELETE method so that the section now looks like this: <LimitExcept GET POST OPTIONS PROPFIND DELETE> Order deny,allow Deny from all </LimitExcept> Since this seems to be a common issue with the number of votes and watchers, maybe Moodle should not use the DELETE method and instead use POST for deletions with a query parameter to specify the action to take?
          Hide
          Petr Škoda added a comment -

          we are very close to release, this will have to wait a bit, sorry

          Show
          Petr Škoda added a comment - we are very close to release, this will have to wait a bit, sorry
          Hide
          James Rudd added a comment -

          Thanks Matthew, I added the following to my Moodle directory in Apache conf and it fixed the problem.

          <Limit GET POST OPTIONS PROPFIND DELETE>
          Order allow,deny
          Allow from all
          </Limit>
          <LimitExcept GET POST OPTIONS PROPFIND DELETE>
          Order deny,allow
          Deny from all
          </LimitExcept>

          Show
          James Rudd added a comment - Thanks Matthew, I added the following to my Moodle directory in Apache conf and it fixed the problem. <Limit GET POST OPTIONS PROPFIND DELETE> Order allow,deny Allow from all </Limit> <LimitExcept GET POST OPTIONS PROPFIND DELETE> Order deny,allow Deny from all </LimitExcept>
          Hide
          Jose Cedeno added a comment -

          I was hoping to provide a patch for this bug, but I could not reproduce it using MAMP with Firefox or IE7. Is this bug still around in the latest stable for the people who were able to reproduce it?

          Show
          Jose Cedeno added a comment - I was hoping to provide a patch for this bug, but I could not reproduce it using MAMP with Firefox or IE7. Is this bug still around in the latest stable for the people who were able to reproduce it?
          Hide
          Teresa Gibbison added a comment -

          I am still having this problem with Moodle 1.9.4+ (Build: 20090505). I am not getting this error message displayed in the screenshot but when I delete an item with Ajax enabled it reappears after refreshing the page.

          Show
          Teresa Gibbison added a comment - I am still having this problem with Moodle 1.9.4+ (Build: 20090505). I am not getting this error message displayed in the screenshot but when I delete an item with Ajax enabled it reappears after refreshing the page.
          Hide
          Teresa Gibbison added a comment -

          Just to confirm my above report I have tried this in Firefox 3.0.10 and IE 7.0.5730.11 T

          Show
          Teresa Gibbison added a comment - Just to confirm my above report I have tried this in Firefox 3.0.10 and IE 7.0.5730.11 T
          Hide
          Jose Cedeno added a comment -

          I agree with with Nicolas Connault's comment above. There are many comments in this bug, but people have various server setups, moodle versions and some mention that they are using other themes.

          I still cannot reproduce the bug. Could somebody who is able to reproduce the bug enable debugging in their site? What messages do you get in the pop-up log reader?

          Show
          Jose Cedeno added a comment - I agree with with Nicolas Connault's comment above. There are many comments in this bug, but people have various server setups, moodle versions and some mention that they are using other themes. I still cannot reproduce the bug. Could somebody who is able to reproduce the bug enable debugging in their site? What messages do you get in the pop-up log reader?
          Hide
          Teresa Gibbison added a comment -

          I'm using Moodle 1.9.4+ (Build: 20090310) with PostgreSQL & PHP Version 5.1.6
          Attached is a doc with screenshots and the output of the logger with regard to item reappearing...
          Interestingly enough this is happening on my development site that I use for themes but not on our test production site (which has the same git branch and PHP Info...)
          I hope the attached is helpful for you.
          Teresa

          Show
          Teresa Gibbison added a comment - I'm using Moodle 1.9.4+ (Build: 20090310) with PostgreSQL & PHP Version 5.1.6 Attached is a doc with screenshots and the output of the logger with regard to item reappearing... Interestingly enough this is happening on my development site that I use for themes but not on our test production site (which has the same git branch and PHP Info...) I hope the attached is helpful for you. Teresa
          Hide
          Martín Langhoff added a comment -

          Teresa, I seem to recall the Wintec site has its code hosted in GIT. Is the code available anywhere? Is it managed by Catalyst? I'm mentoring Jose and hoping he can get his hands on the code you're running to debug the problem.

          As he mentions, it fairly likely that some interaction with the theme or some other customisation is the problem.

          Show
          Martín Langhoff added a comment - Teresa, I seem to recall the Wintec site has its code hosted in GIT. Is the code available anywhere? Is it managed by Catalyst? I'm mentoring Jose and hoping he can get his hands on the code you're running to debug the problem. As he mentions, it fairly likely that some interaction with the theme or some other customisation is the problem.
          Hide
          Teresa Gibbison added a comment -

          Hi Martin
          (I'm at Waikato Uni now!) Yes Waikato uses GIT. Catalyst has a copy of our branch however as mentioned above this error is happening on my development site not our test production so I'm not sure it would help.
          I can say that my dev site "Moodle debug - YUI Log Console is spitting out this:

          Dev site - resource reappears:
          Making DELETE connection to /course/rest.php?courseId=3&class=resource&id=35

          mdltest - resources does not reappear:
          Making DELETE connection to /course/rest.php?courseId=2185&class=resource&id=64490
          INFO 147332ms (+107) 11:04:37 a.m.:
          global
          Response from the Request: OK:

          Show
          Teresa Gibbison added a comment - Hi Martin (I'm at Waikato Uni now!) Yes Waikato uses GIT. Catalyst has a copy of our branch however as mentioned above this error is happening on my development site not our test production so I'm not sure it would help. I can say that my dev site "Moodle debug - YUI Log Console is spitting out this: Dev site - resource reappears: Making DELETE connection to /course/rest.php?courseId=3&class=resource&id=35 mdltest - resources does not reappear: Making DELETE connection to /course/rest.php?courseId=2185&class=resource&id=64490 INFO 147332ms (+107) 11:04:37 a.m.: global Response from the Request: OK:
          Hide
          Dean Stringer added a comment -

          Martin, turns out the problem Teresa mentioned on our development machine is related to the httpd.conf "LimitExcept" issue (as mentioned by Mathew above)

          Show
          Dean Stringer added a comment - Martin, turns out the problem Teresa mentioned on our development machine is related to the httpd.conf "LimitExcept" issue (as mentioned by Mathew above)
          Hide
          Matt Clarkson added a comment -

          I have been dealing with this bug on an IIS server running PHP under fastcgi.

          The problem was that fastcgi was only configured to handle GET, HEAD,POST requests adding DELETE to this list fixed the problem.

          Show
          Matt Clarkson added a comment - I have been dealing with this bug on an IIS server running PHP under fastcgi. The problem was that fastcgi was only configured to handle GET, HEAD,POST requests adding DELETE to this list fixed the problem.
          Hide
          Bob Moffitt added a comment -

          Happening to us as well:
          IIS6
          PHP5.2
          SQL5
          Moodle1.82

          (Descripton)
          A faculty member is having an issue deleting a resource. When he goes in and turns on editing, and then tries to delete a resource, it looks like the resource deleted from the screen, but when he does a refresh the resource appears again. We found out that if we have the "Ajax and Javascript" turned on (We have this turned on so he can delete multiple resources on one screen) he cannot delete the resource. If he turns Ajax off, he can delete the resource with no problem.

          Show
          Bob Moffitt added a comment - Happening to us as well: IIS6 PHP5.2 SQL5 Moodle1.82 (Descripton) A faculty member is having an issue deleting a resource. When he goes in and turns on editing, and then tries to delete a resource, it looks like the resource deleted from the screen, but when he does a refresh the resource appears again. We found out that if we have the "Ajax and Javascript" turned on (We have this turned on so he can delete multiple resources on one screen) he cannot delete the resource. If he turns Ajax off, he can delete the resource with no problem.
          Hide
          Nathan added a comment -

          This was happening to us too in the following environment:

          Windows Server 2008 Standard - SP2
          IIS7
          PHP 5.2.10 (PHP via FastCGI)
          MySQL 5
          Moodle 1.9.5+ (Build: 20090819)

          We were getting 405 Error Codes when trying to delete a course file using AJAX - due to the DELETE HTTP Method verb not being allowed on our server.
          I enabled the DELETE method (Using IIS Server Manager > Handler Mappings > PHP_via_FastCGI > Edit > Request Restrictions... > adding DELETE to "One of the following verbs" input box) but when I did it would delete the 'rest.php' file the AJAX delete function points to, so I disabled the DELETE method and used the following fix instead:

          I was able to fix this bug by modifying two files: section_classes.js, rest.php

          1. section_classes.js (/moodle/lib/ajax/section_classes.js)
          ------------------------------------------------------------------------------
          CHANGE THIS (line 837 - in mine):
          main.connect('DELETE', 'class=resource&id='+this.id);

          TO THIS:
          main.connect('POST', 'class=resource&action=DELETE&id='+this.id);

          2. rest.php (/moodle/course/rest.php)
          --------------------------------------------------

          • Add a new optional parameter to the top of the page - underneath the other variable assignments (line 23)

          $page_action = optional_param('action', '', PARAM_ALPHA);

          • Edit the $_SERVER['REQUEST_METHOD'] switch (line 52)

          CHANGE THIS:
          switch($_SERVER['REQUEST_METHOD']) {

          TO THIS:
          $req_method = ($page_action == 'DELETE') ? 'DELETE' : $_SERVER['REQUEST_METHOD'];
          switch($req_method) {

          Hope this is of help to someone.

          Reproducing this error
          -----------------------------------------------------------
          1. Does it happen in all your courses? - yes
          2. What language do you use? - English
          3. What theme do you use? - Custom theme (based on liip)
          4. Any extra information you feel would be useful? - see above

          Show
          Nathan added a comment - This was happening to us too in the following environment: Windows Server 2008 Standard - SP2 IIS7 PHP 5.2.10 (PHP via FastCGI) MySQL 5 Moodle 1.9.5+ (Build: 20090819) We were getting 405 Error Codes when trying to delete a course file using AJAX - due to the DELETE HTTP Method verb not being allowed on our server. I enabled the DELETE method (Using IIS Server Manager > Handler Mappings > PHP_via_FastCGI > Edit > Request Restrictions... > adding DELETE to "One of the following verbs" input box) but when I did it would delete the 'rest.php' file the AJAX delete function points to, so I disabled the DELETE method and used the following fix instead: I was able to fix this bug by modifying two files: section_classes.js, rest.php 1. section_classes.js (/moodle/lib/ajax/section_classes.js) ------------------------------------------------------------------------------ CHANGE THIS (line 837 - in mine): main.connect('DELETE', 'class=resource&id='+this.id); TO THIS: main.connect('POST', 'class=resource&action=DELETE&id='+this.id); 2. rest.php (/moodle/course/rest.php) -------------------------------------------------- Add a new optional parameter to the top of the page - underneath the other variable assignments (line 23) $page_action = optional_param('action', '', PARAM_ALPHA); Edit the $_SERVER ['REQUEST_METHOD'] switch (line 52) CHANGE THIS: switch($_SERVER ['REQUEST_METHOD'] ) { TO THIS: $req_method = ($page_action == 'DELETE') ? 'DELETE' : $_SERVER ['REQUEST_METHOD'] ; switch($req_method) { Hope this is of help to someone. Reproducing this error ----------------------------------------------------------- 1. Does it happen in all your courses? - yes 2. What language do you use? - English 3. What theme do you use? - Custom theme (based on liip) 4. Any extra information you feel would be useful? - see above
          Hide
          Nicolas Connault added a comment -

          Thanks all for your help in debugging this annoyingly persistent bug! And thanks Nathan for your suggested fix, which I used to fix not only course deletion but also block deletion, which was also using the DELETE method.

          Show
          Nicolas Connault added a comment - Thanks all for your help in debugging this annoyingly persistent bug! And thanks Nathan for your suggested fix, which I used to fix not only course deletion but also block deletion, which was also using the DELETE method.
          Hide
          Rossiani Wijaya added a comment -

          Nathan's revision work for me too. I'm using version 1.9.5

          I'm creating a patch based on his suggestion for rest.php file. As for my section_classes.js (/moodle/lib/ajax/section_classes.js) file, i don't have to change anything.

          Thanks!

          Rosie

          Show
          Rossiani Wijaya added a comment - Nathan's revision work for me too. I'm using version 1.9.5 I'm creating a patch based on his suggestion for rest.php file. As for my section_classes.js (/moodle/lib/ajax/section_classes.js) file, i don't have to change anything. Thanks! Rosie
          Hide
          Martin Dougiamas added a comment -

          Thanks Rosie, can you please check that in to head?

          Show
          Martin Dougiamas added a comment - Thanks Rosie, can you please check that in to head?
          Hide
          Rossiani Wijaya added a comment -

          The bug is not effected HEAD.

          I only committed to 1.9

          Show
          Rossiani Wijaya added a comment - The bug is not effected HEAD. I only committed to 1.9
          Hide
          Matthew Davidson added a comment -

          Running the latest 1.9. Updated this morning. Still can't use AJAX delete button.

          Show
          Matthew Davidson added a comment - Running the latest 1.9. Updated this morning. Still can't use AJAX delete button.
          Hide
          Ryan Smith added a comment -

          I updated our installation with the new lib/ajax/ajaxcourse.js and lib/ajax/ajaxlib.php and now items no longer delete in the course. Once you delete something it disappears, but when you turn editing off the item appears again.

          Show
          Ryan Smith added a comment - I updated our installation with the new lib/ajax/ajaxcourse.js and lib/ajax/ajaxlib.php and now items no longer delete in the course. Once you delete something it disappears, but when you turn editing off the item appears again.
          Hide
          Anthony Borrow added a comment -

          Nicolas - Ryan was good enough to comment on MDL-10142 so I confirmed the behavior and am still observing the "fake delete" on my test system. Let me know how I can help track this down. Peace - Anthony

          Show
          Anthony Borrow added a comment - Nicolas - Ryan was good enough to comment on MDL-10142 so I confirmed the behavior and am still observing the "fake delete" on my test system. Let me know how I can help track this down. Peace - Anthony
          Hide
          Rossiani Wijaya added a comment -

          Thank you for testing the bug.

          I had files conflict when updated my files to cvs last friday and commiting the wrong version of the file.

          anyways, I re-commited rest.php to 1.9_stable. Please give it a try and let me know if you have more question.

          Thank you
          Rosie

          Show
          Rossiani Wijaya added a comment - Thank you for testing the bug. I had files conflict when updated my files to cvs last friday and commiting the wrong version of the file. anyways, I re-commited rest.php to 1.9_stable. Please give it a try and let me know if you have more question. Thank you Rosie
          Hide
          Ryan Smith added a comment -

          It works correctly now! Thanks!

          Show
          Ryan Smith added a comment - It works correctly now! Thanks!
          Hide
          Ryan Smith added a comment -

          Cancel that, now when I try to drag blocks and drop them to a new location, they move, but when you turn editing off they move back to their original positions.

          Show
          Ryan Smith added a comment - Cancel that, now when I try to drag blocks and drop them to a new location, they move, but when you turn editing off they move back to their original positions.
          Hide
          Rossiani Wijaya added a comment -

          Hi Ryan - are you trying to move the blocks on the left and right of the page? if it is, please refer to MDL-11131 for solutions.

          thanks
          Rosie

          Show
          Rossiani Wijaya added a comment - Hi Ryan - are you trying to move the blocks on the left and right of the page? if it is, please refer to MDL-11131 for solutions. thanks Rosie
          Hide
          Andrew Davis added a comment -

          Closing this issue as it seems to be working correctly now. If you are experiencing other possibly related issues its probably best to open or add to another more specific issue report

          Show
          Andrew Davis added a comment - Closing this issue as it seems to be working correctly now. If you are experiencing other possibly related issues its probably best to open or add to another more specific issue report
          Hide
          Glenys Hanson added a comment -

          This problem has come back in 1.9.9

          "Having problems deleting course items with Ajax enabled.
          When I delete any item (resource or activity) with Ajax enabled the item disappears after the confirmation box. When the course page is reloaded the deleted item reappears.

          Disabling Ajax allows items to be deleted successfully."

          Also "when I try to drag blocks and drop them to a new location, they move, but when you turn editing off they move back to their original positions."

          Show
          Glenys Hanson added a comment - This problem has come back in 1.9.9 "Having problems deleting course items with Ajax enabled. When I delete any item (resource or activity) with Ajax enabled the item disappears after the confirmation box. When the course page is reloaded the deleted item reappears. Disabling Ajax allows items to be deleted successfully." Also "when I try to drag blocks and drop them to a new location, they move, but when you turn editing off they move back to their original positions."

            Dates

            • Created:
              Updated:
              Resolved: