Stash

Add an inventory of items to your course and let your students find items by exploring the activities. #game #gamification
Price option: Free

Supports Moodle 2.9-5.2 See all versions
Latest release: 1 month ago
Installations: 2059
Downloads (last 90 days): 532

Frankenstyle name: block_stash
Blocks
Stash, Gamification

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Adrian, there is no column called 'courseid' or anything like that in the mdl_block_stash_items table. There is a courseid column in mdl_block_stash but it doesn't appear in any other stash tables.
I am not a developer but isn't the problem that the query is asking for a column that doesn't exist - not that there is a column that shouldn't be there?
Hell Brian, Do you have access to the database? If so then go to mdl_block_stash_items and delete the courseid column. I don't know how this column got created on your installation. Please let me know if this worked for you.
Thanks,
Hello,
I have been trying to install the Stash block plugin for a couple of weeks now but I keep getting an error. This morning I upgraded to the latest version of moodle hoping that the problem would go away, but it did not. The course where I added an instance of the block is completely inaccessible right now. i can fix this only by uninstalling Stash.
Any help would be appreciated.
Here is the debug output:
Error
Error reading from database
Debug info: Unknown column 'i.courseid' in 'field list'
SELECT i.id AS itemid, i.courseid AS itemcourseid, i.name AS itemname, i.timecreated AS itemtimecreated, i.timemodified AS itemtimemodified, ui.id AS useritemid, ui.courseid AS useritemcourseid, ui.name AS useritemname, ui.timecreated AS useritemtimecreated, ui.timemodified AS useritemtimemodified
FROM mdl_block_stash_user_items ui
JOIN mdl_block_stash_items i
ON i.id = ui.itemid
WHERE ui.userid = ?
AND i.stashid = ? AND ui.quantity IS NOT NULL
[array (
0 => '2',
1 => '1',
)]
Error code: dmlreadexception
Stack trace:
line 494 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
line 1217 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
line 100 of /blocks/stash/classes/user_item.php: call to mysqli_native_moodle_database->get_recordset_sql()
line 522 of /blocks/stash/classes/manager.php: call to block_stash\user_item::get_all_in_stash()
line 53 of /blocks/stash/classes/output/block_content.php: call to block_stash\manager->get_all_user_items_in_stash()
line 180 of /blocks/stash/classes/output/renderer.php: call to block_stash\output\block_content->export_for_template()
line 491 of /lib/outputrenderers.php: call to block_stash\output\renderer->render_block_content()
line 71 of /blocks/stash/block_stash.php: call to plugin_renderer_base->render()
line 337 of /blocks/moodleblock.class.php: call to block_stash->get_content()
line 231 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 1222 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1280 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 688 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
line 29 of /theme/adaptable/layout/includes/head.php: call to core_renderer->standard_head_html()
line 130 of /theme/adaptable/layout/includes/header.php: call to require_once()
line 32 of /theme/adaptable/layout/course.php: call to require_once()
line 1473 of /lib/outputrenderers.php: call to include()
line 1399 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 240 of /course/view.php: call to core_renderer->header()
Hello Adrian,
Sorry for late response.
I noticed that without users data, the restore is correct. I tried to restore with users data on a "clean" Moodle installation and this is OK too. I tried to restore with users data on the same Moodle as the original and it went ok too. I'll soon make upgrade to all instances of Moodle and I'll make another try with users data on a "not so clean" Moodle.
Thanks again to share this great plugin with the community.
Hello Serge,
I'm sorry, but I have not been able to find a solution. Joseph was kind enough to send me a backup file to try, but it restored with no errors on my system. If you can provide any further clues as to how this problem is replicated, then I would be very happy to spend some time fixing the issue. I'd very much like this plugin to work with no problems.
Hello,
Really great plugin ... but same problem as Joseph Liaw. Did you find a solution ?
Thanks for this plugin.
Hello,
The plugin is good for course gamification. Thank you for your contribution.
Do stash items (coins) can have grade points too?
Will they save the student grades in gradebook?
Could I know stash block can do with Level Up points?
Please let me know.
Thanks for the report. I'll try and replicate and fix it when I have time.
Hi Adrian: Fantastic plug in for gamification!
Question about restoring a course--I am trying to help one of my teachers restore his gamified course he his using for AP Physics for his Nuclear unit (preventing a zombie apocalypse!) , but we ran into this error during the restore process:
Coding error detected, it must be fixed by a programmer: Unexpected property 'pickups' requested.
More information about this error
The link goes to this old discussion thread: https://moodle.org/mod/forum/discuss.php?d=155652
So, I put on my admin hat, and did some troubleshooting--figured out I could restore his course without Stash, but that's no fun!!!
Turned on debug and these are the error messages:
×Debug info:
Error code: codingerror
×Stack trace:
• line 135 of /blocks/stash/classes/persistent.php: coding_exception thrown
• line 334 of /blocks/stash/classes/persistent.php: call to block_stash\persistent->set()
• line 72 of /blocks/stash/classes/persistent.php: call to block_stash\persistent->from_record()
• line 133 of /blocks/stash/backup/moodle2/restore_stash_stepslib.php: call to block_stash\persistent->__construct()
• line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_stash_block_structure_step->process_block_stash_drop()
• line 121 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
• line 178 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
• line 109 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
• line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
• line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
• line 190 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
• line 278 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
• line ? of unknownfile: call to progressive_parser->end_tag()
• line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
• line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
• line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
• line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
• line 178 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
• line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
• line 385 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
• line 219 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
• line 143 of /backup/restore.php: call to restore_ui->execute()
If you have any tips on how I can get his course restored that would be great, especially since you now have the "Scarce" item feature which is totally great--let's race to pick up the rare lead underpants and radioactive goggles!!!
Thanks for your help and sharing your great work with the Moodle community!
Hi,
I've released a new version that works with Moodle 4.0.
Hi,
Great Plugin, congrats!!
Will it be released at moodle 4.0?
This plugin is not working in moodle mobile app. How to make it work?
Hello,
you did a really nice job with the plugin.
I just tried the plugin and I have the problem that logged in students can change the setup of the plugin, they can add and delete items and they can change which person has which item. So, they can change the settings and they can give themselves the items without doing the work. Do you maybe know what the problem here is?
Thanks
Adrian,
I was able to isolate the problem. This is an item (two or three instances of it) with some two restrictions: pass a test with a certain grade and before a certain date.
If a student who has not satisfied the restrictions tries to pick the item up, the system allows her to do it. If there is one instance, this is bad for the trade option when only one item is needed to earn another item. If more than one item is needed, the student got the first one, but the other instances "disappear."
Settings for more than one instance:
Scarce item: not enabled.
Supplies:1 (instance per location)
Collection Interval: 16 weeks (I've trying any combination just to see if this fixes the issue. The student is supposed to pick only one instance during the semester.)
We're running Moodle 3.8.6 with the Lambda theme. We're moving to 3.10 soon.
We "solved" the problem by hiding the clickable items and posting non-clickable images in different labels and inverse mirror restrictions. (Images work better for students with disabilities.) When the restrictions are satisfied, the non-clickable image goes away and the pick-up one replaces it.
The ideal situation: if restrictions are not satisfied, "pick up!" button does nothing.
Thank you for the help.
** My students love the trade option since allows them to choose different forms of evaluations based on their performance. On their behalf, thank you for your hard work.)
Hello Victor Azuaje,
I'm sorry to hear that you're having problems with items that have a limited supply. I haven't been able to replicate the problem. Are you running a standard install of Moodle or do you have some plugins / themes installed? If you list them then I could install them on my machine and see if they are some how interfering with the stash items. Any further information would be most useful.