diff --git a/main/wiki/index.php b/main/wiki/index.php
index 163ad800f4..b2599aa9fd 100644
--- a/main/wiki/index.php
+++ b/main/wiki/index.php
@@ -1808,20 +1808,17 @@ function display_new_wiki_form()
if(api_is_allowed_to_edit() || api_is_platform_admin())
{
- //by now only on wiki course
- $_clean['group_id']=(int)$_SESSION['_gid'];
- if($_clean['group_id']==0)
- {
+
+ $_clean['group_id']=(int)$_SESSION['_gid']; // TODO: check if delete ?
+
echo ' '.get_lang('DefineAssignmentPage').' '; // 1= teacher 2 =student
- //by now turned off
-
+ //by now turned off
//echo'
';
//echo ' '.get_lang('StartDate').': (yyyy-mm-dd hh:mm:ss)'; //by now turned off
//echo ' '.get_lang('EndDate').': (yyyy-mm-dd hh:mm:ss)'; //by now turned off
//echo ' '.get_lang('AllowLaterSends').' '; //by now turned off
- //echo'
';
- }
+ //echo'';
}
echo ' ';
echo '
';
@@ -2656,7 +2653,7 @@ function check_emailcue($id_or_ref, $type)
$sql='SELECT * FROM '.$tbl_wiki_mailcue.'WHERE id="'.$id.'" AND type="'.$type.'" OR type="F" AND group_id="'.$_clean['group_id'].'"'; //type: P=page, D=discuss, F=full.
$result=api_sql_query($sql,__LINE__,__FILE__);
- $emailtext=get_lang('EmailWikipageModified').' '.$email_page_name.' '.get_lang('OfWiki');
+ $emailtext=get_lang('EmailWikipageModified').' '.$email_page_name.' '.get_lang('Wiki');
}
}
@@ -2680,7 +2677,7 @@ function check_emailcue($id_or_ref, $type)
$sql='SELECT * FROM '.$tbl_wiki_mailcue.'WHERE id="'.$id.'" AND type="'.$type.'" OR type="F" AND group_id="'.$_clean['group_id'].'"'; //type: P=page, D=discuss, F=full
$result=api_sql_query($sql,__LINE__,__FILE__);
- $emailtext=get_lang('EmailWikiPageDiscAdded').' '.$email_page_name.' '.get_lang('OfWiki');
+ $emailtext=get_lang('EmailWikiPageDiscAdded').' '.$email_page_name.' '.get_lang('Wiki');
}
}
elseif($type=='A')
@@ -2695,13 +2692,19 @@ function check_emailcue($id_or_ref, $type)
$email_page_name=$row['title'];
- if(!$row['assignment']==0)
+ if($row['assignment']==0)
{
- $email_assignment=get_lang('AssignmentDescExtra').' ('.get_lang('AssignmentMode').')';
+ $allow_send_mail=true;
}
-
-
- $allow_send_mail=true;
+ elseif($row['assignment']==1)
+ {
+ $email_assignment=get_lang('AssignmentDescExtra').' ('.get_lang('AssignmentMode').')';
+ $allow_send_mail=true;
+ }
+ elseif($row['assignment']==2)
+ {
+ $allow_send_mail=false; //Mode tasks: avoids notifications to all users about all users
+ }
$sql='SELECT * FROM '.$tbl_wiki_mailcue.'WHERE id="'.$id.'" AND type="F" AND group_id="'.$_clean['group_id'].'"'; //type: P=page, D=discuss, F=full
$result=api_sql_query($sql,__LINE__,__FILE__);