Odd Extensions of a function

You may change 
the right endpoint L of the interval [0, L],
the function definition, 
the number of terms to be calculated in the Fourier sine series, 
and the maximum number of periods to show.

Clear[f,L, numTerms, numPeriods];
f[t_] := t /; 0 <= t < 1
f[t_] := t^2+2 /;1 <= t < 3/2
f[t_] := (2 - t) /; 3/2 <= t <= 3
L=3;
numTerms = 10;
numPeriods = 5;


Clear[b];
Table[b[n]=2/L NIntegrate[f[x]Sin[n π x/L],{x,0,L}],{n,1,numTerms}];
Clear[PartialSineSum,t,n,m]
PartialSineSum[t_,m_]:=  Sum[b[n] Sin[n π t/L],{n,1,m}]
Print["A partial sum for the Fourier sine series"]
PartialSineSum[t,numTerms]
Plot[{PartialSineSum[t,numTerms],f[t]},{t,0,L},PlotStyle->{Blue,{Red,Thickness[0.01]}}, PlotLabel->"Original f in red, fit by the partial Fourier series"]
Clear[fOddPeriodic,x];
fOddPeriodic[x_]:= f[x] /;(0≤x<L)
fOddPeriodic[x_]:=-f[-x] /;(-L≤x < 0)
fOddPeriodic[x_]:= fOddPeriodic[x-2*L * Sign[x]]/; ((x <-L)||(x >L ))
Manipulate[Plot[{fOddPeriodic[t],PartialSineSum[t,n]},{t,-r*L,r*L}],{{n,4,"number of series terms"},1,numTerms,1},{{r,2,"number of periods"},1,numPeriods,1}]