| 
|   | __toString () | 
|   | 
|   | corresponding_commented_state ($fraction) | 
|   | Compute an appropriate state to move to after a manual comment has been added to this state.  More...
  | 
|   | 
|   | default_string ($showcorrectness) | 
|   | The result of doing get_string on the result of get_state_class().  More...
  | 
|   | 
|   | get_feedback_class () | 
|   | Return an appropriate CSS class name ''/'correct'/'partiallycorrect'/'incorrect', for a state.  More...
  | 
|   | 
|   | get_state_class ($showcorrectness) | 
|   | Return the name of an appropriate string to look up in the question language pack for a state.  More...
  | 
|   | 
|   | get_summary_state () | 
|   | Each state can be categorised into one of four categories: inprogress, needsgrading, manuallygraded or autograded.  More...
  | 
|   | 
|   | is_active () | 
|   | Is this state one of the ones that mean the question attempt is in progress? That is, started, but no finished.  More...
  | 
|   | 
|   | is_commented () | 
|   | Is this state one of the ones that mean the question attempt has had a manual comment added?  More...
  | 
|   | 
|   | is_correct () | 
|   | Is this state one of the ones that mean the question attempt has been graded?  More...
  | 
|   | 
|   | is_finished () | 
|   | Is this state one of the ones that mean the question attempt is finished? That is, no further interaction possible, apart from manual grading.  More...
  | 
|   | 
|   | is_gave_up () | 
|   | Is this state one of the ones that mean the question attempt has been graded?  More...
  | 
|   | 
|   | is_graded () | 
|   | Is this state one of the ones that mean the question attempt has been graded?  More...
  | 
|   | 
|   | is_incorrect () | 
|   | Is this state one of the ones that mean the question attempt has been graded?  More...
  | 
|   | 
|   | is_partially_correct () | 
|   | Is this state one of the ones that mean the question attempt has been graded?  More...
  | 
|   | 
 | 
| 
static  | $complete | 
|   | 
| 
static  | $finished | 
|   | 
| 
static  | $gaveup | 
|   | 
| 
static  | $gradedpartial | 
|   | 
| 
static  | $gradedright | 
|   | 
| 
static  | $gradedwrong | 
|   | 
| 
static  | $invalid | 
|   | 
| 
static  | $manfinished | 
|   | 
| 
static  | $mangaveup | 
|   | 
| 
static  | $mangrpartial | 
|   | 
| 
static  | $mangrright | 
|   | 
| 
static  | $mangrwrong | 
|   | 
| 
static  | $needsgrading | 
|   | 
| 
static  | $notstarted | 
|   | #+ Specific question_state instances. 
  | 
|   | 
| 
static  | $todo | 
|   | 
| 
static  | $unprocessed | 
|   | 
◆ __toString()
  
  
      
        
          | question_state::__toString  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
- Return values
 - 
  
    | string | convert this state to a string.  | 
  
   
 
 
