Deleted gradebook item still visible with error after deletion

Deleted gradebook item still visible with error after deletion

by Marcus Phelan -
Number of replies: 29

I'm running Moodle 3.2 and have deleted some assignments from one of my modules. In the gradebook setup I get the following error:

Warning: Activity deletion in progress! Some grades are about to be removed.

Also I can't delete the item from the list of activities.

Ant idea why this is the case and how can I delete these from the setup page and remove this error message?

Many thanks.

========================================

I found the solution, I though my updated cron hadn't worked (but it just hadn't run) and running this cleared the error and removed the entries.

Attachment Screen Shot 2017-01-07 at 17.06.36.png
Average of ratings: Useful (1)
In reply to Marcus Phelan

Re: Deleted gradebook item still visible with error after deletion

by Colin Fraser -
Picture of Documentation writers Picture of Testers

AFAIK, I think the error is generated when the course itself has not been reset, but that is based on an incident from about v2.2, which may or may not be at all relevant to your situation. Did you reset the course before trying to delete the gradebook items? Or did you try to delete the course and gradebook items at the same time? 

Also, I understand the grades recorded remain with the student who undertook the exam, just the exam itself is removed. 

But it is a good pickup, working through the cron, good advice.  

In reply to Colin Fraser

ตอบ: Re: Deleted gradebook item still visible with error after deletion

by pattama Mi -

Could you please tell me. How to remove step-by-step.
I have the same problem. I'm running Moodle 3.2.2+ (Build: 20170503)


thank you!

In reply to pattama Mi

Re: ตอบ: Re: Deleted gradebook item still visible with error after deletion

by Luciana Marins -


Good afternoon 


I just saw your post on "Warning: Activity is being deleted! Some notes are about to be removed." 

So I decided to get in touch to see if you have already solved the problem, because I am facing this same problem. 

I've run CRON, but the problem persists.

I wonder if for you this one to run the CRON worked or you had to do something else. 


 Thank you!

In reply to Marcus Phelan

Re: Deleted gradebook item still visible with error after deletion

by darrel espino -

what is cron? can you please provide the step-by-step procedure to remove the said activity. i have the same problem. thankyou!

In reply to darrel espino

Re: Deleted gradebook item still visible with error after deletion

by Joel Kerth -

Simply type: http://your.site.moodle/admin/cron.php

you'll have to let it do it's job for a little while...

Et Voilà!

Refresh your gradebook page and that should be all!

best regards!

Joel

Average of ratings: Useful (1)
In reply to Joel Kerth

Re: Deleted gradebook item still visible with error after deletion

by sheik Ibrahim -

Hi joel

After running the cron still the Warning message deletion in progress appears  can you help

In reply to sheik Ibrahim

Re: Deleted gradebook item still visible with error after deletion

by Rose Andrade -
I have the same problem, the message still appears after running cron in the server. Can someone help?
In reply to Marcus Phelan

Re: Deleted gradebook item still visible with error after deletion

by Vasco Tavares -

Even after running Cron this issue isn't fixed, is there any more hints on how to get rid of

"Warning: Activity deletion in progress! Some grades are about to be removed."?
Using Moodle 3.3

Attachment Capture.JPG
In reply to Vasco Tavares

Re: Deleted gradebook item still visible with error after deletion

by Salvador Orozco Maciel -

In my case, the problem was an external plugin that prevented the process cron.php from being executed completely. I solved it by uninstalling that plugin and then execute the process cron.php manually to make sure it runs correctly until it completes. I hope this will help you. Greetings from Mexico

Average of ratings: Useful (1)
In reply to Salvador Orozco Maciel

Re: Deleted gradebook item still visible with error after deletion

by Vasco Tavares -

Thanks Salvador for your reply. The issue got fixed.

Br,

Vasco

In reply to Salvador Orozco Maciel

Re: Deleted gradebook item still visible with error after deletion

by William Castiblanco -

Salvador, ¿cuál fue el plugin que desinstalaste para que te funcionara?, pues tengo el mismo problema.

In reply to William Castiblanco

Re: Deleted gradebook item still visible with error after deletion

by Salvador Orozco Maciel -

Hola William,


Este fue el plugin que me dió problemas https://moodle.org/plugins/mod_zoom

De cualquier manera, te recomiendo que revises detalladamente el cron.php cuando lo ejecutes para ver si se terminó de ejecutar correctamente, eso te puede dar más pistas para resolver el problema.


Espero te sirva.


Saludos.

In reply to Salvador Orozco Maciel

Re: Deleted gradebook item still visible with error after deletion

by Lewis Carr -

I can also confirm that deleted activities won't be updated in the gradebook until cron has run successfully.

Cron definitely fixes this issue.  

In reply to Salvador Orozco Maciel

Re: Deleted gradebook item still visible with error after deletion

by Eric Lin -

How do you run cron manually? When I use the browser-based guidance, I get 

"!!! Sorry, internet access to this page has been disabled by the administrator. !!!"

or "Command line scripts can not be executed from the web interface".

