/**
  * Create new media pool page
  */
 function create()
 {
     global $ilDB;
     // create page object
     parent::create();
     $this->saveInternalLinks($this->getXMLContent());
 }
 /**
  * Create new scorm 2004 with page-layout
  */
 function createWithLayoutId($a_layout_id)
 {
     include_once "./Services/Style/classes/class.ilPageLayout.php";
     //get XML Data for Layout
     $layout_obj = new ilPageLayout($a_layout_id);
     parent::setXMLContent($layout_obj->getXMLContent());
     // create page object
     parent::create();
 }
Пример #3
0
 /**
  * Create new portfolio page
  */
 function create($a_import = false)
 {
     global $ilDB;
     if (!$a_import) {
         $this->setOrderNr(self::lookupMaxOrderNr($this->portfolio_id) + 10);
     }
     $id = $ilDB->nextId("usr_portfolio_page");
     $this->setId($id);
     $fields = $this->getPropertiesForDB();
     $fields["id"] = array("integer", $id);
     $ilDB->insert("usr_portfolio_page", $fields);
     if (!$a_import) {
         parent::create();
         // $this->saveInternalLinks($this->getDomDoc());
     }
 }
 /**
  * Create new Viewdefinition
  */
 public function create()
 {
     global $ilDB;
     $id = $ilDB->nextId("il_dcl_view");
     $this->setId($id);
     $query = "INSERT INTO il_dcl_view (" . "id" . ", table_id" . ", type" . ", formtype" . " ) VALUES (" . $ilDB->quote($this->getId(), "integer") . "," . $ilDB->quote($this->getTableId(), "integer") . "," . $ilDB->quote($this->getType(), "integer") . "," . $ilDB->quote($this->getFormtype(), "integer") . ")";
     $ilDB->manipulate($query);
     parent::create();
 }
Пример #5
0
 /**
  * Create new blog posting
  */
 function create($a_import = false)
 {
     global $ilDB;
     $id = $ilDB->nextId("il_blog_posting");
     $this->setId($id);
     if (!$a_import) {
         $created = ilUtil::now();
     } else {
         $created = $this->getCreated()->get(IL_CAL_DATETIME);
     }
     // we are using a separate creation date to enable sorting without JOINs
     $query = "INSERT INTO il_blog_posting (id, title, blog_id, created, author, approved)" . " VALUES (" . $ilDB->quote($this->getId(), "integer") . "," . $ilDB->quote($this->getTitle(), "text") . "," . $ilDB->quote($this->getBlogId(), "integer") . "," . $ilDB->quote($created, "timestamp") . "," . $ilDB->quote($this->getAuthor(), "integer") . "," . $ilDB->quote(false, "integer") . ")";
     $ilDB->manipulate($query);
     if (!$a_import) {
         parent::create();
         // $this->saveInternalLinks($this->getXMLContent());
     }
 }
 /**
  * Create new extended public profile page
  */
 function create()
 {
     global $ilDB;
     $this->setOrderNr(ilExtPublicProfilePage::lookupMaxOrderNr($this->getUserId()) + 10);
     $id = $ilDB->nextId("usr_ext_profile_page");
     $this->setId($id);
     $query = "INSERT INTO usr_ext_profile_page (" . "id" . ", title" . ", user_id" . ", order_nr" . " ) VALUES (" . $ilDB->quote($this->getId(), "integer") . "," . $ilDB->quote($this->getTitle(), "text") . "," . $ilDB->quote($this->getUserId(), "integer") . "," . $ilDB->quote($this->getOrderNr(), "integer") . ")";
     $ilDB->manipulate($query);
     parent::create();
     $this->saveInternalLinks($this->getXMLContent());
 }
Пример #7
0
 /**
  * Create new wiki page
  */
 function create($a_prevent_page_creation = false)
 {
     global $ilDB;
     $id = $ilDB->nextId("il_wiki_page");
     $this->setId($id);
     $query = "INSERT INTO il_wiki_page (" . "id" . ", title" . ", wiki_id" . ", blocked" . ", rating" . " ) VALUES (" . $ilDB->quote($this->getId(), "integer") . "," . $ilDB->quote($this->getTitle(), "text") . "," . $ilDB->quote((int) $this->getWikiId(), "integer") . "," . $ilDB->quote((int) $this->getBlocked(), "integer") . "," . $ilDB->quote((int) $this->getRating(), "integer") . ")";
     $ilDB->manipulate($query);
     // create page object
     if (!$a_prevent_page_creation) {
         parent::create();
         $this->saveInternalLinks($this->getDomDoc());
         include_once "./Services/Notification/classes/class.ilNotification.php";
         ilWikiUtil::sendNotification("new", ilNotification::TYPE_WIKI, $this->getWikiRefId(), $this->getId());
     }
     $this->updateNews();
 }
 /**
  * Create new portfolio page
  */
 function create()
 {
     global $ilDB;
     $this->setOrderNr(self::lookupMaxOrderNr($this->portfolio_id) + 10);
     $id = $ilDB->nextId("usr_portfolio_page");
     $this->setId($id);
     $fields = $this->getPropertiesForDB();
     $fields["id"] = array("integer", $id);
     $ilDB->insert("usr_portfolio_page", $fields);
     parent::create();
     $this->saveInternalLinks($this->getXMLContent());
 }