mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-33523: Fixed item C of the issue
This commit is contained in:
parent
42642f6c35
commit
7547946580
@ -620,15 +620,23 @@ class cc2moodle {
|
||||
$array_index++;
|
||||
|
||||
if ($item->nodeName == "item") {
|
||||
$identifierref = '';
|
||||
if ($item->hasAttribute('identifierref')) {
|
||||
$identifierref = $item->getAttribute('identifierref');
|
||||
}
|
||||
|
||||
$identifierref = $xpath->query('@identifierref', $item);
|
||||
$identifierref = !empty($identifierref->item(0)->nodeValue) ? $identifierref->item(0)->nodeValue : '';
|
||||
|
||||
$title = $xpath->query('imscc:title', $item);
|
||||
$title = !empty($title->item(0)->nodeValue) ? $title->item(0)->nodeValue : '';
|
||||
$title = '';
|
||||
$titles = $xpath->query('imscc:title', $item);
|
||||
if ($titles->length > 0) {
|
||||
$title = $titles->item(0)->nodeValue;
|
||||
}
|
||||
|
||||
$cc_type = $this->get_item_cc_type($identifierref);
|
||||
$moodle_type = $this->convert_to_moodle_type($cc_type);
|
||||
//Fix the label issue - MDL-33523
|
||||
if (empty($identifierref) && empty($title)) {
|
||||
$moodle_type = TYPE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
elseif ($item->nodeName == "resource") {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user