Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement