Browse Source

[svn r13518] Removing learnpath link from homepage (unpublishing) when deleting path

Yannick Warnier 17 years ago
parent
commit
39a6d8a4f9
1 changed files with 1 additions and 0 deletions
  1. 1 0
      main/newscorm/learnpath.class.php

+ 1 - 0
main/newscorm/learnpath.class.php

@@ -763,6 +763,7 @@ class learnpath {
     	$sql_del_view = "DELETE FROM $lp_view WHERE lp_id = ".$this->lp_id;
     	$sql_del_view = "DELETE FROM $lp_view WHERE lp_id = ".$this->lp_id;
     	//if($this->debug>2){error_log('New LP - Deleting views bound to lp '.$this->lp_id.': '.$sql_del_view,0);}
     	//if($this->debug>2){error_log('New LP - Deleting views bound to lp '.$this->lp_id.': '.$sql_del_view,0);}
     	$res_del_view = api_sql_query($sql_del_view);
     	$res_del_view = api_sql_query($sql_del_view);
+	$this->toggle_publish($this->lp_id,'i');
     	//if($this->debug>2){error_log('New LP - Deleting lp '.$this->lp_id.' of type '.$this->type,0);}
     	//if($this->debug>2){error_log('New LP - Deleting lp '.$this->lp_id.' of type '.$this->type,0);}
     	if($this->type == 2 OR $this->type==3){
     	if($this->type == 2 OR $this->type==3){
     		//this is a scorm learning path, delete the files as well
     		//this is a scorm learning path, delete the files as well