End logic
*********


EndLogic
========

class psynet.end.EndLogic(time_limit=None)

   Show a terminal debrief before recruiter release.

   Parameters:
      **time_limit** ("Optional"["float"]) -- If given, the debrief
      page continues by itself after this many seconds, as if the
      participant had clicked Finish, and says so with a countdown.
      Useful when participants should not wait on the last page, for
      example in multiplayer games. Only debrief pages with a Finish
      button can continue by themselves; "debrief_page()" raises
      "ValueError" otherwise.

   before_debrief_logic()

      Return timeline logic to run after "before_debrief", such as an
      "AsyncCodeBlock".

      Return type:
         "Union"["Elt", "List"["Elt"], "EltCollection", "None"]

   prepare_debrief(experiment, participant)

      Apply outcome state, then store its recruiter exit decision.

      Return type:
         "None"

   prepare_exit(experiment, participant)

      Store the recruiter decision shared by debrief and settlement.

      Return type:
         "None"

   property should_show_reward: bool

      See "psynet.experiment.Experiment.show_reward".

      Lucid needs no special case here: it hides rewards by default
      and refuses an explicit opt-in.

   summarize_reward(experiment, participant)

      Return HTML summarizing the participant's time and performance
      rewards.


SuccessfulEndLogic
==================

class psynet.end.SuccessfulEndLogic(time_limit=None)

   Bases: "EndLogic"


UnsuccessfulEndLogic
====================

class psynet.end.UnsuccessfulEndLogic(failure_tags=None, *, failure_message=None, time_limit=None, **kwargs)

   Bases: "EndLogic"

   Show the early-end page to a participant who failed or was screened
   out.

   Parameters:
      * **failure_tags** ("Optional"["List"]) -- Tags appended to the
        participant's "failure_tags" on this page.

      * **time_limit** ("Optional"["float"]) -- See "EndLogic".

      * **failure_message** ("Union"["str", "Callable", "None"]) --
        Optional line that says why the participant stopped early, or
        a function of "participant" (and, if it asks for them, other
        context arguments such as "experiment") that returns one, or
        "None". Without one, or when it returns "None", PsyNet
        explains its own multiplayer reasons: waiting too long at a
        barrier, being too slow to reach the next one, or the group
        becoming too small. A plain string replaces these built-in
        lines for every participant, so prefer a function that returns
        "None" for reasons you don't handle. Returning """" shows no
        line at all. If the function raises, PsyNet logs the error and
        shows its built-in line.


RejectedConsentLogic
====================

class psynet.end.RejectedConsentLogic(*args, **kwargs)

   Bases: "UnsuccessfulEndLogic"
