SHARE
TWEET

Untitled

a guest Aug 21st, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # dos parámetros / two parameters
  3. # ex. ./enrolldecurso_a_curso.sh  --id 20 715
  4. # $1 curso orign  $2 curso destino
  5. # ### path of the moodle root
  6. cd /datos/webs/moodle36/html
  7.  
  8. #export curso
  9. php /home/desarrollo/moosh/moosh.php user-list --course=$1 --id  >/tmp/exportados.txt
  10. #exit 111
  11. echo '---------------------';
  12. for i in `cat /tmp/exportados.txt`
  13. do
  14. #   echo '-----------------------' >> /home/desarrollo/enrollinfo.txt;
  15.    echo "Course ID  destino : $2  enroll al user $i" ;
  16.    php /home/desarrollo/moosh/moosh.php course-enrol --id $2 $i
  17. done
  18. cat /home/desarrollo/enrollinfo.txt
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top