| @@ 355-375 (lines=21) @@ | ||
| 352 | if (!empty($connectionList)) { |
|
| 353 | $explode = explode('-', $connectionList); |
|
| 354 | $pos = strpos($explode[0], 'SG'); |
|
| 355 | if ($pos === false) { |
|
| 356 | $pos = strpos($explode[0], 'G'); |
|
| 357 | if (is_numeric($pos)) { |
|
| 358 | // group_123 id |
|
| 359 | $groupValueId = (int)str_replace( |
|
| 360 | 'G', |
|
| 361 | '', |
|
| 362 | $explode[0] |
|
| 363 | ); |
|
| 364 | $firstConnection = 'group_'.$groupValueId; |
|
| 365 | $groupDrawLine[$groupValueId] = true; |
|
| 366 | } else { |
|
| 367 | // Course block (row_123 id) |
|
| 368 | if (!empty($explode[0])) { |
|
| 369 | $firstConnection = 'row_'.(int) $explode[0]; |
|
| 370 | } |
|
| 371 | } |
|
| 372 | } else { |
|
| 373 | // subgroup__123 id |
|
| 374 | $firstConnection = 'subgroup_'.(int)str_replace('SG', '', $explode[0]); |
|
| 375 | } |
|
| 376 | ||
| 377 | $pos = strpos($explode[1], 'SG'); |
|
| 378 | if ($pos === false) { |
|
| @@ 378-396 (lines=19) @@ | ||
| 375 | } |
|
| 376 | ||
| 377 | $pos = strpos($explode[1], 'SG'); |
|
| 378 | if ($pos === false) { |
|
| 379 | $pos = strpos($explode[1], 'G'); |
|
| 380 | if (is_numeric($pos)) { |
|
| 381 | $groupValueId = (int)str_replace( |
|
| 382 | 'G', |
|
| 383 | '', |
|
| 384 | $explode[1] |
|
| 385 | ); |
|
| 386 | $secondConnection = 'group_'.$groupValueId; |
|
| 387 | $groupDrawLine[$groupValueId] = true; |
|
| 388 | } else { |
|
| 389 | // Course block (row_123 id) |
|
| 390 | if (!empty($explode[0])) { |
|
| 391 | $secondConnection = 'row_'.(int) $explode[1]; |
|
| 392 | } |
|
| 393 | } |
|
| 394 | } else { |
|
| 395 | $secondConnection = 'subgroup_'.(int)str_replace('SG', '', $explode[1]); |
|
| 396 | } |
|
| 397 | ||
| 398 | if (!empty($firstConnection) && !empty($firstConnection)) { |
|
| 399 | $connections .= self::createConnection( |
|