[scu-smp] r284 committed - * Make the 'expired' field in the search required...

0 views
Skip to first unread message

scu...@googlecode.com

unread,
Oct 12, 2010, 2:14:47 AM10/12/10
to scu...@googlegroups.com
Revision: 284
Author: sid.moradi
Date: Mon Oct 11 23:13:58 2010
Log: * Make the 'expired' field in the search required
* Make the 'matched' and 'trained' fields optional (only add to criteria if
they are selected).
http://code.google.com/p/scu-smp/source/detail?r=284

Modified:
/trunk/smp-php/smp/command/mentee/ListAllMenteeCommand.php
/trunk/smp-php/smp/command/mentor/ListAllMentorCommand.php

=======================================
--- /trunk/smp-php/smp/command/mentee/ListAllMenteeCommand.php Fri Oct 8
00:07:33 2010
+++ /trunk/smp-php/smp/command/mentee/ListAllMenteeCommand.php Mon Oct 11
23:13:58 2010
@@ -11,11 +11,14 @@
require_once('smp/service/MenteeService.php');
require_once('smp/domain/Student.php');
require_once('smp/base/SessionRegistry.php');
+
class smp_command_mentee_ListAllMenteeCommand extends smp_command_Command {
function doExecute(smp_controller_Request $request) {
$menteeService = new smp_service_MenteeService();

$mentee = new smp_domain_Mentee();
+ $mentee->setExpired(false);
+
smp_base_SessionRegistry::setSearchEntity('mentee_ListAllMentee_MenteeSearch',
$mentee);
if($request->isPost()){
$student = new smp_domain_Student();
$student->setFirstname($request->getProperty('firstname'));
@@ -24,10 +27,9 @@
$student->setGender($request->getProperty('gender'));
$student->setCourseId($request->getProperty('courseId'));
$student->setStudyMode($request->getProperty('studyMode'));
- $mentee->setExpired((is_null($request->getProperty('expired')) ? null :
true));
+ $mentee->setExpired((is_null($request->getProperty('expired')) ?
false : true));
$mentee->setMatched((is_null($request->getProperty('matched')) ? null :
true));

-
$mentee->setStudent($student);

smp_base_SessionRegistry::setSearchEntity('mentee_ListAllMentee_MenteeSearch',
$mentee);
}
@@ -40,7 +42,6 @@
}else{
$datagrid = $menteeService->getAllMenteeDatagrid($mentee, false);
}
-

$request->setDatagrid($datagrid);
$request->setTitle("List of Mentees");
=======================================
--- /trunk/smp-php/smp/command/mentor/ListAllMentorCommand.php Sat Oct 2
00:51:21 2010
+++ /trunk/smp-php/smp/command/mentor/ListAllMentorCommand.php Mon Oct 11
23:13:58 2010
@@ -10,12 +10,15 @@
require_once('smp/service/MentorService.php');
require_once('smp/domain/Student.php');
require_once('smp/base/SessionRegistry.php');
+
class smp_command_mentor_ListAllMentorCommand extends smp_command_Command {

function doExecute(smp_controller_Request $request) {
$mentorService = new smp_service_MentorService();

$mentor = new smp_domain_Mentor();
+ $mentor->setExpired(false);
+
smp_base_SessionRegistry::setSearchEntity('mentor_ListAllMentor_MentorSearch',
$mentor);
if ($request->isPost()) {
$student = new smp_domain_Student();
$student->setFirstname($request->getProperty('firstname'));
@@ -24,7 +27,7 @@
$student->setGender($request->getProperty('gender'));
$student->setCourseId($request->getProperty('courseId'));
$student->setStudyMode($request->getProperty('studyMode'));
- $mentor->setExpired((is_null($request->getProperty('expired')) ? null :
true));
+ $mentor->setExpired((is_null($request->getProperty('expired')) ?
false : true));
$mentor->setMatched((is_null($request->getProperty('matched')) ? null :
true));
$mentor->setTrained((is_null($request->getProperty('trained')) ? null :
true));

@@ -36,7 +39,7 @@

$outputFormat = $request->getProperty('output_format');
if (is_null($outputFormat)) {
- $datagrid = $mentorService->getAllMentorDatagrid($mentor, true);
+ $datagrid = $mentorService->getAllMentorDatagrid($mentor);
} else {
$datagrid = $mentorService->getAllMentorDatagrid($mentor, false);
}

Reply all
Reply to author
Forward
0 new messages