Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9
-
Fix Version/s: None
-
Component/s: Block: Catgrades
-
Labels:None
-
Environment:Developed on my LAMP system, should be universal
-
Database:Any
-
Affected Branches:MOODLE_19_STABLE
Description
Fairly ronseal really, it finds all uncategorised grades and puts them into categories for each month. It also sets aggregatesubcats=1 for the course categories so that the course total is not effected by the categorisation. It runs every 5 mins on cron, but will take quite a while first time (if you've got lots of uncategorised grades that is) but takes a negligable amount of time thereafter.
Attachments
Issue Links
| This issue will be resolved by: | ||||
| MDL-18397 | Local directory: Evaluate if we should process subdirectories of local |
|
|
|
Mike,
Sorry for the delayed response. I finally had a chance to look at your "block" which is really not intended to function as a block. I'm thinking this may be a good case to use the /local folder. More information about what all is possible using that is available at http://docs.moodle.org/en/Development:Local_customisation. In particular, check out toward the bottom regarding the use of /loca/cron.php which I think is really what you want. Of course there are caveats to using local so that is one option.
Another option is to leave it as a "block" and have it define it's own self_test function and avoid the check of the available formats (see attached file). I noticed this because when I went to the notifications page I received an error that self_test had failed. I saw that it was failing because there were no available formats since you had all set to false.
Having the cron.php in local would raise some other challenges about how to deal with such local code in CONTRIB. I want to check with the other developers to see how we ought best handle this one.
Peace - Anthony