Closed aarajh closed 7 years ago
Hmmm, are you doing anything in the meantime? If you're just exporting a draw, and then reimporting it, that's very strange, and my question would be 'Why are you doing that?'. If you're not, the likelihood is that you're actually importing a different round over. If you're trying to do a pre-draw, I can talk you through it, but it will require the use of a php script until we integrate it into the live version.
Yes i am trying to import a different round in reality. I am trying to import rounds after running a tournament on a local server Sure, that will be fine
@rscoates
Okay, so what you'd need is this php script:
<?php
$jsonfile = file_get_contents('olddraw.json');
$json = json_decode($jsonfile);
$new_id = 'NEWDEBATEID';
foreach($json->draw as $debate){
$debate->id = $new_id;
$new_id++;
}
$fp = fopen('newdraw.json', 'w');
fwrite($fp, json_encode($json));
fclose($fp);
echo 'Done!';
?>
Run that php script in a folder with the olddraw json file.
Once you've redrawn, find the debate id of the first debate in the new draw, insert it above (at NEWDEBATEID) and then import the generated file.
Please note that the delay was due to us making this feature as standard, which will hopefully come out in the next ten days or so. I hoped to have it faster, and then you wouldn't need this answer.
Hope that helps.
Thanks!
But it still didnt work. The same result occurs; the adjudicators disappear and no difference in the draw
Hmmm. I think I might not have explained it very well. I will be making this feature standard very soon, so writing a detailed instructions is probably not worth it.
Whenever i import a round, the draws arent updated and the adjudicators also disappear from the draws. Even if i export and import the same round