Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
fontinixxl committed Sep 16, 2014
1 parent 517051f commit 40d0231
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions behaviour.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public function get_state_string($showcorrectness) {
}

$remainingattempts = $this->get_remaining_attempts();
//debugging('get_state_string: remainingattempts = ' . $remainingattempts);
return get_string('triesremaining', 'qbehaviour_interactive', $remainingattempts);
}

Expand Down Expand Up @@ -181,34 +180,17 @@ public function process_finish(question_attempt_pending_step $pendingstep) {
return question_attempt::KEEP;
}

//NOT USED

public function process_save(question_attempt_pending_step $pendingstep) {

//$status = parent::process_save($pendingstep);
//debugging("in proces saveeeeeeee!!, question = ".$this->question->name." state = ".$pendingstep->get_state());
$prevgrade = $this->qa->get_fraction();
//si la pregunta no estava puntuada (next)
if(is_null($prevgrade)){
//debugging("previous graded NULL");
$this->process_next_without_answer($pendingstep);
}else{
//list($fraction, $state) = $this->question->grade_response($prevgrade);
//die();
$pendingstep->set_fraction($prevgrade);
$pendingstep->set_state($this->qa->get_state());
}
//$pendingstep->set_state(question_state::$todo);
/*
$prevgrade = $this->qa->get_fraction();
if (!is_null($prevgrade)) { //ja ha estat puntuada
debugging("prevgraded: with grade = ".$prevgrade);
$pendingstep->set_fraction($prevgrade);
$pendingstep->set_state(question_state::$todo);
}else{
debugging("process without answer");
$this->process_next_without_answer($pendingstep);
}
*/
return question_attempt::KEEP;
}

Expand Down

0 comments on commit 40d0231

Please sign in to comment.