Quickstart

You can follow these three steps to add a star rating to your STACK question.

  1. Make sure to activate the Moodle plain text editor.

  2. Add the JavaScript module and a hidden input field for the results to the question text:

    <p class="ratingResults">[[input:ans_survey]] [[validation:ans_survey]]</p>
    <script
       src="https://www.ruhr-uni-bochum.de/stackrate-maths/stackrate@0.2/stars.js">
    </script>

    Make sure to set the input type to string and disable validation. In addition it is sensible to add the keyword hideanswer to the extra options field. This will hide the sample solution from students when they completed the Moodle quiz.

  3. Place your star rating in the appropiate location (question text or feedback text). It could look like this:

    <div class="stars-rating" data-name="my_id">
      <p>Please answer the following questions:</p>
      <div class="question">
        How helpful was this feedback?
        <div class="stars"></div>
      </div>
      <div class="question">
        How helpful was the hint?
        <div class="stars"></div>
      </div>
      <div class="question">
        How would you rate the task overall?
        <div class="stars"></div>
      </div>
    </div>

For more details on the settings, take a look at the documentation. We also have three short video tutorials that demonstrate how to use STACKrate and which you will find on our About page.