ajax & course/rest.php in moodle 3.1

ajax & course/rest.php in moodle 3.1

by Hafriz Azhan -
Number of replies: 1

hi,

i'm upgrading from 2.8 to 3.1. after upgrading it seems that i have problem with ajax slow respond when deleting the resources. for example, when i delete resources and the click the turn editing off or clicking any other link the resources seems not deleted (but it is actually deleted as when i refresh the browser the file will be gone) and when on debugging it show undefine error.

after further check using mozilla debugging tools. when i delete resources, ajax will execute and send information to course/rest.php. The error happen while i click delete any resource and click to turn editing off/other link  before the rest.php returning 200 value (rest.php finish processing).

i'm not sure what is a problem as it seems in 3.1 rest.php processing taking longer than in 2.8 (after further checking, i have no problem before as the process in 2.8 very fast)

any one know how to solve the problem? or maybe if anyway that i can have a loading bar or anything when deleting resource so that can ensure rest.php can finish the process before user moving to other page / click turn editing off?


Thanks

Average of ratings: -
In reply to Hafriz Azhan

Re: ajax & course/rest.php in moodle 3.1

by Hafriz Azhan -
if possible, any one know how to add loading (like duplication) to deletion operation? then it can solve my problem