.. _Learner View of Problems:

The Learner View of a Problem
#############################

.. tags:: educator, reference

.. START LEARNER VIEW OF PROBLEM

All problems on the Open edX platform have these component parts, some of which can
be configured. For configurable options, you can specify whether and when
an option is available in problems.

.. image:: /_images/educator_references/AnatomyOfExercise.png
  :alt: A problem from a learner's point of view, with numbered callouts for
       elements of the problem.
  :width: 600

#. **Problem text.** The problem text can contain any standard HTML
   formatting.

   Within the problem text for each problem component, you must identify a
   question or prompt, which is, specifically, the question that learners need
   to answer. This question or prompt also serves as the required accessible
   label, and is used by screen readers, and reports. For more information
   about identifying the question text in your problem, see
   :ref:`Simple Editor`.

#. **Response field.** Learners enter answers in response fields. The
   appearance of the response field depends on the type of the problem.

#. **Rendered answer.** For some problem types, the LMS uses MathJax to render
   plain text as "beautiful math."

#. **Submit.** When a learner selects **Submit** to submit a response for a
   problem, the LMS saves the grade and current state of the problem. The
   LMS immediately provides feedback about whether the response is correct
   or incorrect, as well as the problem score. The **Submit** option remains
   available if the learner has unused attempts remaining, so that they can
   try to answer the problem again

   .. note::
     If you want to temporarily or permanently hide learners' results for
     problems inside of a subsection, see :ref:`Problem Results Visibility`.

#. **Attempts.** You can set a specific number of attempts or allow unlimited
   attempts for a problem. By default, the course-wide **Maximum attempts**
   advanced setting is null, meaning that the maximum number of attempts for
   problems is unlimited.

   In courses where a specific number has been specified for **Maximum
   attempts** in Advanced Settings, if you do not specify a value for **Maximum
   attempts** for an individual problem, the number of attempts for that
   problem defaults to the number of attempts defined in Advanced Settings.

   Note that if the course-wide setting is a specific number, the Maximum
   attempts for individual problems cannot be set to unlimited.

#. **Save.** The learner can select **Save** to save their current response
   without submitting it for grading. This allows the learner to stop working
   on a problem and come back to it later.

#. **Reset.** You can specify whether the **Reset** option is available for a
   problem. This setting at the problem level overrides the default setting of
   **Show reset button for problems** for the course in Advanced Settings.

   If the **Reset** option is available, learners can select **Reset** to
   clear any input that has not yet been submitted, and try again to answer
   the question.

   * If the learner has already submitted an answer, selecting **Reset** clears
     the submission and, if the problem includes a Python script to randomize
     variables and the randomization setting is **On Reset**, changes the
     values the learner sees in the problem.

   * If the problem has already been answered correctly, **Reset** is not
     available.

   * If the number of **Maximum Attempts** that was set for this problem has
     been reached, **Reset** is not available.

#. **Show Answer.** You can specify whether this option is available for a
   problem. If a learner selects **Show Answer**, the learner sees both the
   correct answer and the explanation, if any.

   The **Show answer** setting in Advanced Settings allows course authors to
   specify when the Show Answer button appears for each problem. Valid values
   are "always", "answered", "attempted", "closed", "finished", "past_due",
   "correct_or_past_due", "after_all_attempts", "after_all_attempts_or_correct",
   "attempted_no_past_due", and "never".

   If you specify a number in the problem-level setting **Show Answer: After
   Some Number of Attempts**, the learner must submit at least that number of
   attempted answers before the **Show Answer** option is available for the
   problem.

#. **Feedback.** After a learner selects **Submit**, an icon appears beside
   each response field or selection within a problem. A green check mark
   indicates that the response was correct while a red X indicates that the response
   was incorrect. Underneath the problem, feedback text indicates whether the
   problem was answered correctly or incorrectly, and
   shows the problem score.

   .. image:: /_images/educator_references/AnatomyOfExercise2.png
      :alt: A problem from a learner's point of view, with callouts showing the
            feedback elements of an answered problem.
      :width: 600

.. note::
 If you want to temporarily or permanently hide learners' results for
 problems inside of a subsection, see :ref:`Problem Results Visibility`.

In addition to the items above, which are shown in the example, problems also
have the following elements.

* **Correct answer.** Most problems require that you specify a single correct
  answer.

* **Explanation.** You can include an explanation that appears when a learner
  selects **Show Answer**.

  .. image:: /_images/educator_references/AnatomyOfExercise3.png
     :alt: A problem from a learner's point of view, with a problem explanation shown
           below the input box after "Show Answer" has been selected.
     :width: 600

* **Points.** You can specify the number of points for a problem (default is 1).

* **Due date.** The date that the problem is due. Learners cannot submit
  answers for problems whose due dates have passed, although they can select
  **Show Answer** to show the correct answer and the explanation, if any.
  This is set at the subsection level.

.. note::
   Problems can be **open** or **closed**. Closed problems, such as problems
   whose due dates are in the past, do not accept further responses and cannot
   be reset. Depending on the value of **Show answer**, learners may be able to
   still see questions, solutions, and revealed explanations, but they cannot
   submit responses or reset problems.

There are also some attributes of problems that are not immediately
visible. You can set these attributes in Studio.

* **Accessible Label.** Within the problem text, you can identify the text
  that is, specifically, the question that learners need to answer. The text
  that is labeled as the question is used by screen readers, and reports. For
  more information, see :ref:`Simple Editor`.

* **Randomization.** In certain types of problems, you can include a Python
  script to randomize the values that are presented to learners. You use this
  setting to define when values are randomized. For more information, see
  :ref:`Randomization`.

.. END LEARNER VIEW OF PROBLEM

.. seealso::
 
  :ref:`About Problems Exercises and Tools` (concept)

  :ref:`Core Problem Types` (reference)

  :ref:`Working with Problem Components` (reference)

  :ref:`Guide to Problem Settings` (reference)

  :ref:`Gradebook Assignment Types` (reference)

  :ref:`Feedback Best Practices` (concept)

  :ref:`Adding Feedback and Hints to a Problem` (reference)

  :ref:`Configure Hint` (how-to)

  :ref:`Partial Credit` (reference)

  :ref:`Set the Assignment Type and Due Date for a Subsection` (how-to)

  :ref:`Adding Tooltips` (reference)

  :ref:`Advanced Editor` (reference)

  :ref:`Add Hints via the Advanced Editor` (how-to)

  :ref:`Modifying a Released Problem` (reference)

  :ref:`Add Unsupported Exercises Problems` (how-to)


**Maintenance chart**

+--------------+-------------------------------+----------------+--------------------------------+
| Review Date  | Working Group Reviewer        |   Release      |Test situation                  |
+--------------+-------------------------------+----------------+--------------------------------+
|              |                               |                |                                |
+--------------+-------------------------------+----------------+--------------------------------+
