Esempio n. 1
0
     $content_formatting = 2;
 }
 $head = addslashes($head);
 $content_info['title'] = addslashes($content_info['title']);
 $content_info['test_message'] = addslashes($content_info['test_message']);
 //if this file is a test_xml, create a blank page instead, for imscc.
 if (preg_match('/((.*)\\/)*tests\\_[0-9]+\\.xml$/', $content_info['href']) || preg_match('/imsqti\\_(.*)/', $content_info['type'])) {
     $content = '';
 } else {
     $content = addslashes($content);
 }
 //check for content_type
 if ($content_formatting != CONTENT_TYPE_WEBLINK) {
     $content_folder_type = $content == '' ? CONTENT_TYPE_FOLDER : CONTENT_TYPE_CONTENT;
 }
 $items[$item_id]['real_content_id'] = $contentDAO->Create($course_id, intval($content_parent_id), $content_info['ordering'] + $my_offset - $lti_offset[$content_info['parent_content_id']] + 1, $last_modified, 0, $content_formatting, "", $content_info['new_path'], $content_info['title'], $content, $head, 1, $content_info['test_message'], 0, $content_folder_type);
 //	$sql= 'INSERT INTO '.TABLE_PREFIX.'content'
 //	      . '(course_id,
 //	          content_parent_id,
 //	          ordering,
 //	          last_modified,
 //	          revision,
 //	          formatting,
 //	          head,
 //	          use_customized_head,
 //	          keywords,
 //	          content_path,
 //	          title,
 //	          text,
 //			  test_message,
 //			  content_type)