same code of PR#119 -refs #6599
Fixed assignments imported problem when already exist -refs #6599
Was storing global path, fixed -refs #6599
Minor change: elseif() by else { if()}
Merge branch '6599' of github.com:danbarretodev/chamilo-lms into danbarretodev-6599