function createLO(LOId $loId)
 {
     // get the id of the section in Moodle
     $id = Intuitel::getIDFactory()->getIdfromLoId($loId);
     $cm = block_intuitel_get_cm($id);
     if ($cm == false) {
         throw new UnknownLOException();
     } else {
         $courseinfo = get_fast_modinfo(block_intuitel_get_cm($id)->course);
         $cm_info = $courseinfo->get_cm($id);
         //set the data of the object from Moodle internal data
         $LOModule = $this->createLOFromNative($cm_info);
         return $LOModule;
     }
 }
function block_intuitel_generateHtmlModuleLink($cmid)
{
    global $PAGE;
    // TODO: this markup works only with modules
    $cm = block_intuitel_get_cm($cmid);
    $courseinfo = get_fast_modinfo($cm->course);
    $cm_info = $courseinfo->get_cm($cmid);
    $ids[] = $cmid;
    if ($cm_info->modname == 'label') {
        //continue; // ignore label in the case LORE recommends one (illegally because Mapping won't report them.)
        $module_link = "";
    } else {
        $module_link = $PAGE->get_renderer('core', 'course')->course_section_cm_name($cm_info);
    }
    return $module_link;
}