This commit is contained in:
afornerot 2019-06-19 17:22:27 +02:00
parent d271d969a6
commit 345d5966c8
2 changed files with 3 additions and 2 deletions

View File

@ -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");
}
}

View File

@ -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) {