Issue with exam and files disappearing

Hi!
I just completed the Code Foundation for ROS.

I need to take the test 2 times. The first time, I passed, but my certificate was not showing, so I decided to take the test again. But, for my surprise, all my bash files (task1.sh, task2.sh and task3.sh) disappeared! I lost almost 4 hours solving all issues and they disappeared.
On my second try, I did faster, because I remember most of my code, and also I did a Backup. To my surprise, again, my .sh files are gone again (after I submit them for grading)!!

My bash files are supposed to disappear after my exam is corrected?

Also, it`s possible that the test grades a code with one grade and, when I submit again the same code, I get another grade?

Kind regards, Gustavo Duarte

Hi @ghduarte,

the certificates are now shown instantly because they are generated every ~1 hour.

When you have passed an exam, just wait a few hours and the certificate should appear.

With regards to the files being lost, no files are supposed to be removed by the grader. Could you review the code in your bash scripts (task1.sh, task2.sh, task3.sh) to make sure it is not your own script that is removing the files?

Related to running the same code and getting two different results, it should not happen this way. Since we use simulations, it may happen to have a small variable in a robot position, for example, but this should not affect the grading.

Hi @ralves,
About my files disappearing, I think it`s strange too. Because i ran the code before submiting for grading, to confirm that they were working fine. After I submit the code to grade, they were all gone.

Here is a code for my task3.sh Maybe it might help with this issue.

#!/bin/bash

cd catkin_ws/src/linux_exam/this/is/my/linux/exam

rm -r *

touch exam1.py
touch exam2.py
touch exam3.py

chmod 754 exam1.py
chmod 501 exam2.py
chmod 241 exam3.py

Kind regards, Gustavo Duarte

Hy @ghduarte ,

It is importante to run rm * only after making sure you are exactly in the catkin_ws/src/linux_exam/this/is/my/linux/exam folder.

If the cd command fails, for example, the rm * would remove all files from the existing directory.

So instead of :

cd catkin_ws/src/linux_exam/this/is/my/linux/exam

rm -r *

I would put something like:

cd ~/catkin_ws/src/linux_exam/this/is/my/linux/exam && rm -r *

Here we are now putting the full path of the my/linux/exam folder, and only running rm if we are really the “cd” command succeeded.