Commit 8ff01daa authored by François Jacquet's avatar François Jacquet
Browse files

Use DeletePrompt() & Prompt() instead of DeletePromptX() & PromptX()

Remove DeletePromptX.fnc.php files in Grades & Food_Service modules
Remove _Prompt() in Schedule.php
parent 4a53f0e2
......@@ -52,6 +52,7 @@ Changes in 2.9
- Highlight color: add CSS to HTML head in Warehouse.php
- Create school_fields_seq Sequence in rosariosis.sql & Update.fnc.php
- Add Fields (and Field Categories) functions in ProgramFunctions/Fields.fnc.php
- Use DeletePrompt() & Prompt() instead of DeletePromptX() & PromptX() program wide
Changes in 2.8.11
-----------------
......
<?php
require_once 'modules/Food_Service/includes/DeletePromptX.fnc.php';
if ( ! $_SESSION['FSA_type'])
$_SESSION['FSA_type'] = 'student';
......
......@@ -35,31 +35,25 @@ User('PROFILE')=='student'?'':DrawHeader($header);
if ( $_REQUEST['modfunc']=='delete' && AllowEdit())
{
require_once 'modules/Food_Service/includes/DeletePromptX.fnc.php';
if ( $_REQUEST['item_id']!='')
{
//FJ add translation
if (DeletePromptX(_('Transaction Item')))
if ( DeletePrompt( _( 'Transaction Item' ) ) )
{
require_once 'modules/Food_Service/includes/DeleteTransactionItem.fnc.php';
DeleteTransactionItem($_REQUEST['transaction_id'],$_REQUEST['item_id'],$_REQUEST['type']);
DBQuery('BEGIN; '.$sql1.'; '.$sql2.'; '.$sql3.'; COMMIT');
unset($_REQUEST['modfunc']);
unset($_REQUEST['delete_ok']);
unset($_SESSION['_REQUEST_vars']['modfunc']);
unset($_SESSION['_REQUEST_vars']['delete_ok']);
}
}
else
{
if (DeletePromptX(_('Transaction')))
if ( DeletePrompt( _( 'Transaction' ) ) )
{
require_once 'modules/Food_Service/includes/DeleteTransaction.fnc.php';
DeleteTransaction($_REQUEST['transaction_id'],$_REQUEST['type']);
unset($_REQUEST['modfunc']);
unset($_REQUEST['delete_ok']);
unset($_SESSION['_REQUEST_vars']['modfunc']);
unset($_SESSION['_REQUEST_vars']['delete_ok']);
}
}
}
......
<?php
require_once 'modules/Food_Service/includes/DeletePromptX.fnc.php';
require_once 'modules/Food_Service/includes/FS_Icons.inc.php';
DrawHeader(ProgramTitle());
......@@ -99,16 +97,28 @@ if ( $_REQUEST['modfunc']=='remove' && AllowEdit())
{
if ( $_REQUEST['tab_id']!='new')
{
//FJ add translation
if (DeletePromptX(_('Meal Item')))
DBQuery("DELETE FROM FOOD_SERVICE_MENU_ITEMS WHERE MENU_ID='".$_REQUEST['tab_id']."' AND MENU_ITEM_ID='".$_REQUEST['menu_item_id']."'");
if ( DeletePrompt( _( 'Meal Item' ) ) )
{
DBQuery( "DELETE FROM FOOD_SERVICE_MENU_ITEMS
WHERE MENU_ID='" . $_REQUEST['tab_id'] . "'
AND MENU_ITEM_ID='" . $_REQUEST['menu_item_id'] . "'" );
$_REQUEST['modfunc'] = false;
}
}
else
if (DeletePromptX(_('Item')))
{
if ( DeletePrompt( _( 'Item' ) ) )
{
DBQuery("DELETE FROM FOOD_SERVICE_MENU_ITEMS WHERE ITEM_ID='".$_REQUEST['item_id']."'");
DBQuery("DELETE FROM FOOD_SERVICE_ITEMS WHERE ITEM_ID='".$_REQUEST['item_id']."'");
DBQuery( "DELETE FROM FOOD_SERVICE_MENU_ITEMS
WHERE ITEM_ID='" . $_REQUEST['item_id'] . "'" );
DBQuery( "DELETE FROM FOOD_SERVICE_ITEMS
WHERE ITEM_ID='" . $_REQUEST['item_id'] . "'" );
$_REQUEST['modfunc'] = false;
}
}
}
if (empty($_REQUEST['modfunc']))
......@@ -260,11 +270,33 @@ function makeSelectInput($value,$name)
$id = 'new';
if ( $name=='ITEM_ID')
return SelectInput($value,"values[ $id ][ $name ]",'',$items_select,$id=='new'?'':false);
{
return SelectInput(
$value,
'values[' . $id . '][' . $name . ']',
'',
$items_select,
$id == 'new' ? '' : false
);
}
elseif ( $name=='CATEGORY_ID')
return SelectInput($value,"values[ $id ][ $name ]",'',$categories_select);
{
return SelectInput(
$value,
'values[' . $id . '][' . $name . ']',
'',
$categories_select
);
}
else
return SelectInput($value,"values[ $id ][ $name ]",'',$icons_select);
{
return SelectInput(
$value,
'values[' . $id . '][' . $name . ']',
'',
$icons_select
);
}
}
function makeCheckboxInput($value,$name)
......@@ -275,7 +307,15 @@ function makeCheckboxInput($value,$name)
else
$id = 'new';
return CheckboxInput($value, "values[ $id ][ $name ]", '', $value, $id=='new', button('check'), button('x'));
return CheckboxInput(
$value,
'values[' . $id . '][' . $name . ']',
'',
$value,
$id == 'new',
button( 'check' ),
button( 'x' )
);
}
function get_icons_select($path)
......
<?php
require_once 'modules/Food_Service/includes/DeletePromptX.fnc.php';
DrawHeader(ProgramTitle());
......@@ -71,20 +70,34 @@ if ( $_REQUEST['modfunc']=='remove' && AllowEdit())
{
if ( $_REQUEST['tab_id']!='new')
{
//FJ add translation
if (DeletePromptX(_('Category')))
if ( DeletePrompt( _( 'Category' ) ) )
{
DBQuery("UPDATE FOOD_SERVICE_MENU_ITEMS SET CATEGORY_ID=NULL WHERE CATEGORY_ID='".$_REQUEST['category_id']."'");
DBQuery("DELETE FROM FOOD_SERVICE_CATEGORIES WHERE CATEGORY_ID='".$_REQUEST['category_id']."'");
DBQuery( "UPDATE FOOD_SERVICE_MENU_ITEMS
SET CATEGORY_ID=NULL
WHERE CATEGORY_ID='" . $_REQUEST['category_id'] . "'" );
DBQuery( "DELETE FROM FOOD_SERVICE_CATEGORIES
WHERE CATEGORY_ID='" . $_REQUEST['category_id'] . "'" );
$_REQUEST['modfunc'] = false;
}
}
else
if (DeletePromptX(_('Meal')))
{
if ( DeletePrompt( _( 'Meal' ) ) )
{
DBQuery("DELETE FROM FOOD_SERVICE_MENU_ITEMS WHERE MENU_ID='".$_REQUEST['menu_id']."'");
DBQuery("DELETE FROM FOOD_SERVICE_CATEGORIES WHERE MENU_ID='".$_REQUEST['menu_id']."'");
DBQuery("DELETE FROM FOOD_SERVICE_MENUS WHERE MENU_ID='".$_REQUEST['menu_id']."'");
DBQuery( "DELETE FROM FOOD_SERVICE_MENU_ITEMS
WHERE MENU_ID='" . $_REQUEST['menu_id'] . "'" );
DBQuery( "DELETE FROM FOOD_SERVICE_CATEGORIES
WHERE MENU_ID='" . $_REQUEST['menu_id'] . "'" );
DBQuery( "DELETE FROM FOOD_SERVICE_MENUS
WHERE MENU_ID='" . $_REQUEST['menu_id'] . "'" );
$_REQUEST['modfunc'] = false;
}
}
}
//FJ fix SQL bug invalid sort order
......
<?php
require_once 'modules/Food_Service/includes/DeletePromptX.fnc.php';
require_once 'modules/Food_Service/includes/FS_Icons.inc.php';
......
......@@ -54,30 +54,24 @@ User('PROFILE')=='student'?'':DrawHeader($header);
if ( $_REQUEST['modfunc']=='delete' && AllowEdit())
{
require_once 'modules/Food_Service/includes/DeletePromptX.fnc.php';
if ( $_REQUEST['item_id']!='')
{
//FJ add translation
if (DeletePromptX(_('Transaction Item')))
if ( DeletePrompt( _( 'Transaction Item' ) ) )
{
require_once 'modules/Food_Service/includes/DeleteTransactionItem.fnc.php';
DeleteTransactionItem($_REQUEST['transaction_id'],$_REQUEST['item_id'],$_REQUEST['type']);
unset($_REQUEST['modfunc']);
unset($_REQUEST['delete_ok']);
unset($_SESSION['_REQUEST_vars']['modfunc']);
unset($_SESSION['_REQUEST_vars']['delete_ok']);
}
}
else
{
if (DeletePromptX(_('Transaction')))
if ( DeletePrompt( _( 'Transaction' ) ) )
{
require_once 'modules/Food_Service/includes/DeleteTransaction.fnc.php';
DeleteTransaction($_REQUEST['transaction_id'],$_REQUEST['type']);
unset($_REQUEST['modfunc']);
unset($_REQUEST['delete_ok']);
unset($_SESSION['_REQUEST_vars']['modfunc']);
unset($_SESSION['_REQUEST_vars']['delete_ok']);
}
}
}
......
......@@ -28,7 +28,9 @@ if ( $_REQUEST['modfunc']=='update')
}
}
}
if ( ! $RET || PromptX($title='Confirm',$question,$message))
if ( ! $RET
|| Prompt( 'Confirm', $question, $message ) )
{
if (is_numeric($_REQUEST['food_service']['ACCOUNT_ID']) && intval($_REQUEST['food_service']['ACCOUNT_ID'])>=0)
{
......
......@@ -9,9 +9,12 @@ if ( $_REQUEST['modfunc']=='submit')
{
if ( $_REQUEST['submit']['cancel'])
{
//FJ add translation
if (DeletePromptX(_('Sale'),_('Cancel')))
unset($_SESSION['FSA_sale']);
if ( DeletePrompt( _( 'Sale' ), _( 'Cancel' ) ) )
{
unset( $_SESSION['FSA_sale'] );
$_REQUEST['modfunc'] = false;
}
}
elseif ( $_REQUEST['submit']['save'])
{
......
......@@ -24,16 +24,12 @@ User('PROFILE')=='student'?'':DrawHeader($header);
if ( $_REQUEST['modfunc']=='delete' && AllowEdit())
{
require_once 'modules/Food_Service/includes/DeletePromptX.fnc.php';
//FJ add translation
if (DeletePromptX(_('Transaction')))
if ( DeletePrompt( _( 'Transaction' ) ) )
{
require_once 'modules/Food_Service/includes/DeleteTransaction.fnc.php';
DeleteTransaction($_REQUEST['id'],$_REQUEST['type']);
unset($_REQUEST['modfunc']);
unset($_REQUEST['delete_ok']);
unset($_SESSION['_REQUEST_vars']['modfunc']);
unset($_SESSION['_REQUEST_vars']['delete_ok']);
}
}
......
......@@ -8,9 +8,13 @@ if ( $_REQUEST['modfunc']=='update')
{
if ( $_REQUEST['submit']['delete'])
{
//FJ add translation
if (DeletePromptX(_('User Account')))
DBQuery('DELETE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID='.UserStaffID());
if ( DeletePrompt( _( 'User Account' ) ) )
{
DBQuery( "DELETE FROM FOOD_SERVICE_STAFF_ACCOUNTS
WHERE STAFF_ID='" . UserStaffID() . "'" );
$_REQUEST['modfunc'] = false;
}
//unset($_REQUEST['submit']);
}
else
......@@ -28,7 +32,7 @@ if ( $_REQUEST['modfunc']=='update')
}
else
{
$RET = DBGet(DBQuery("SELECT ACCOUNT_ID FROM FOOD_SERVICE_STUDENT_ACCOUNTS WHERE BARCODE='".trim($_REQUEST['food_service']['BARCODE']))."'");
$RET = DBGet(DBQuery("SELECT ACCOUNT_ID FROM FOOD_SERVICE_STUDENT_ACCOUNTS WHERE BARCODE='".trim($_REQUEST['food_service']['BARCODE'])."'"));
if ( $RET)
{
$student_RET = DBGet(DBQuery("SELECT s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE s.STUDENT_ID=fssa.STUDENT_ID AND fssa.ACCOUNT_ID='".$RET[1]['ACCOUNT_ID']."'"));
......@@ -37,7 +41,9 @@ if ( $_REQUEST['modfunc']=='update')
}
}
}
if ( ! $RET || PromptX($title='Confirm',$question,$message))
if ( ! $RET
|| Prompt( 'Confirm', $question, $message ) )
{
$sql = 'UPDATE FOOD_SERVICE_STAFF_ACCOUNTS SET ';
foreach ( (array) $_REQUEST['food_service'] as $column_name => $value)
......@@ -66,7 +72,11 @@ if ( $_REQUEST['modfunc']=='update')
if ( $_REQUEST['modfunc']=='create')
{
if (UserStaffID() && AllowEdit())
if ( UserStaffID()
&& AllowEdit()
&& ! DBGet( DBQuery( "SELECT 1
FROM FOOD_SERVICE_STAFF_ACCOUNTS
WHERE STAFF_ID='" . UserStaffID() . "'" ) ) )
{
$fields = 'STAFF_ID,BALANCE,TRANSACTION_ID,';
$values = "'".UserStaffID()."','0.00','0',";
......
......@@ -10,8 +10,12 @@ if ( $_REQUEST['modfunc']=='submit')
{
if ( $_REQUEST['submit']['cancel'])
{
if (DeletePromptX(_('Sale'),_('Cancel')))
unset($_SESSION['FSA_sale']);
if ( DeletePrompt( _( 'Sale' ), _( 'Cancel' ) ) )
{
unset( $_SESSION['FSA_sale'] );
$_REQUEST['modfunc'] = false;
}
}
elseif ( $_REQUEST['submit']['save'])
{
......
<?php
// example:
//
// if (DeletePrompt(_('Title')))
// {
// DBQuery("DELETE FROM BOK WHERE id='".$_REQUEST['benchmark_id']."'");
// }
function DeletePromptX($title,$action='Delete')
{
$PHP_tmp_SELF = PreparePHP_SELF($_REQUEST,array('delete_ok','delete_cancel'));
if ( ! $_REQUEST['delete_ok'] && ! $_REQUEST['delete_cancel'])
{
echo '<br />';
//FJ add translation
PopTable('header',_('Confirm').(mb_strpos($action,' ')===false?' '.($action=='Delete'?_('Delete'):$action):''));
echo '<div class="center"><h4>'.sprintf(_('Are you sure you want to %s that %s?'),($action=='Delete'?_('Delete'):$action),$title).'</h4><form action="'.$PHP_tmp_SELF.'" method="POST"><input type="submit" name="delete_ok" value="'._('OK').'"><input type="submit" name="delete_cancel" value="'._('Cancel').'"></form></div>';
PopTable('footer');
return false;
}
if ( $_REQUEST['delete_ok']) { unset($_REQUEST['delete_ok']); unset($_REQUEST['modfunc']); return true; }
if ( $_REQUEST['delete_cancel']) { unset($_REQUEST['delete_cancel']); unset($_REQUEST['modfunc']); return false; }
return false;
}
function PromptX($title='Confirm',$question='',$message='',$pdf='')
{
$PHP_tmp_SELF = PreparePHP_SELF($_REQUEST,array('delete_ok'),$pdf==true?array('_ROSARIO_PDF'=>true):array());
if ( ! $_REQUEST['delete_ok'] &&! $_REQUEST['delete_cancel'])
{
echo '<br />';
PopTable('header',$title);
echo '<div class="center"><h4>'.$question.'</h4><form action="'.$PHP_tmp_SELF.'&delete_ok=1" method="POST">'.$message.'<br /><br /><input type="submit" value="'._('OK').'"><input type="button" name="delete_cancel" value="'._('Cancel').'" onClick="javascript:history.back()"></form></div>';
PopTable('footer');
return false;
}
else
return true;
}
<?php
require_once 'modules/Grades/DeletePromptX.fnc.php';
DrawHeader( ProgramTitle() );
$_ROSARIO['allow_edit'] = ( $_REQUEST['allow_edit'] === 'Y' );
......@@ -154,9 +152,9 @@ if ( $_REQUEST['modfunc']=='update')
if ( $_REQUEST['modfunc']=='remove')
{
if (DeletePromptX($_REQUEST['tab_id']!='new'?'assignment':'assignment type'))
{
if ( $_REQUEST['tab_id']!='new')
if ( DeletePrompt( $_REQUEST['tab_id'] != 'new' ? _( 'Assignment' ) : _( 'Assignment Type' ) ) )
{
if ( $_REQUEST['tab_id'] != 'new' )
{
DBQuery("DELETE FROM GRADEBOOK_GRADES WHERE ASSIGNMENT_ID='".$_REQUEST['id']."'");
DBQuery("DELETE FROM GRADEBOOK_ASSIGNMENTS WHERE ASSIGNMENT_ID='".$_REQUEST['id']."'");
......@@ -164,6 +162,7 @@ if ( $_REQUEST['modfunc']=='remove')
else
{
$assignments_RET = DBGet(DBQuery("SELECT ASSIGNMENT_ID FROM GRADEBOOK_ASSIGNMENTS WHERE ASSIGNMENT_TYPE_ID='".$_REQUEST['id']."'"));
if (count($assignments_RET))
{
foreach ( (array) $assignments_RET as $assignment_id)
......@@ -172,13 +171,14 @@ if ( $_REQUEST['modfunc']=='remove')
DBQuery("DELETE FROM GRADEBOOK_ASSIGNMENTS WHERE ASSIGNMENT_TYPE_ID='".$_REQUEST['id']."'");
DBQuery("DELETE FROM GRADEBOOK_ASSIGNMENT_TYPES WHERE ASSIGNMENT_TYPE_ID='".$_REQUEST['id']."'");
}
unset($_REQUEST['id']);
unset($_REQUEST['modfunc']);
unset( $_REQUEST['id'] );
$_REQUEST['modfunc'] = false;
}
}
if (empty($_REQUEST['modfunc']))
{
$types_RET = DBGet(DBQuery("SELECT ASSIGNMENT_TYPE_ID,TITLE,SORT_ORDER,COLOR FROM GRADEBOOK_ASSIGNMENT_TYPES WHERE STAFF_ID='".User('STAFF_ID')."' AND COURSE_ID=(SELECT COURSE_ID FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID='".UserCoursePeriod()."') ORDER BY SORT_ORDER,TITLE"),array(),array('ASSIGNMENT_TYPE_ID'));
if ( $_REQUEST['tab_id'])
......@@ -325,17 +325,60 @@ function _makeAssnInput($value,$name)
$extra = 'size=5 maxlength=5';
}
elseif ( $name=='ASSIGNED_DATE')
return DateInput($id=='new' && Preferences('DEFAULT_ASSIGNED','Gradebook')=='Y'?DBDate():$value,"values[ $id ][ASSIGNED_DATE]",($THIS_RET['ASSIGNED_ERROR']=='Y'?'<span class="legend-red">'._('Assigned date is after end of quarter!').'</span>':($THIS_RET['DATE_ERROR']=='Y'?'<span class="legend-red">'._('Assigned date is after due date!').'</span>':'')),$id!='new');
{
return DateInput(
$id == 'new' && Preferences( 'DEFAULT_ASSIGNED', 'Gradebook' ) == 'Y' ? DBDate() : $value,
'values[' . $id . '][ASSIGNED_DATE]',
( $THIS_RET['ASSIGNED_ERROR'] == 'Y' ?
'<span class="legend-red">' . _( 'Assigned date is after end of quarter!' ) . '</span>' :
( $THIS_RET['DATE_ERROR'] == 'Y' ? '<span class="legend-red">' . _( 'Assigned date is after due date!' ) . '</span>' : '' )
),
$id != 'new'
);
}
elseif ( $name=='DUE_DATE')
return DateInput($id=='new' && Preferences('DEFAULT_DUE','Gradebook')=='Y'?DBDate():$value,"values[ $id ][DUE_DATE]",($THIS_RET['DUE_ERROR']=='Y'?'<span class="legend-red">'._('Due date is after end of quarter!').'</span>':($THIS_RET['DATE_ERROR']=='Y'?'<span class="legend-red">'._('Due date is before assigned date!').'</span>':'')),$id!='new');
{
return DateInput(
$id == 'new' && Preferences( 'DEFAULT_DUE', 'Gradebook' ) == 'Y' ? DBDate() : $value,
'values[' . $id . '][DUE_DATE]',
( $THIS_RET['DUE_ERROR'] == 'Y' ?
'<span class="legend-red">' . _( 'Due date is after end of quarter!' ) . '</span>' :
( $THIS_RET['DATE_ERROR'] == 'Y' ? '<span class="legend-red">' . _( 'Due date is before assigned date!' ) . '</span>' : '' )
),
$id != 'new'
);
}
elseif ( $name=='COURSE_ID')
return CheckboxInput($value,"values[ $id ][COURSE_ID]",'','',$id=='new');
{
return CheckboxInput(
$value,
'values[' . $id . '][COURSE_ID]',
'',
'',
$id == 'new'
);
}
elseif ( $name=='DESCRIPTION')
{
$extra = 'size=20 maxlength=1000';
}
elseif ( $name=='ASSIGNMENT_TYPE_ID')
return SelectInput($value,"values[ $id ][ASSIGNMENT_TYPE_ID]",'',$type_options,false);
{
return SelectInput(
$value,
'values[' . $id . '][ASSIGNMENT_TYPE_ID]',
'',
$type_options,
false
);
}
return TextInput($value,"values[ $id ][ $name ]",$title,$extra);
return TextInput(
$value,
'values[' . $id . '][' . $name . ']',
$title,
$extra
);
}
function _makeTypeInput($value,$name)
......@@ -364,7 +407,12 @@ function _makeTypeInput($value,$name)
elseif ( $name=='SORT_ORDER')
$extra = 'size=5 maxlength=10';
return TextInput($value,"values[ $id ][ $name ]",$title,$extra);
return TextInput(
$value,
'values[' . $id . '][' . $name . ']',
$title,
$extra
);
}
......
<?php
// example:
//
// if (($dp=DeletePrompt(_('Title')))
// // OK
// DBQuery("DELETE FROM BOK WHERE id='".$_REQUEST['benchmark_id']."'");
// elseif ( $dp==false)
// // Cancel
//
function DeletePromptX($title,$action='Delete')
{
$PHP_tmp_SELF = PreparePHP_SELF($_REQUEST,array('delete_ok','delete_cancel'));
if ( ! $_REQUEST['delete_ok'] && ! $_REQUEST['delete_cancel'])
{
echo '<br />';
//FJ add translation
PopTable('header',_('Confirm').(mb_strpos($action,' ')===false?' '.($action=='Delete'?_('Delete'):$action):''));
echo '<div class="center"><h4>'.sprintf(_('Are you sure you want to %s that %s?'),($action=='Delete'?_('Delete'):$action),$title).'</h4><form action="'.$PHP_tmp_SELF.'" method="POST"><input type="submit" name="delete_ok" value="'._('OK').'"><input type="submit" name="delete_cancel" value="'._('Cancel').'"></form></div>';
PopTable('footer');
return '';
}
if ( $_REQUEST['delete_ok'])
{
unset($_REQUEST['delete_ok']);
unset($_REQUEST['modfunc']);
return true;
}
unset($_REQUEST['delete_cancel']);
unset($_REQUEST['modfunc']);
return false;
}
<?php
include 'modules/Grades/DeletePromptX.fnc.php';
DrawHeader(ProgramTitle());
if ( $_REQUEST['modfunc']=='update')
......@@ -58,11 +57,15 @@ if ( $_REQUEST['modfunc']=='update')
if ( $_REQUEST['modfunc']=='remove')
{
//FJ add translation
if (DeletePromptX(_('History Marking Period')))
if ( DeletePrompt( _( 'History Marking Period' ) ) )
{
DBQuery("DELETE FROM history_marking_periods WHERE MARKING_PERIOD_ID='".$_REQUEST['id']."'");
DBQuery("DELETE FROM student_report_card_grades WHERE MARKING_PERIOD_ID='".$_REQUEST['id']."'");
DBQuery( "DELETE FROM history_marking_periods
WHERE MARKING_PERIOD_ID='" . $_REQUEST['id'] . "'" );
DBQuery( "DELETE FROM student_report_card_grades
WHERE MARKING_PERIOD_ID='" . $_REQUEST['id'] . "'" );
$_REQUEST['modfunc'] = false;
}
}
......@@ -125,35 +128,57 @@ function makeTextInput($value,$name)
// $extra = 'size=5 maxlength=5';
// else
if ( $name=='NAME')
$extra = 'size=20 maxlength=25';
else
$extra = 'size=10 maxlength=10';
return TextInput($value,"values[ $id ][ $name ]",'',$extra);