예제 #1
0
 $author = $_REQUEST['lp_author'];
 // Fixing the author name (no body or html tags).
 $auth_init = stripos($author, '<p>');
 if ($auth_init === false) {
     $auth_init = stripos($author, '<body>');
     $auth_end = $auth_init + stripos(substr($author, $auth_init + 6), '</body>') + 7;
     $len = $auth_end - $auth_init + 6;
 } else {
     $auth_end = strripos($author, '</p>');
     $len = $auth_end - $auth_init + 4;
 }
 $author_fixed = substr($author, $auth_init, $len);
 //$author_fixed = $author;
 $learnPath->set_author($author_fixed);
 // TODO (as of Chamilo 1.8.8): Check in the future whether this field is needed.
 $learnPath->set_encoding($_REQUEST['lp_encoding']);
 if (isset($_REQUEST['lp_maker'])) {
     $learnPath->set_maker($_REQUEST['lp_maker']);
 }
 if (isset($_REQUEST['lp_proximity'])) {
     $learnPath->set_proximity($_REQUEST['lp_proximity']);
 }
 $learnPath->set_theme($_REQUEST['lp_theme']);
 if (isset($_REQUEST['hide_toc_frame']) && $_REQUEST['hide_toc_frame'] == 1) {
     $hide_toc_frame = $_REQUEST['hide_toc_frame'];
 } else {
     $hide_toc_frame = null;
 }
 $learnPath->set_hide_toc_frame($hide_toc_frame);
 $learnPath->set_prerequisite($_REQUEST['prerequisites']);
 $learnPath->set_use_max_score($_REQUEST['use_max_score']);