Giter VIP home page Giter VIP logo

moodle-block_stash's Introduction

Block Stash GitHub tag Travis branch

Engage your students! Gamify your courses by hiding objects for your students to find.

Features

  • Create any object you like
  • Hide objects throughout your course in any possible location
  • Set objects to automatically re-appear after a delay to boost engagement
  • Unlock access to activities based on the objects found (requires plugin availability_stash)
  • Trade by exchanging items for different items (requires plugin filter plugin)

Requirements

Moodle 3.1 or greater.

Installation

Simply install the plugin and add the block to a course page.

Please read the Recommended plugins section.

Getting started

Creating an item

  1. Create a new item
  2. Create a new location for that item
  3. Copy the code snippet for that location
  4. Directly paste the code in the HTML view of your editor

When viewing the content the object will now appear. Note that teachers cannot pick up the objects, for them they will always re-appear.

Creating a trade (item exchange)

  1. Create at least two items (see creating an item above)
  2. Click the create trade widget button.
  3. Add items to gain on the left side and items to lose on the right.
  4. Once saved click on the trade name and copy the code snippet.
  5. Directly paste the code snippet into any location that has an editor.

Recommended plugins

Shortcodes filter

This filter plugin makes it easier and more reliable to add the items to your course content. We very highly recommend you to use it. This is a requirement to use the trading feature.

Stash availability

This availability plugin allows to restrict the access to activity modules and resources based on the objects collected by a student.

License

Licensed under the GNU GPL License.

moodle-block_stash's People

Contributors

abgreeve avatar fmcorz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-block_stash's Issues

Restrict access is broken

I've been trying out using Stash to restrict access to a PDF file in Moodle 3.2 (Boost theme)

It appears to have removed my ability to change the settings for this restriction or add/remove any restrictions.

fireshot capture 5 - editing file_ - http___www screenface net_moodle29_course_modedit php

Happy to provide any other information that might be useful.
I've also so far been unable to work out how to trigger activity completion/course completion based on Stash objects. (This will be great when it works)

cheers

Manually add/subtract student items

From the "report" view would it be possible to manually add/subtract student's items as a teacher/admin? As a type of reward mechanism in a blended environment? For example students could have health points (heart container items) that could be taken away for breaking classroom rules or given gold coins for positive reinforcement.

Stash in Moodle 3.2 and Boost

Hello developers,

This is to mention that Stash looks bit odd with Boost theme in Moodle 3.2.
Specifically the Supplies option appears twice (before and after save button), in the Add a new location page.

Here is a screenshot:

stash

It worth mention that still works fine.
Anna

expanded trade

Hello again!
My students want to trade among themselves.
Is there any conceivable possibility for this?

Include Stash element in Javascript if condition

Is there a way to use the Stash link [stashdrop secret = "x0GUV" text = "Pick up!" image] in a JavaScript if condition?

I want to show a different stash image based on the user's score.

if (score == 100) {
[stashdrop secret = "x0GUV" text = "Pick up!" image]
}

I can write the JavaScript code to get the user's score and test the condition, but I can't find a way to call the stashdrop from inside the JavaScript code.

Thanks for your help,
Clarence Prudhoe
[email protected]

Add a report with student stats

At the moment there is no feedback available to the teachers. They create the drops but have no idea if the students have collected any items or not.
It would be nice to have a report that show which students have collected which items.

Trade function problems

I've installed stash and stash availability in moodle 3.5 (plugins are up to date). I've made 2 items: coins and a bonus. Then I set up a trade rule, to trade 5 coins for a bonus and limit access to a section to having gotten the bonus.

The coins are hidden in the course as is a bonus item.

It's not clear to me how the trade rule works out. When I place a bonus item, it can be picked up without deducting coins from the stash block.

Could there be bugs or have I implemented in wrong?
Tx Bas

Allow multiple instances of the Stash block

Similar to the HTML block, it would be good to allow teachers to make multiple instances of the Stash block in one course, so that they could encourage students to collect different items for different tasks. For example, in language teaching, we might have three stashes, each with a theme and students would try to collect all of them in each theme:

  • ten images of figures with key phrases from each unit
  • ten emotions on a figure with a key word in the foreign language
  • ten key words, one from each unit, and when you put them together, it solves a mystery

