mirror of
https://github.com/Garmelon/PFERD.git
synced 2025-07-12 14:12:30 +02:00
Crawl custom item groups as folders
This commit is contained in:
@ -27,6 +27,7 @@ ambiguous situations.
|
|||||||
- Support for the course overview page. Using this URL as a target might cause
|
- Support for the course overview page. Using this URL as a target might cause
|
||||||
duplication warnings, as subgroups are listed separately.
|
duplication warnings, as subgroups are listed separately.
|
||||||
- Support for named capture groups in regex transforms
|
- Support for named capture groups in regex transforms
|
||||||
|
- Crawl custom item groups as folders
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Normalization of meeting names in cards
|
- Normalization of meeting names in cards
|
||||||
|
@ -817,11 +817,14 @@ class IliasPage:
|
|||||||
# ILIAS has proper accordions and weird blocks that look like normal headings,
|
# ILIAS has proper accordions and weird blocks that look like normal headings,
|
||||||
# but some JS later transforms them into an accordion.
|
# but some JS later transforms them into an accordion.
|
||||||
|
|
||||||
# This is for these weird JS-y blocks
|
# This is for these weird JS-y blocks and custom item groups
|
||||||
if "ilContainerItemsContainer" in parent.get("class"):
|
if "ilContainerItemsContainer" in parent.get("class"):
|
||||||
|
data_store_url = parent.parent.get("data-store-url", "").lower()
|
||||||
|
is_custom_item_group = "baseclass=ilcontainerblockpropertiesstoragegui" in data_store_url \
|
||||||
|
and "cont_block_id=" in data_store_url
|
||||||
# I am currently under the impression that *only* those JS blocks have an
|
# I am currently under the impression that *only* those JS blocks have an
|
||||||
# ilNoDisplay class.
|
# ilNoDisplay class.
|
||||||
if "ilNoDisplay" not in parent.get("class"):
|
if not is_custom_item_group and "ilNoDisplay" not in parent.get("class"):
|
||||||
continue
|
continue
|
||||||
prev: Tag = parent.findPreviousSibling("div")
|
prev: Tag = parent.findPreviousSibling("div")
|
||||||
if "ilContainerBlockHeader" in prev.get("class"):
|
if "ilContainerBlockHeader" in prev.get("class"):
|
||||||
|
Reference in New Issue
Block a user