original_string: protected function adaptive_mark_details_from_step(question_attempt_step $gradedstep,
              question_state $state, $maxmark, $penalty) {
  
          $details = new qbehaviour_adaptive_mark_details($state);
          $details->maxmark    = $maxmark;
          $details->actualmark = $gradedstep->get_fraction() * $details->maxmark;
          $details->rawmark    = $gradedstep->get_behaviour_var('_rawfraction') * $details->maxmark;
  
          $details->currentpenalty = $penalty * $details->maxmark;
          $details->totalpenalty   = $details->currentpenalty * $this->qa->get_last_behaviour_var('_try', 0);
  
          $details->improvable = $this->is_state_improvable($gradedstep->get_state());
  
          return $details;
      }
code: protected function adaptive_mark_details_from_step(question_attempt_step $gradedstep,
              question_state $state, $maxmark, $penalty) {
  
          $details = new qbehaviour_adaptive_mark_details($state);
          $details->maxmark    = $maxmark;
          $details->actualmark = $gradedstep->get_fraction() * $details->maxmark;
          $details->rawmark    = $gradedstep->get_behaviour_var('_rawfraction') * $details->maxmark;
  
          $details->currentpenalty = $penalty * $details->maxmark;
          $details->totalpenalty   = $details->currentpenalty * $this->qa->get_last_behaviour_var('_try', 0);
  
          $details->improvable = $this->is_state_improvable($gradedstep->get_state());
  
          return $details;
      }
code_tokens: protected function adaptive_mark_details_from_step ( question_attempt_step $ gradedstep , question_state $ state , $ maxmark , $ penalty ) { $ details = new qbehaviour_adaptive_mark_details ( $ state ) ; $ details -> maxmark = $ maxmark ; $ details -> actualmark = $ gradedstep -> get_fraction ( ) * $ details -> maxmark ; $ details -> rawmark = $ gradedstep -> get_behaviour_var ( '_rawfraction' ) * $ details -> maxmark ; $ details -> currentpenalty = $ penalty * $ details -> maxmark ; $ details -> totalpenalty = $ details -> currentpenalty * $ this -> qa -> get_last_behaviour_var ( '_try' , 0 ) ; $ details -> improvable = $ this -> is_state_improvable ( $ gradedstep -> get_state ( ) ) ; return $ details ; }
docstring: Actually populate the qbehaviour_adaptive_mark_details object.
  @param question_attempt_step $gradedstep the step that holds the relevant mark details.
  @param question_state $state the state corresponding to $gradedstep.
  @param unknown_type $maxmark the maximum mark for this question_attempt.
  @param unknown_type $penalty the penalty for this question, as a fraction.
docstring_tokens: Actually populate the qbehaviour_adaptive_mark_details object .