With multiple instances the title of the block would have to be configurable as well, like the HTML block.

Error when I try to go to "all courses"

Hi, I am trying to set up Stash on my Moodle site. I have multiple courses and initially didn't understand how stash works, so I tried to put a block on the "courses" section instead of inside a course. I got this error:
The stash is not enabled. Was the block added to the course?

And I backed out and added the block to the course, which worked fine. But now every time I try to click on "all courses" it shows me a page with this error instead of taking me to all courses.

Do I need to delete something for this to stop happening?
stash not enabled error

Fatal errors when switching roles

As an admin, when I try to switch roles to a student, I get a fatal error: Class 'block_stash\required_capability_exception' not found in /var/www/moodle3/blocks/stash/classes/manager.php on line 665

Fatal errors put a site down. Perhaps the maturity of this plugin should be rc?

(Moodle 3.1)

Stash causes PHP Unit failures

As reported on Moodle.org

hi, looks really interesting - i'm getting a testing error at installation. Using Moodle 3.0.5 plugin version 2016082601 / 1.1.0

error output below:

core_questionlib_testcase::test_altering_tag_instance_context
Static function block_stash\restore_decode_rule::encode_content() should not be abstract

/opt/data/go-agent/pipelines/Moodle_Test/moodle/blocks/stash/classes/restore_decode_rule.php:68
/opt/data/go-agent/pipelines/Moodle_Test/moodle/lib/classes/component.php:96
/opt/data/go-agent/pipelines/Moodle_Test/moodle/lib/classes/component.php:96
/opt/data/go-agent/pipelines/Moodle_Test/moodle/blocks/stash/backup/moodle2/backup_stash_block_task.class.php:71
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/moodle2/backup_xml_transformer.class.php:125
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/moodle2/backup_xml_transformer.class.php:88
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/util/xml/xml_writer.class.php:273
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/util/xml/xml_writer.class.php:211
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/util/structure/backup_structure_processor.class.php:110
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/util/structure/backup_final_element.class.php:38
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/util/structure/backup_nested_element.class.php:97
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/util/plan/backup_structure_step.class.php:97
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/util/plan/base_task.class.php:181
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/util/plan/base_plan.class.php:177
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/util/plan/backup_plan.class.php:120
/opt/data/go-agent/pipelines/Moodle_Test/moodle/backup/controller/backup_controller.class.php:320
/opt/data/go-agent/pipelines/Moodle_Test/moodle/lib/tests/questionlib_test.php:242
/opt/data/go-agent/pipelines/Moodle_Test/moodle/lib/phpunit/classes/advanced_testcase.php:80

Moodle 3.8 Items dissapear after pickup

Hello

After setting the objects on a course in a moodle 3.8 platform, if 1 user pick-ups all of them, the other students and our admin account can't see or find the objects. Only after reset the limit config per item, they appear again in the course.

Sharing Cart & Stash

Hello!
I LOVE your great block stash.
Now I have a lot of items in the block and would at least like to transfer the setup to other courses with sharing cart.
Is there a way to implement this?

Exception thrown after has been removed

I removed the block instance from the course while I left some dropped items in the course. When the filter is about to render the dropped item, it throws exception because of require_enabled(). I would expect that in this case, the forgotten drop is simply ignored and an empty string is rendered in its place (or maybe some warning). Thrown exception just does not look appropriate in this case.

The stash is not enabled. Was the block added to the course?

More information about this error

Debug info: Error code: stashdisabled

Stack trace:
line 685 of /blocks/stash/classes/manager.php: moodle_exception thrown
line 364 of /blocks/stash/classes/manager.php: call to block_stash\manager->require_enabled()
line 169 of /filter/stash/filter.php: call to block_stash\manager->get_drop()
line 81 of /filter/stash/filter.php: call to filter_stash->transform_shortcode()
line 176 of /lib/filterlib.php: call to filter_stash->filter()
line 218 of /lib/filterlib.php: call to filter_manager->apply_filter_chain()
line 335 of /lib/filterlib.php: call to filter_manager->filter_text()
line 1269 of /lib/weblib.php: call to performance_measuring_filter_manager->filter_text()
line 963 of /course/format/renderer.php: call to format_text()
line 230 of /course/format/renderer.php: call to format_section_renderer_base->format_summary_text()
line 897 of /course/format/renderer.php: call to format_section_renderer_base->section_header()
line 56 of /course/format/topics/format.php: call to format_section_renderer_base->print_multiple_section_page()
line 280 of /course/view.php: call to require()

