Bugfix in cascading cohort sync
This commit is contained in:
parent
13e862de9a
commit
5bbff0799c
1 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,7 @@ class cascadecohortsync {
|
|||
if(!in_array($this->studyplanid ,$plans)){
|
||||
// if not, add it to the reference
|
||||
$this->debug->write("Adding this plan to the list");
|
||||
$plans[] = $this->studyplanid;
|
||||
$plans[] = (int)($this->studyplanid);
|
||||
$enrol->update_instance($instance,(object)["customtext4"=>json_encode($plans)]);
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ class cascadecohortsync {
|
|||
// in the customtext4 field in json format
|
||||
$this->debug->write("Instance ({$instanceid} created. Updateing instance with studyplan id");
|
||||
$instance = $DB->get_record('enrol', array('id' => $instanceid));
|
||||
$enrol->update_instance($instance,(object)["customtext4"=>json_encode([$this->studyplanid])]);
|
||||
$enrol->update_instance($instance,(object)["customtext4"=>json_encode([(int)($this->studyplanid)])]);
|
||||
|
||||
$this->debug->write("Synchronize the enrolment");
|
||||
// Successfully added a valid new instance, so now instantiate it.
|
||||
|
|
Loading…
Reference in a new issue