Forum .LRN Q&A: Assessment CR clean up

Collapse
Posted by Raúl Morales Hidalgo on
Hi there,

We've been having problems backing up the content repository folder of our main site at UNED due to the absurdly huge number of files and directories (about 12 million) 93% of which are assessment 1 byte files.

This happens because by default content::item::new creates items with storage_type file, which automatically creates the empty file and the subsequent folders.

Another CR misuse we have found in assessment is a content::revision::new after almost all the content::item::new (which automatically creates a first revision) meaning more files and folder.

We're fixing the former problem by creating lob cr_items for all the as_whatever item types and the later by removing the unnecessary revisions and we would like to contribute it to the upcoming .LRN release.

Cheers,
Raúl

Collapse
2: Re: Assessment CR clean up (response to 1)
Posted by Dave Bauer on
I recommend text storage type.

You should be able to "upgrade" the existing items to the text storage type since no data is stored in the file/content field anyway.

The revisions are designed as a full audit trail for the assessment to see when it was changed and to track answers to each revision of a question etc.

So you need to consider that very carefully before changing it to make sure you get consistent data back out of it.

You could create items that are not content_revisions at all that are just stored in a custom table. There should be documentation for that in the acs-content-repository documentation but it might be more effort than it is worth. Removing the "file" storage type would probably help and be easier than rewriting every query in assessment.