Block "Stash" in course categories

Dear developer,

thanks for your great gamification plugin.

One tiny issue: It should not be possible for users to add stash blocks to course categories. This leads to an error that makes it impossible to use the concerning category unless the conflicting database entry is deleted.

Best regards
Andreas

bug create items

Hello good plugin authors
When you create an element (items) gives the following error **

Sorry for my English.

Moodle 3.2+ (Build: 20161215)
PHP Version 5.6.30

**
Function createElement() can not be called statically, this will no longer work in PHP 7.1

line 555 of /lib/pear/HTML/QuickForm.php: call to debugging()
line 77 of /blocks/stash/classes/form/integer.php: call to HTML_QuickForm->createElement()
line 546 of /lib/pear/HTML/QuickForm/group.php: call to block_stash_form_integer->_createElements()
line 163 of /lib/pear/HTML/QuickForm/group.php: call to HTML_QuickForm_group->_createElementsIfNotExist()
line 132 of /blocks/stash/classes/form/integer.php: call to HTML_QuickForm_group->setValue()
line 382 of /lib/pear/HTML/QuickForm/element.php: call to block_stash_form_integer->onQuickFormEvent()
line 417 of /lib/pear/HTML/QuickForm/group.php: call to HTML_QuickForm_element->onQuickFormEvent()
line 144 of /lib/form/group.php: call to HTML_QuickForm_group->onQuickFormEvent()
line 142 of /blocks/stash/classes/form/integer.php: call to MoodleQuickForm_group->onQuickFormEvent()
line 592 of /lib/pear/HTML/QuickForm.php: call to block_stash_form_integer->onQuickFormEvent()
line 622 of /lib/pear/HTML/QuickForm.php: call to HTML_QuickForm->_loadElement()
line 91 of /blocks/stash/classes/form/drop.php: call to HTML_QuickForm->addElement()
line 204 of /lib/formslib.php: call to block_stash\form\drop->definition()
line 109 of /admin/tool/lp/classes/form/persistent.php: call to moodleform->__construct()
line 51 of /blocks/stash/drop.php: call to tool_lp\form\persistent->__construct()

Function createElement() can not be called statically, this will no longer work in PHP 7.1

line 555 of /lib/pear/HTML/QuickForm.php: call to debugging()
line 83 of /blocks/stash/classes/form/integer.php: call to HTML_QuickForm->createElement()
line 546 of /lib/pear/HTML/QuickForm/group.php: call to block_stash_form_integer->_createElements()
line 163 of /lib/pear/HTML/QuickForm/group.php: call to HTML_QuickForm_group->_createElementsIfNotExist()
line 132 of /blocks/stash/classes/form/integer.php: call to HTML_QuickForm_group->setValue()
line 382 of /lib/pear/HTML/QuickForm/element.php: call to block_stash_form_integer->onQuickFormEvent()
line 417 of /lib/pear/HTML/QuickForm/group.php: call to HTML_QuickForm_element->onQuickFormEvent()
line 144 of /lib/form/group.php: call to HTML_QuickForm_group->onQuickFormEvent()
line 142 of /blocks/stash/classes/form/integer.php: call to MoodleQuickForm_group->onQuickFormEvent()
line 592 of /lib/pear/HTML/QuickForm.php: call to block_stash_form_integer->onQuickFormEvent()
line 622 of /lib/pear/HTML/QuickForm.php: call to HTML_QuickForm->_loadElement()
line 91 of /blocks/stash/classes/form/drop.php: call to HTML_QuickForm->addElement()
line 204 of /lib/formslib.php: call to block_stash\form\drop->definition()
line 109 of /admin/tool/lp/classes/form/persistent.php: call to moodleform->__construct()
line 51 of /blocks/stash/drop.php: call to tool_lp\form\persistent->__construct()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.