making tests work
This commit is contained in:
parent
69a997aff9
commit
9c2980404f
10 changed files with 35 additions and 62 deletions
|
|
@ -35,7 +35,6 @@ reorganizeAdSpaceProperties($session);
|
|||
addSubscribableAspect( $session );
|
||||
addFeaturedPageWiki( $session );
|
||||
fixEmptyCalendarIcalFeeds( $session );
|
||||
addEMSSubmission( $session );
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -119,60 +118,7 @@ sub fixEmptyCalendarIcalFeeds {
|
|||
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
[
|
||||
#----------------------------------------------------------------------------
|
||||
# Add tables for the EMS Submission feature
|
||||
sub addEMSSubmission {
|
||||
my $session = shift;
|
||||
print "\tAdding EMS Submission feature..." unless $quiet;
|
||||
|
||||
$session->db->write( <<'ESQL' );
|
||||
CREATE TABLE EMSSubmissionForm (
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
nextSubmissionId INT,
|
||||
canSubmitGroupId CHAR(22) BINARY,
|
||||
daysBeforeCleanup INT,
|
||||
deleteCreatedItems INT(1),
|
||||
formDescription TEXT,
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
ESQL
|
||||
|
||||
$session->db->write( <<'ESQL' );
|
||||
CREATE TABLE EMSSubmission (
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
submissionId INT NOT NULL,
|
||||
price FLOAT,
|
||||
seatsAvailable INT,
|
||||
startDate DATETIME,
|
||||
duration FLOAT,
|
||||
eventNumber INT,
|
||||
location CHAR(100),
|
||||
relatedBadgeGroups MEDIUMTEXT,
|
||||
relatedRibbons MEDIUMTEXT,
|
||||
eventMetaData MEDIUMTEXT,
|
||||
sendEmailOnChange INT(1),
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
ESQL
|
||||
|
||||
$session->db->write( q{ ALTER TABLE EventManagementSystem
|
||||
ADD COLUMN eventSubmissionTemplateId CHAR(22) BINARY; });
|
||||
|
||||
$session->db->write( q{ ALTER TABLE EventManagementSystem
|
||||
ADD COLUMN viewEventSubmissionQueueTemplateId CHAR(22) BINARY; });
|
||||
|
||||
$session->db->write( q{ ALTER TABLE EventManagementSystem
|
||||
ADD COLUMN editEventSubmissionTemplateId CHAR(22) BINARY; });
|
||||
|
||||
$session->db->write( q{ ALTER TABLE EventManagementSystem
|
||||
ADD COLUMN eventSubmissionGroups MEDIUMTEXT; });
|
||||
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
]
|
||||
#----------------------------------------------------------------------------
|
||||
# Add the column for featured wiki pages
|
||||
sub addFeaturedPageWiki {
|
||||
|
|
|
|||
|
|
@ -545,6 +545,7 @@ sub getEditTabs {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getQueueUrl
|
||||
|
||||
returns the URL for the submission queue page with the submisison id in the hash part
|
||||
|
|
|
|||
|
|
@ -385,6 +385,7 @@ sub getFormDescription {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getQueueUrl
|
||||
|
||||
returns the URL for the submission queue page with the submisison id in the hash part
|
||||
|
|
@ -465,6 +466,7 @@ asset instances, you will need to purge them here.
|
|||
=head2 purgeRevision ( )
|
||||
|
||||
This method is called when data is purged by the system.
|
||||
|
||||
=cut
|
||||
|
||||
#sub purgeRevision { # my $self = shift;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ use Tie::IxHash;
|
|||
use Data::Dumper;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 addGroupToSubmitList ( groupId )
|
||||
|
||||
adds the parameter to eventSubmissionGroups
|
||||
|
|
@ -54,6 +55,7 @@ sub addGroupToSubmitList {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 addSubmissionForm
|
||||
|
||||
creates a child of class WG::Asset::EMSSubmissionForm
|
||||
|
|
@ -101,6 +103,7 @@ sub addSubmissionForm {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 canSubmit
|
||||
|
||||
returns true is the current user can submit to any form attached to this EMS
|
||||
|
|
@ -494,6 +497,7 @@ sub getRibbons {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getSubmissionLocations
|
||||
|
||||
retuns an arrayref of the locations found in the submission location list
|
||||
|
|
@ -571,6 +575,7 @@ sub getTokens {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 hasSubmissionForms
|
||||
|
||||
returns true if the EMS has subission forms attached
|
||||
|
|
@ -587,6 +592,7 @@ sub hasSubmissionForms {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 hasSubmissions
|
||||
|
||||
returns true if the current user has submission forms in this EMS
|
||||
|
|
@ -793,7 +799,6 @@ sub www_addSubmission {
|
|||
$session->http->setMimeType( 'text/html' );
|
||||
}
|
||||
my $content = '<h1>' . $title . '</h1><ul>' . $listOfLinks . '</ul>' ;
|
||||
use lib '/root/pb/lib'; use dav; dav::log $content;
|
||||
if( $asJson ) {
|
||||
return JSON->new->encode( { text => $content, title => $title, id => 'list' . rand } );
|
||||
} else {
|
||||
|
|
@ -2656,6 +2661,7 @@ sub www_viewSchedule {
|
|||
}
|
||||
|
||||
#---------------------------------------------
|
||||
|
||||
=head2 www_viewSubmissionQueue
|
||||
|
||||
=cut
|
||||
|
|
|
|||
|
|
@ -68,13 +68,10 @@ See WebGUI::Workflow::Activity::execute() for details.
|
|||
|
||||
=cut
|
||||
|
||||
use lib '/root/pb/lib'; use dav;
|
||||
|
||||
sub execute {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $root = WebGUI::Asset->getRoot($session);
|
||||
dav::log __PACKAGE__ . " executing\n";
|
||||
|
||||
# keep track of how much time it's taking
|
||||
my $start = time;
|
||||
|
|
@ -86,7 +83,6 @@ dav::log __PACKAGE__ . " executing\n";
|
|||
} );
|
||||
|
||||
for my $emsForm ( @$list ) {
|
||||
dav::log __PACKAGE__ . "::executing::emsForm loop\n";
|
||||
my $daysBeforeCleanup = $emsForm->get('daysBeforeCleanup') ;
|
||||
next if ! $daysBeforeCleanup;
|
||||
my $whereClause = q{ submissionStatus='denied' };
|
||||
|
|
@ -101,7 +97,6 @@ dav::log __PACKAGE__ . "::executing::emsForm loop\n";
|
|||
whereClause => $whereClause,
|
||||
} );
|
||||
for my $submission ( @$res ) {
|
||||
dav::log __PACKAGE__ . "::executing::submission loop\n";
|
||||
$submission->purge;
|
||||
$limit--;
|
||||
return $self->WAITING(1) if ! $limit or time > $start + $timeLimit;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ our $I18N = { ##hashref of hashes
|
|||
context => q|Message used to notify user when someone else changes their event submission.|
|
||||
},
|
||||
|
||||
'edit asset' => {
|
||||
message => q|Edit Asset|,
|
||||
lastUpdated => 1131394072,
|
||||
context => q|The label for the default edit page.|
|
||||
},
|
||||
|
||||
# 'TODO' => {
|
||||
# message => q|TODO|,
|
||||
# lastUpdated => 1131394072,
|
||||
|
|
|
|||
|
|
@ -99,6 +99,12 @@ our $I18N = { ##hashref of hashes
|
|||
context => q|Remind the registrar to allow at least one field to be editted by the event submitter.|
|
||||
},
|
||||
|
||||
'edit form' => {
|
||||
message => q|Edit Form|,
|
||||
lastUpdated => 1131394072,
|
||||
context => q|The label for the default edit form.|
|
||||
},
|
||||
|
||||
# 'TODO' => {
|
||||
# message => q|TODO|,
|
||||
# lastUpdated => 1131394072,
|
||||
|
|
|
|||
|
|
@ -2267,6 +2267,12 @@ normal templates.|,
|
|||
context => q|Field Label|,
|
||||
},
|
||||
|
||||
'new form' => {
|
||||
message => q|New Form|,
|
||||
lastUpdated => 1147050475,
|
||||
context => q|The label for the link to create a new submission form.|,
|
||||
},
|
||||
|
||||
# 'TODO' => {
|
||||
# message => q|TODO|,
|
||||
# lastUpdated => 1147050475,
|
||||
|
|
|
|||
|
|
@ -340,6 +340,12 @@ $templateMock->mock('process', sub { $templateVars = $_[1]; } );
|
|||
'tokenInstructions' => ignore(),
|
||||
'printableStyleTemplateId' => ignore(),
|
||||
'ticketInstructions' => ignore(),
|
||||
'eventSubmissionGroups' => ignore(),
|
||||
'eventSubmissionMainTemplateId' => ignore(),
|
||||
'eventSubmissionQueueTemplateId' => ignore(),
|
||||
'eventSubmissionTemplateId' => ignore(),
|
||||
'nextSubmissionId' => ignore(),
|
||||
'submittedLocationsList' => ignore(),
|
||||
'tickets_loop' => \@ticketArray,
|
||||
},
|
||||
"www_printRemainingTickets: template variables valid"
|
||||
|
|
|
|||
|
|
@ -72,8 +72,7 @@ sub create {
|
|||
my $tag = WebGUI::VersionTag->getWorking($session);
|
||||
$tag->commit;
|
||||
WebGUI::Test->tagsToRollback($tag);
|
||||
# WebGUI::Test->assetsToPurge($instance,$workflow); -- does not work...
|
||||
push @cleanup, $instance, $workflow,
|
||||
WebGUI::Test->workflowsToDelete($instance,$workflow);
|
||||
|
||||
return bless { instance => $instance,
|
||||
session => $session,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue