[SASHA-Code] SF.net SVN: sasha:[81] trunk/SASHA/inc/lib
Brought to you by:
gphemsley
|
From: <gph...@us...> - 2010-01-20 02:43:19
|
Revision: 81
http://sasha.svn.sourceforge.net/sasha/?rev=81&view=rev
Author: gphemsley
Date: 2010-01-20 02:43:12 +0000 (Wed, 20 Jan 2010)
Log Message:
-----------
Fix bug that caused the wrong semester list to be displayed after editing a time-shifted test.
Add messages preventing the use of an edit form without specifying an item ID.
Adjust some column widths on lists.
Modified Paths:
--------------
trunk/SASHA/inc/lib/lib.assignments.php
trunk/SASHA/inc/lib/lib.schedule.php
trunk/SASHA/inc/lib/lib.tests.php
Modified: trunk/SASHA/inc/lib/lib.assignments.php
===================================================================
--- trunk/SASHA/inc/lib/lib.assignments.php 2010-01-19 21:47:11 UTC (rev 80)
+++ trunk/SASHA/inc/lib/lib.assignments.php 2010-01-20 02:43:12 UTC (rev 81)
@@ -120,6 +120,13 @@
{
global $Database, $User;
+ if( !$assignment_id )
+ {
+ print_message( 'bad', 'Please specify which assignment you want to edit.', 'Assignment ID not specified.' );
+
+ return FALSE;
+ }
+
$institution = ( $this->institution ) ? $this->institution : $this->default_institution;
$semester = ( $this->semester ) ? $this->semester : $this->default_semester;
@@ -266,7 +273,7 @@
if( !$institution_where )
{
$columns[1] = array(
- 'style' => 'width: 10%;'
+ 'style' => 'width: 7.5%;'
);
$headers[1] = array(
'content' => 'Institution'
Modified: trunk/SASHA/inc/lib/lib.schedule.php
===================================================================
--- trunk/SASHA/inc/lib/lib.schedule.php 2010-01-19 21:47:11 UTC (rev 80)
+++ trunk/SASHA/inc/lib/lib.schedule.php 2010-01-20 02:43:12 UTC (rev 81)
@@ -374,6 +374,8 @@
if( !$schedule_id )
{
+ print_message( 'bad', 'Please specify which schedule you want to edit.', 'Schedule ID not specified.' );
+
return FALSE;
}
@@ -677,7 +679,7 @@
$institution_where = ( $this->institution ) ? "AND s.institution = '{$this->institution}'" : '';
$columns[0] = array(
- 'style' => 'width: 5%;'
+ 'style' => 'width: 5%; border-right: 2px solid black;'
);
$headers[0] = array();
@@ -695,7 +697,7 @@
'style' => 'width: 10%;'
);
$headers[2] = array(
- 'content' => 'Course Number'
+ 'content' => 'Course'
);
$columns[3] = array(
Modified: trunk/SASHA/inc/lib/lib.tests.php
===================================================================
--- trunk/SASHA/inc/lib/lib.tests.php 2010-01-19 21:47:11 UTC (rev 80)
+++ trunk/SASHA/inc/lib/lib.tests.php 2010-01-20 02:43:12 UTC (rev 81)
@@ -126,6 +126,13 @@
{
global $Database, $User;
+ if( !$test_id )
+ {
+ print_message( 'bad', 'Please specify which test you want to edit.', 'Test ID not specified.' );
+
+ return FALSE;
+ }
+
$institution = ( $this->institution ) ? $this->institution : FALSE;
$semester = ( $this->semester ) ? $this->semester : $this->default_semester;
@@ -260,6 +267,20 @@
),
array(
'type' => 'hidden',
+ 'name' => 'institution',
+ 'data' => array(
+ 'value' => $institution
+ )
+ ),
+ array(
+ 'type' => 'hidden',
+ 'name' => 'semester',
+ 'data' => array(
+ 'value' => $semester
+ )
+ ),
+ array(
+ 'type' => 'hidden',
'name' => 'test_id',
'data' => array(
'value' => $test_id
@@ -295,7 +316,7 @@
if( !$institution_where )
{
$columns[1] = array(
- 'style' => 'width: 10%;'
+ 'style' => 'width: 7.5%;'
);
$headers[1] = array(
'content' => 'Institution'
@@ -329,14 +350,14 @@
);
$columns[6] = array(
- 'style' => 'width: 15%;'
+ 'style' => 'width: 12.5%;'
);
$headers[6] = array(
'content' => 'Start Time'
);
$columns[7] = array(
- 'style' => 'width: 15%;'
+ 'style' => 'width: 12.5%;'
);
$headers[7] = array(
'content' => 'End Time'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|