|
@ -81,15 +81,19 @@ function obtemCampoCustomizadoCurso($idCurso, $nomeCampo) { |
|
|
"; |
|
|
"; |
|
|
|
|
|
|
|
|
$valueArray = $DB->get_record_sql($sql, [$idCurso, $nomeCampo]); |
|
|
$valueArray = $DB->get_record_sql($sql, [$idCurso, $nomeCampo]); |
|
|
$value = $valueArray->value; |
|
|
|
|
|
$options = $valueArray->options; |
|
|
|
|
|
|
|
|
|
|
|
if($options == null) { |
|
|
if($valueArray) { |
|
|
return $value; |
|
|
$value = $valueArray->value; |
|
|
|
|
|
$options = $valueArray->options; |
|
|
|
|
|
|
|
|
|
|
|
if($options == null) { |
|
|
|
|
|
return $value; |
|
|
|
|
|
} else { |
|
|
|
|
|
$optionsArray = preg_split("/\s*\n\s*/", trim($options)); |
|
|
|
|
|
return $optionsArray[$value-1]; |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
return ''; |
|
|
$optionsArray = preg_split("/\s*\n\s*/", trim($options)); |
|
|
|
|
|
return $optionsArray[$value-1]; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|