Skip to content
Snippets Groups Projects
Commit d3030e95 authored by Tim Hunt's avatar Tim Hunt
Browse files

Improve some comments

parent 8aca0d50
Branches
No related tags found
No related merge requests found
......@@ -113,7 +113,7 @@ class qtype_stack_question extends question_graded_automatically_with_countback
public $seed = null;
/**
* @var array stack_cas_session STACK specific: session of variables.
* @var stack_cas_session2 STACK specific: session of variables.
*/
protected $session;
......@@ -1015,7 +1015,7 @@ class qtype_stack_question extends question_graded_automatically_with_countback
* @param stack_cas_session $session the CAS session to add the question variables to.
*/
public function add_question_vars_to_session(stack_cas_session2 $session) {
// Question vars will always get added to the begining of whatever session you give.
// Question vars will always get added to the beginning of whatever session you give.
$this->session->prepend_to_session($session);
}
......
......@@ -101,10 +101,20 @@ class stack_cas_session2 {
$this->instantiated = false;
}
/**
* Add all the statements from this session at the start of the target session.
*
* @param stack_cas_session2 $target
*/
public function prepend_to_session(stack_cas_session2 $target) {
$target->statements = array_merge($this->statements, $target->statements);
}
/**
* Add all the statements from this session at the end of the target session.
*
* @param stack_cas_session2 $target
*/
public function append_to_session(stack_cas_session2 $target) {
$target->statements = array_merge($target->statements, $this->statements);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment