Esempio n. 1
0
 public function createSynchItemPathFromPreferences($preferences, $type = 0)
 {
     if (!isset($preferences)) {
         return null;
     }
     global $CFG;
     $name = synch_Backup_controller::getBackupNameWithUniqueCode($preferences);
     $id = synch_Backup_controller::getItemFromPreferences($preferences, 'course_id');
     $pathToQueue = $type ? $CFG->synch->path_queue_out : $CFG->synch->path_queue_in;
     $sessionId = synch_Backup_controller::getItemFromPreferences($preferences, 'session_id');
     if (isset($sessionId)) {
         $pathToQueue .= '/' . $sessionId;
         //path to file
     }
     return $pathToQueue;
 }