| @@ 6552-6591 (lines=40) @@ | ||
| 6549 | $arrHide = array ( |
|
| 6550 | $id |
|
| 6551 | ); |
|
| 6552 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 6553 | if ($action != 'add') { |
|
| 6554 | if ( |
|
| 6555 | ( |
|
| 6556 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 6557 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 6558 | $arrLP[$i]['item_type'] == 'dir' |
|
| 6559 | ) && |
|
| 6560 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 6561 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 6562 | ) { |
|
| 6563 | $selectParent->addOption( |
|
| 6564 | $arrLP[$i]['title'], |
|
| 6565 | $arrLP[$i]['id'], |
|
| 6566 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 6567 | ); |
|
| 6568 | ||
| 6569 | if ($parent == $arrLP[$i]['id']) { |
|
| 6570 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 6571 | } |
|
| 6572 | } else { |
|
| 6573 | $arrHide[] = $arrLP[$i]['id']; |
|
| 6574 | } |
|
| 6575 | } else { |
|
| 6576 | if ( |
|
| 6577 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 6578 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 6579 | $arrLP[$i]['item_type'] == 'dir' |
|
| 6580 | ) { |
|
| 6581 | $selectParent->addOption( |
|
| 6582 | $arrLP[$i]['title'], |
|
| 6583 | $arrLP[$i]['id'], ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 6584 | ); |
|
| 6585 | ||
| 6586 | if ($parent == $arrLP[$i]['id']) { |
|
| 6587 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 6588 | } |
|
| 6589 | } |
|
| 6590 | } |
|
| 6591 | } |
|
| 6592 | if (is_array($arrLP)) { |
|
| 6593 | reset($arrLP); |
|
| 6594 | } |
|
| @@ 6970-7002 (lines=33) @@ | ||
| 6967 | ); |
|
| 6968 | ||
| 6969 | //$parent_item_id = $_SESSION['parent_item_id']; |
|
| 6970 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 6971 | if ($action != 'add') { |
|
| 6972 | if (($arrLP[$i]['item_type'] == 'dokeos_module' || $arrLP[$i]['item_type'] == 'dokeos_chapter' || $arrLP[$i]['item_type'] == 'dir') && !in_array($arrLP[$i]['id'], $arrHide) && !in_array($arrLP[$i]['parent_item_id'], $arrHide)) { |
|
| 6973 | $selectParent->addOption( |
|
| 6974 | $arrLP[$i]['title'], |
|
| 6975 | $arrLP[$i]['id'], |
|
| 6976 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 6977 | ); |
|
| 6978 | ||
| 6979 | if ($parent == $arrLP[$i]['id']) { |
|
| 6980 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 6981 | } |
|
| 6982 | } else { |
|
| 6983 | $arrHide[] = $arrLP[$i]['id']; |
|
| 6984 | } |
|
| 6985 | } else { |
|
| 6986 | if ( |
|
| 6987 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 6988 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 6989 | $arrLP[$i]['item_type'] == 'dir' |
|
| 6990 | ) { |
|
| 6991 | $selectParent->addOption( |
|
| 6992 | $arrLP[$i]['title'], |
|
| 6993 | $arrLP[$i]['id'], |
|
| 6994 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 6995 | ); |
|
| 6996 | ||
| 6997 | if ($parent == $arrLP[$i]['id']) { |
|
| 6998 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 6999 | } |
|
| 7000 | } |
|
| 7001 | } |
|
| 7002 | } |
|
| 7003 | if (is_array($arrLP)) { |
|
| 7004 | reset($arrLP); |
|
| 7005 | } |
|
| @@ 7163-7203 (lines=41) @@ | ||
| 7160 | $id |
|
| 7161 | ); |
|
| 7162 | ||
| 7163 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 7164 | if ($action != 'add') { |
|
| 7165 | if ( |
|
| 7166 | ( |
|
| 7167 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 7168 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 7169 | $arrLP[$i]['item_type'] == 'dir' |
|
| 7170 | ) && |
|
| 7171 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 7172 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 7173 | ) { |
|
| 7174 | $selectParent->addOption( |
|
| 7175 | $arrLP[$i]['title'], |
|
| 7176 | $arrLP[$i]['id'], |
|
| 7177 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 7178 | ); |
|
| 7179 | ||
| 7180 | if ($parent == $arrLP[$i]['id']) { |
|
| 7181 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7182 | } |
|
| 7183 | } else { |
|
| 7184 | $arrHide[] = $arrLP[$i]['id']; |
|
| 7185 | } |
|
| 7186 | } else { |
|
| 7187 | if ( |
|
| 7188 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 7189 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 7190 | $arrLP[$i]['item_type'] == 'dir' |
|
| 7191 | ) { |
|
| 7192 | $selectParent->addOption( |
|
| 7193 | $arrLP[$i]['title'], |
|
| 7194 | $arrLP[$i]['id'], |
|
| 7195 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 7196 | ); |
|
| 7197 | ||
| 7198 | if ($parent == $arrLP[$i]['id']) { |
|
| 7199 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7200 | } |
|
| 7201 | } |
|
| 7202 | } |
|
| 7203 | } |
|
| 7204 | ||
| 7205 | if ($arrLP != null) { |
|
| 7206 | reset($arrLP); |
|
| @@ 7929-7965 (lines=37) @@ | ||
| 7926 | ||
| 7927 | $parent_item_id = isset($_SESSION['parent_item_id']) ? $_SESSION['parent_item_id'] : 0; |
|
| 7928 | ||
| 7929 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 7930 | if ($action != 'add') { |
|
| 7931 | if ( |
|
| 7932 | ( |
|
| 7933 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 7934 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 7935 | $arrLP[$i]['item_type'] == 'dir' |
|
| 7936 | ) && |
|
| 7937 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 7938 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 7939 | ) { |
|
| 7940 | $selectParent->addOption( |
|
| 7941 | $arrLP[$i]['title'], |
|
| 7942 | $arrLP[$i]['id'], |
|
| 7943 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px;'] |
|
| 7944 | ); |
|
| 7945 | ||
| 7946 | if ($parent == $arrLP[$i]['id']) { |
|
| 7947 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7948 | } |
|
| 7949 | } else { |
|
| 7950 | $arrHide[] = $arrLP[$i]['id']; |
|
| 7951 | } |
|
| 7952 | } else { |
|
| 7953 | if ($arrLP[$i]['item_type'] == 'dokeos_module' || $arrLP[$i]['item_type'] == 'dokeos_chapter' || $arrLP[$i]['item_type'] == 'dir') { |
|
| 7954 | $selectParent->addOption( |
|
| 7955 | $arrLP[$i]['title'], |
|
| 7956 | $arrLP[$i]['id'], |
|
| 7957 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 7958 | ); |
|
| 7959 | ||
| 7960 | if ($parent_item_id == $arrLP[$i]['id']) { |
|
| 7961 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7962 | } |
|
| 7963 | } |
|
| 7964 | } |
|
| 7965 | } |
|
| 7966 | ||
| 7967 | if (is_array($arrLP)) { |
|
| 7968 | reset($arrLP); |
|
| @@ 8139-8178 (lines=40) @@ | ||
| 8136 | $id |
|
| 8137 | ); |
|
| 8138 | ||
| 8139 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 8140 | if ($action != 'add') { |
|
| 8141 | if ( |
|
| 8142 | ( |
|
| 8143 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 8144 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 8145 | $arrLP[$i]['item_type'] == 'dir' |
|
| 8146 | ) && |
|
| 8147 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 8148 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 8149 | ) { |
|
| 8150 | $parentSelect->addOption( |
|
| 8151 | $arrLP[$i]['title'], |
|
| 8152 | $arrLP[$i]['id'], |
|
| 8153 | ['style' => 'padding-left: ' . (($arrLP[$i]['depth'] * 10) + 20) . 'px;'] |
|
| 8154 | ); |
|
| 8155 | ||
| 8156 | if ($parent == $arrLP[$i]['id']) { |
|
| 8157 | $parentSelect->setSelected($arrLP[$i]['id']); |
|
| 8158 | } |
|
| 8159 | } else { |
|
| 8160 | $arrHide[] = $arrLP[$i]['id']; |
|
| 8161 | } |
|
| 8162 | } else { |
|
| 8163 | if ( |
|
| 8164 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 8165 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || $arrLP[$i]['item_type'] == 'dir' |
|
| 8166 | ) { |
|
| 8167 | $parentSelect->addOption( |
|
| 8168 | $arrLP[$i]['title'], |
|
| 8169 | $arrLP[$i]['id'], |
|
| 8170 | ['style' => 'padding-left: ' . (($arrLP[$i]['depth'] * 10) + 20) . 'px;'] |
|
| 8171 | ); |
|
| 8172 | ||
| 8173 | if ($parent == $arrLP[$i]['id']) { |
|
| 8174 | $parentSelect->setSelected($arrLP[$i]['id']); |
|
| 8175 | } |
|
| 8176 | } |
|
| 8177 | } |
|
| 8178 | } |
|
| 8179 | ||
| 8180 | if (is_array($arrLP)) { |
|
| 8181 | reset($arrLP); |
|