Really dont use this copy
This commit is contained in:
parent
c4f939f306
commit
e81accaa15
3 changed files with 36 additions and 14 deletions
|
|
@ -18,7 +18,7 @@ sub new{
|
|||
}
|
||||
|
||||
$self->{text} = $self->{text} || '';
|
||||
$self->{title} = $self->{title} || '';
|
||||
$self->{title} = $self->{title} || 'New Section';
|
||||
$self->{parent} = $parent;
|
||||
$self->{questionsPerPage} = $self->{questionsPerPage} || 5;
|
||||
$self->{questionsOnSectionPage} = $self->{questionsOnSectionPage} || 1;
|
||||
|
|
@ -106,8 +106,9 @@ sub getQuestion{
|
|||
|
||||
sub freeze{
|
||||
my $self = shift;
|
||||
$self->{parent} = undef;
|
||||
|
||||
my %temp = %{$self};
|
||||
$temp{parent} = undef;
|
||||
$temp{questions} = [];
|
||||
foreach(@{$self->{questions}}){
|
||||
push(@{$temp{questions}}, $_->freeze());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue