Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # dos parámetros / two parameters
- # ex. ./enrolldecurso_a_curso.sh --id 20 715
- # $1 curso orign $2 curso destino
- # ### path of the moodle root
- cd /datos/webs/moodle36/html
- #export curso
- php /home/desarrollo/moosh/moosh.php user-list --course=$1 --id >/tmp/exportados.txt
- #exit 111
- echo '---------------------';
- for i in `cat /tmp/exportados.txt`
- do
- # echo '-----------------------' >> /home/desarrollo/enrollinfo.txt;
- echo "Course ID destino : $2 enroll al user $i" ;
- php /home/desarrollo/moosh/moosh.php course-enrol --id $2 $i
- done
- cat /home/desarrollo/enrollinfo.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement