diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/GetMoodleCommand.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/GetMoodleCommand.php index 13ebc678..59200af9 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/GetMoodleCommand.php +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/GetMoodleCommand.php @@ -735,7 +735,8 @@ class GetMoodleCommand extends Command if($student) $this->filesystem->appendToFile($this->moodlefile.'-new/'.$user->getId().'/invitation.json', $string."\n"); - elseif($teacher) + + if($teacher) $this->filesystem->appendToFile($this->moodlefile.'-new/'.$user->getId().'/course.json', $string."\n"); } } diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/FeedController.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/FeedController.php index 2e6d3cc0..763a427f 100755 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/FeedController.php +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/FeedController.php @@ -48,7 +48,7 @@ class FeedController extends Controller $fs = new Filesystem(); if($fs->exists($directory."/invitation.json")) { - $file=file_get_contents($directory."/ .json"); + $file=file_get_contents($directory."/invitation.json"); $json = substr($file, 0, -2); // sup dernier , $surveys = json_decode("{".$json."}", true); foreach($surveys as $id => $survey) {