/**
  * Stores the block sequence asynchronously
  */
 public function saveBlockSortingAsynch()
 {
     /**
      * @var $ilUser ilObjUser
      */
     global $ilUser;
     $response = new stdClass();
     $response->success = false;
     if (!isset($_POST[IL_COL_LEFT]['sequence']) && !isset($_POST[IL_COL_RIGHT]['sequence'])) {
         echo json_encode($response);
         return;
     }
     if (in_array($this->getColType(), array('pd'))) {
         $response->success = true;
         foreach (array(IL_COL_LEFT => (array) $_POST[IL_COL_LEFT]['sequence'], IL_COL_RIGHT => (array) $_POST[IL_COL_RIGHT]['sequence']) as $side => $blocks) {
             $i = 2;
             foreach ($blocks as $block) {
                 $bid = explode('_', $block);
                 ilBlockSetting::_writeNumber($bid[1], $i, $ilUser->getId(), $bid[2]);
                 ilBlockSetting::_writeSide($bid[1], $side, $ilUser->getId(), $bid[2]);
                 $i += 2;
             }
         }
     }
     echo json_encode($response);
     exit;
 }