#####################################################################
# Copier le questionnaire sur le site : POUR EXCO
######################################################################

SERVER=thierry.excoffier@demo710
PORT=22

SERVER='thierry.excoffier@127.0.0.1'
PORT='22223'

rsync --verbose \
      --recursive \
      --links \
      --delete \
      --exclude '.git' \
      --exclude '*.pyc' \
      --exclude '*~' \
      --exclude Students \
      --rsh "ssh -p $PORT" \
      $HOME/QUENLIG/. $SERVER:QUENLIG
ssh -p $PORT $SERVER "
cd QUENLIG
rm Students 
ln -s ../Students .
./main.py lif1_python stop
sleep 1
nohup ./main.py lif1_python start >/dev/null 2>&1 </dev/null &
"

##########################################
# Crer le questonnaire la premire fois :
##########################################

# Sur demo710.univ-lyon1.fr :
cd QUENLIG
./main.py lif1_python create Questions/LIF1_PYTHON 2222 \
	       admin thierry.excoffier \
               admin eliane.perna \
               admin elodie.desseree \
               admin jacques.bonneville \
               admin mathieu.barnachon \
	       url http://demo710.univ-lyon1.fr/LIF1_PYTHON

set +H
(
mkdir Students/lif1_python/Logs/Student
echo "{"
for I in session_start session_stop session_duration statmenu_smiley statmenu_rank action_help questions_shuffle statmenu_indice
do
    echo "'$I': ('!executable',),"
done
echo '}'
) >Students/lif1_python/Logs/Student/acls

##########################################
# Lancer le questionnaire :
##########################################

ssh thierry.excoffier@demo710 "
cd QUENLIG
./main.py lif1_python stop
sleep 2
nohup ./main.py lif1_python start >/dev/null 2>&1 &
"



######################################################################
# Affiche le graphe des questions
######################################################################

./main.py lif1_python plot
gv Students/lif1_python/HTML/xxx_graphe.ps



./main.py lif1_python url http://lirispaj.univ-lyon1.fr:2222/ start
 
######################################################################
# Checklist
######################################################################

P:\Portable Python 3.2.1.1\PyScripter-Portable.exe



