-when delete a wiki, delete all discussion and mailcue too
-fix switch button notify discuss changes
-fix correct order date of recent changes
-by now, not copy individual assignment in student page
@ -811,12 +811,14 @@ if ($_GET['action']=='delete')
if ($_GET['delete'] == 'yes')
{
$sql='DELETE FROM '.$tbl_wiki.' WHERE reflink="'.html_entity_decode(Database::escape_string(stripslashes(urldecode($page)))).'" AND '.$groupfilter.' ORDER BY id DESC';
api_sql_query($sql,__FILE__,__LINE__);
$sql='DELETE '.$tbl_wiki_discuss.' FROM '.$tbl_wiki.', '.$tbl_wiki_discuss.' WHERE '.$tbl_wiki.'.reflink="'.html_entity_decode(Database::escape_string(stripslashes(urldecode($page)))).'" AND '.$tbl_wiki.'.'.$groupfilter.' AND '.$tbl_wiki_discuss.'.publication_id='.$tbl_wiki.'.id';
api_sql_query($sql,__FILE__,__LINE__);
$sql='DELETE '.$tbl_wiki_mailcue.' FROM '.$tbl_wiki.', '.$tbl_wiki_mailcue.' WHERE '.$tbl_wiki.'.reflink="'.html_entity_decode(Database::escape_string(stripslashes(urldecode($page)))).'" AND '.$tbl_wiki.'.'.$groupfilter.' AND '.$tbl_wiki_mailcue.'.id='.$tbl_wiki.'.id';
api_sql_query($sql,__FILE__,__LINE__);
////
//here TODO: delete discussion and mailcue too
///
$sql='DELETE FROM '.$tbl_wiki.' WHERE reflink="'.html_entity_decode(Database::escape_string(stripslashes(urldecode($page)))).'" AND '.$groupfilter.'';
api_sql_query($sql,__FILE__,__LINE__);
check_emailcue(0, 'E');
@ -1505,7 +1507,8 @@ if ($_GET['action']=='recentchanges')
$_POST['content']='<divalign="center"style="font-size:24px; background-color: #F5F8FB; border:double">'.$photo.get_lang('Student').': '.$name.'</div>[['.$link2teacher.' | '.get_lang('AssignmentLinktoTeacherPage').']] '; //If $content_orig_B is added here, the task written by the professor was copied to the page of each student. TODO: config options