It seems like I have the same problem, but not I"m trying to figure out how to run cron manually. I have this hosted by third party - siteground.com.

moodle 3.4


thanks!

In reply to Eric Lin

Re: Deleted gradebook item still visible with error after deletion

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Eric,

It sounds as though the setting 'Cron execution via command line only' in the Site administration is enabled for your site. Can you try disabling it?

In reply to Marcus Phelan

Re: Deleted gradebook item still visible with error after deletion

by David Nawrocki -
This worked for me.  I had a Zoom plugin that kept posting items to a recycle bin in one of my courses.  Essentially I think it was creating so many instances of itself and deleting them that it clogged up my cron.  After deleting the Zoom plugin, which I didn't need anyway, everything started working and after a few minutes the Activity Deletion notices went away.  Hope this helps. 
Average of ratings: Useful (1)
In reply to David Nawrocki

Re: Deleted gradebook item still visible with error after deletion

by Betsy Springer -

How did you determine which  plugin was the problem? 

Average of ratings: Useful (2)
In reply to Marcus Phelan

Atbilde: Deleted gradebook item still visible with error after deletion

by Ilona Daģe -

Still have that problem, some ideas? cron.php is executing every hour but it don't help. we have Moodle 3.5.2+

In reply to Ilona Daģe

Re: Atbilde: Deleted gradebook item still visible with error after deletion

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Ilona, cron needs to run every minute, not every hour, as mentioned in the documentation Cron.

Average of ratings: Useful (1)
In reply to Ilona Daģe

Re: Atbilde: Deleted gradebook item still visible with error after deletion

by Kim Solis -

I found out that my cron was in fact not running as I though. When I open the notificaciones, I am told that cron has not been run for more than 24 hrs. It seems my cron job stalls because of a language pack conflict that I haven’t been able to solve, but that is a another forum! 


Long story short:  I have to manually update my language packs and then manually run my cron job (clicking on the notificacion about the cron problem) and then voila! The issue of the grade book item is solved!  


It still happens periodically and I go through the process each time. Works for other cron related problems too! 


Average of ratings: Useful (2)
In reply to Ilona Daģe

Atbilde: Deleted gradebook item still visible with error after deletion

by Ilona Daģe -

We executed script every hour from web-server https://server/admin/cron.php, possibly interrupted after 5 minutes timeout. As a result, never finished his work, now we execute command-line CLI script “php/moodle/admin/cli/cron.php” who worked more than 1 hour and all problems solved!

Average of ratings: Useful (2)
In reply to Ilona Daģe

Re: Atbilde: Deleted gradebook item still visible with error after deletion [Solved]

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Kim and Ilona, good to hear that the problem is solved. Thanks for posting your solutions. smile

In reply to Helen Foster

Re: Atbilde: Deleted gradebook item still visible with error after deletion [Solved]

by Brian Pool -

Helen,

We are having the same issue.  I think I need to know where to look to see what is causing our issue. 

  • Moodle 3.5+
  • Ubunti 16.04
  • Cron runs via CLI every minute
  • I have purged the cache.
  • AD_HOC currently has 86 items. 
If I can find the issue I really need to fix it.  I did try backing up and restoring all the courses listed in the AD_HOC file as one post from 2017 suggested.  It did not fix the issue, but the restore lost all the grade items and categories. 

If someone could tell me where a log file might show the failure, that would be great.

Brian
In reply to Marcus Phelan

Re: Deleted gradebook item still visible with error after deletion

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Just a note for anybody experiencing this....

Module deletion is an example of an 'adhoc task'. These are tasks that are simply set up to run by the cron and the next possible opportunity. They will run *last* after everything else has run in the cron. They do not appear in the list of scheduled tasks in the admin settings (as they are "one off" tasks). 

The problem comes if the task fails. If the task throws an exception it will be re-queued but with a delay. The delay gets longer on each failure up to a day. So, if something is going wrong the task will quite quickly retry once a day. You are unlikely to spot this. 

If you run out of ideas and suspect this, check the take mdl_task_adhoc. Check for instances of '\core_course\task\course_delete_modules' with high 'faildelays'. 

In reply to Howard Miller

Re: Deleted gradebook item still visible with error after deletion

by Jerry Lau -

all my faildelays are 0 .. have 439 of them...

can i just delete them all and start fresh by just running the cron again?

In reply to Howard Miller

Re: Deleted gradebook item still visible with error after deletion

by Jerry Lau -

can we just delete them as one has a faildelay of 86,400, 120, and 60 respectively... the rest are all 0 (zeros).. this is the bottleneck I think

In reply to Jerry Lau

Re: Deleted gradebook item still visible with error after deletion

by Paul Lindgreen -
Picture of Particularly helpful Moodlers

did you delete those with fail delay 86400 and did your bottleneck get removed?

any downside to removing those with faildelay of 86400?

In reply to Marcus Phelan

Re: Deleted gradebook item still visible with error after deletion

by saeid e -

I have this problem too.


I added moodle cron to cpanel cronjob section and checked for mod_zoom plugin. but I didn't have this plugin.

this is list of my plugins in mod directory:



can someone help me ?