◆ corresponding_commented_state()
  
  
      
        
          | question_state::corresponding_commented_state  | 
          ( | 
            | 
          $fraction | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
◆ default_string()
  
  
      
        
          | question_state::default_string  | 
          ( | 
            | 
          $showcorrectness | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
The result of doing get_string on the result of get_state_class(). 
- Parameters
 - 
  
    | bool | $showcorrectness | Whether right/partial/wrong states should be distinguised.  | 
  
   
- Return values
 - 
  
    | string | a string from the lang pack that can be used in the UI.  | 
  
   
 
 
◆ get()
  
  
      
        
          | static question_state::get  | 
          ( | 
            | 
          $name | ) | 
           | 
         
       
   | 
  
staticinherited   | 
  
 
 
◆ get_all()
  
  
      
        
          | static question_state::get_all  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
staticinherited   | 
  
 
Get all the states in an array. 
- Return values
 - 
  
  
 
 
 
◆ get_all_for_summary_state()
  
  
      
        
          | static question_state::get_all_for_summary_state  | 
          ( | 
            | 
          $summarystate | ) | 
           | 
         
       
   | 
  
staticinherited   | 
  
 
Get all the states in an array. 
- Parameters
 - 
  
    | string | $summarystate | one of the four summary states inprogress, needsgrading, manuallygraded or autograded.  | 
  
   
- Return values
 - 
  
    | array | of the corresponding states.  | 
  
   
 
 
◆ get_feedback_class()
  
  
      
        
          | question_state::get_feedback_class  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
◆ get_state_class()
      
        
          | question_state_complete::get_state_class  | 
          ( | 
            | 
          $showcorrectness | ) | 
           | 
        
      
 
Return the name of an appropriate string to look up in the question language pack for a state. 
This is used, for example, by question_behaviour::get_state_string(). However, behaviours sometimes change this default string for soemthing more specific.
- Parameters
 - 
  
    | bool | $showcorrectness | Whether right/partial/wrong states should be distinguised, or just treated as 'complete'.  | 
  
   
- Return values
 - 
  
    | string | the name of a string that can be looked up in the 'question' lang pack, or used as a CSS class name, etc.  | 
  
   
Reimplemented from question_state.
 
 
◆ get_summary_state()
  
  
      
        
          | question_state::get_summary_state  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
Each state can be categorised into one of four categories: inprogress, needsgrading, manuallygraded or autograded. 
- Return values
 - 
  
    | string | which category this state falls into.  | 
  
   
 
 
◆ graded_state_for_fraction()
  
  
      
        
          | static question_state::graded_state_for_fraction  | 
          ( | 
            | 
          $fraction | ) | 
           | 
         
       
   | 
  
staticinherited   | 
  
 
Return the appropriate graded state based on a fraction. 
That is 0 or less is $graded_incorrect, 1 is $graded_correct, otherwise it is $graded_partcorrect. Appropriate allowance is made for rounding float values.
- Parameters
 - 
  
    | number | $fraction | the grade, on the fraction scale.  | 
  
   
- Return values
 - 
  
  
 
 
 
◆ is_active()
      
        
          | question_state_complete::is_active  | 
          ( | 
           | ) | 
           | 
        
      
 
Is this state one of the ones that mean the question attempt is in progress? That is, started, but no finished. 
- Return values
 - 
  
  
 
Reimplemented from question_state.
 
 
◆ is_commented()
  
  
      
        
          | question_state::is_commented  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
◆ is_correct()
  
  
      
        
          | question_state::is_correct  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
◆ is_finished()
      
        
          | question_state_complete::is_finished  | 
          ( | 
           | ) | 
           | 
        
      
 
Is this state one of the ones that mean the question attempt is finished? That is, no further interaction possible, apart from manual grading. 
- Return values
 - 
  
  
 
Reimplemented from question_state.
 
 
◆ is_gave_up()
  
  
      
        
          | question_state::is_gave_up  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
Is this state one of the ones that mean the question attempt has been graded? 
- Return values
 - 
  
  
 
Reimplemented in question_state_gaveup.
 
 
◆ is_graded()
  
  
      
        
          | question_state::is_graded  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
◆ is_incorrect()
  
  
      
        
          | question_state::is_incorrect  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
◆ is_partially_correct()
  
  
      
        
          | question_state::is_partially_correct  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
◆ manually_graded_state_for_fraction()
  
  
      
        
          | static question_state::manually_graded_state_for_fraction  | 
          ( | 
            | 
          $fraction | ) | 
           | 
         
       
   | 
  
staticinherited   | 
  
 
Return the appropriate manually graded state based on a fraction. 
That is 0 or less is $manually_graded_incorrect, 1 is $manually_graded_correct, otherwise it is $manually_graded_partcorrect. Appropriate allowance is made for rounding float values.
- Parameters
 - 
  
    | number | $fraction | the grade, on the fraction scale.  | 
  
   
- Return values
 - 
  
    | int | one of the state constants.  | 
  
   
 
 
The documentation for this class was generated from the following file: