MAJ V2.0.1

This commit is contained in:
pablo rodriguez 2024-06-25 21:13:22 +02:00
parent b2e0966f5f
commit cbec0bd63d
47 changed files with 3038 additions and 130 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
<ListesEtudiants date="2024-06-25T16:14:59" version="V2.0.1"></ListesEtudiants>

1
bin/.gitignore vendored
View File

@ -13,3 +13,4 @@
/actions/
/baseEtudiants/
/baseListesEtudiants/
/accueillChargeEvaluation.svg

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,671 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:export-ydpi="128"
inkscape:export-xdpi="128"
inkscape:export-filename="accueilChargeEvaluation.png"
sodipodi:docname="accueillChargeEvaluation.svg"
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
id="svg8"
version="1.1"
viewBox="0 0 153.45833 19.422661"
height="73.408485"
width="580"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2">
<linearGradient
id="k"
gradientTransform="matrix(7.99974,0,0,7.9977797,-873.96742,-7808.7674)"
gradientUnits="userSpaceOnUse"
x1="122.75008"
x2="111.74973"
xlink:href="#b"
y1="991.62115"
y2="977.11713" />
<linearGradient
id="b">
<stop
offset="0"
stop-color="#0369a3"
id="stop7" />
<stop
offset="1"
stop-color="#1c99e0"
id="stop9" />
</linearGradient>
<linearGradient
id="j"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
y1="122"
y2="6">
<stop
offset="0"
stop-color="#e6e6e6"
id="stop35" />
<stop
offset="1"
stop-color="#fff"
id="stop37" />
</linearGradient>
<linearGradient
id="i"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
xlink:href="#b"
y1="130"
y2="14" />
<linearGradient
id="h"
gradientTransform="matrix(4.4999,0,0,3.66665,-942.97741,2199.6564)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-581.63782"
y2="-578.63782">
<stop
offset="0"
stop-color="#63bbee"
id="stop29" />
<stop
offset="1"
stop-color="#aadcf7"
id="stop31" />
</linearGradient>
<linearGradient
id="g"
gradientTransform="matrix(-4.19983,0,0,3.9111,1540.9405,-4523.1636)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="a">
<stop
offset="0"
stop-color="#666"
id="stop2" />
<stop
offset="1"
stop-color="#333"
id="stop4" />
</linearGradient>
<linearGradient
id="f"
gradientTransform="matrix(4.19983,0,0,3.9111,-1392.9394,-4521.9436)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="e"
gradientTransform="matrix(1.19997,0,0,1.22222,-281.19161,858.5534)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-629.66907"
y2="-635.54944">
<stop
offset="0"
stop-color="#18a303"
id="stop22" />
<stop
offset="1"
stop-color="#106802"
id="stop24" />
</linearGradient>
<linearGradient
id="d"
gradientTransform="matrix(4.19983,0,0,3.9111,-1392.9394,-4517.0536)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="1173"
y2="1178">
<stop
offset="0"
stop-color="#0369a3"
id="stop17" />
<stop
offset="1"
stop-color="#023f62"
id="stop19" />
</linearGradient>
<linearGradient
id="c"
gradientTransform="matrix(0,0.791084,-1.28,0,1499.6005,-282.0136)"
gradientUnits="userSpaceOnUse"
x1="445.69522"
x2="441.38797"
y1="1103.5776"
y2="1099.8198">
<stop
offset="0"
stop-color="#e9b913"
id="stop12" />
<stop
offset="1"
stop-color="#ff0"
id="stop14" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1534"
id="linearGradient1536"
x1="-28.89456"
y1="79.43959"
x2="-28.613434"
y2="168.68048"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.09818993,0,0,0.09818993,82.930549,72.849121)" />
<linearGradient
inkscape:collect="always"
id="linearGradient1534">
<stop
style="stop-color:#faff12;stop-opacity:1;"
offset="0"
id="stop1530" />
<stop
style="stop-color:#493d00;stop-opacity:1;"
offset="1"
id="stop1532" />
</linearGradient>
<linearGradient
id="b-8"
gradientUnits="userSpaceOnUse"
x1="546"
x2="458"
xlink:href="#linearGradient5"
y1="121.99995"
y2="5.9999499" />
<linearGradient
id="linearGradient5">
<stop
offset="0"
stop-color="#18a303"
id="stop3"
style="stop-color:#064501;stop-opacity:1;" />
<stop
offset="1"
stop-color="#43c330"
id="stop5" />
</linearGradient>
<linearGradient
id="c-0"
gradientUnits="userSpaceOnUse"
x1="532.39862"
x2="497.16809"
y1="109.3368"
y2="83.932327">
<stop
offset="0"
stop-color="#727272"
id="stop8" />
<stop
offset="1"
stop-color="#9a9a9a"
id="stop10"
style="stop-color:#111111;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="d-8"
gradientTransform="matrix(0.948718,0,0,1.3,-288.38576,1491.7273)"
gradientUnits="userSpaceOnUse"
x1="829.36053"
x2="829.36053"
y1="-1064.7994"
y2="-1082.3413">
<stop
offset="0"
stop-color="#e4e4e4"
id="stop13" />
<stop
offset="1"
stop-color="#f9f9f9"
id="stop15" />
</linearGradient>
<linearGradient
id="e-7"
gradientTransform="matrix(0.714286,0,0,-1.55555,125.07024,-1571.1037)"
gradientUnits="userSpaceOnUse"
x1="525.63947"
x2="525.63947"
y1="-1078.6444"
y2="-1068.7872">
<stop
offset="0"
stop-color="#63bbee"
id="stop18" />
<stop
offset="1"
stop-color="#aadcf7"
id="stop20" />
</linearGradient>
<linearGradient
id="f-2"
gradientUnits="userSpaceOnUse"
x1="512.65552"
x2="512.65552"
y1="95.0298"
y2="85.998596">
<stop
offset="0"
stop-color="#a33e03"
id="stop23" />
<stop
offset="1"
stop-color="#c15414"
id="stop25" />
</linearGradient>
<linearGradient
id="g-8"
gradientTransform="matrix(0.714286,0,0,-2.11111,133.07024,-2170.0637)"
gradientUnits="userSpaceOnUse"
x1="525.63947"
x2="525.63947"
y1="-1078.6444"
y2="-1068.7872">
<stop
offset="0"
stop-color="#f09e6f"
id="stop28" />
<stop
offset="1"
stop-color="#f9cfb5"
id="stop30" />
</linearGradient>
<linearGradient
id="h-0"
gradientTransform="matrix(0.714286,0,0,-0.888884,141.07024,-852.34365)"
gradientUnits="userSpaceOnUse"
x1="525.63947"
x2="525.63947"
y1="-1078.6444"
y2="-1068.7872">
<stop
offset="0"
stop-color="#f5ce53"
id="stop33" />
<stop
offset="1"
stop-color="#fde9a9"
id="stop35-8" />
</linearGradient>
<linearGradient
id="i-0"
gradientTransform="matrix(0.714286,0,0,-1.33333,149.07024,-1331.5137)"
gradientUnits="userSpaceOnUse"
x1="525.63947"
x2="525.63947"
y1="-1078.6444"
y2="-1068.7872">
<stop
offset="0"
stop-color="#8ee780"
id="stop38" />
<stop
offset="1"
stop-color="#ccf4c6"
id="stop40" />
</linearGradient>
</defs>
<sodipodi:namedview
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1009"
inkscape:window-width="1920"
lock-margins="true"
units="px"
fit-margin-bottom="2"
fit-margin-right="2"
fit-margin-left="2"
fit-margin-top="2"
inkscape:guide-bbox="true"
showguides="true"
inkscape:snap-global="true"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="36.731822"
inkscape:cx="290"
inkscape:zoom="2.2051724"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:pagecheckerboard="0"
inkscape:snap-midpoints="true"
inkscape:snap-intersection-paths="true"
inkscape:snap-smooth-nodes="true"
inkscape:object-paths="true"
inkscape:snap-page="true"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1">
<sodipodi:guide
id="guide1680"
orientation="0,-1"
position="13.656766,8.3376239"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-32.182092,-47.463663)"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Calque 1">
<rect
style="fill:none;stroke:none;stroke-width:0.148;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke;stop-color:#000000"
id="rect4845"
width="66.024391"
height="16.182283"
x="31.987135"
y="46.825306" />
<text
xml:space="preserve"
style="font-size:7.05556px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;stroke-width:0.192132"
x="68.585175"
y="58.318031"
id="text835"><tspan
sodipodi:role="line"
id="tspan833"
x="68.585175"
y="58.318031"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05556px;font-family:Pacifico;-inkscape-font-specification:Pacifico;stroke-width:0.192132">Base de données des évaluations</tspan></text>
<g
id="g1624"
transform="matrix(0.06830722,0,0,0.06834751,66.869843,21.962391)"
style="stroke-width:1.17108">
<g
transform="matrix(3.4017825,0,0,3.4017825,-95.08183,-189.09441)"
id="g884"
style="stroke-width:1.64491;stroke-miterlimit:4;stroke-dasharray:none">
<rect
style="fill:#00ff00;fill-rule:evenodd;stroke:#000000;stroke-width:1.64491;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect880"
width="38.433739"
height="35.890331"
x="37.868542"
y="83.64991"
ry="2.5985754"
rx="2.5985754" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:6.57951;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
d="M 71.512572,88.41099 60.11298,113.78783 43.185151,105.76978 55.59032,107.11953 Z"
id="path882"
sodipodi:nodetypes="ccccc" />
</g>
<path
style="fill:#ffaaaa;stroke:#ffaaaa;stroke-width:3.76712px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 62.421182,83.450948 53.247834,73.396095 c -3.269201,-0.03495 -6.108773,-0.739553 -11.152516,1.99147 -5.59384,4.292817 -8.281453,7.910846 -10.664708,11.458206 -2.148177,4.173122 -1.698608,7.124368 -1.216677,10.060391 l 9.74404,9.259068 z"
id="path1605"
sodipodi:nodetypes="ccccccc" />
<path
transform="matrix(1.315503,-0.76811157,0.73918702,1.366979,-196.76404,56.095615)"
id="path903"
d="m 142.61305,103.6418 9.43978,-0.5287 c 1.19321,12.05269 -3.29434,12.95393 3.79047,36.57198"
style="fill:none;stroke:#686868;stroke-width:4.57259;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:nodetypes="ccc" />
<g
id="g901"
style="stroke-width:1.40817;stroke-miterlimit:4;stroke-dasharray:none"
transform="matrix(1.3484552,-0.70866904,0.67747724,1.3985899,-192.46008,42.858566)">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.40817;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 165.60421,210.25518 -16.67346,-14.97786 19.49947,-6.49982 z"
id="path886" />
<path
style="fill:#ffcc00;stroke:#000000;stroke-width:1.40817;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 148.93075,195.27732 -29.6731,-89.58453 19.78207,-6.217222 29.3905,89.301932 z"
id="path888"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#cccccc;stroke:#000000;stroke-width:1.40817;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 119.25765,105.69279 19.78206,-6.217223 5.18467,15.184943 -20.19347,6.3466 z"
id="path896"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#000000;stroke:none;stroke-width:1.40817;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 165.60421,210.25518 1.82913,-13.90142 c -1.86721,0.41019 -1.24071,5.14178 -2.26609,5.73964 -0.90416,0.52717 -2.9307,-2.35026 -4.06786,-2.12548 -1.70014,0.33605 2.39156,6.64425 -1.96215,4.47795 z"
id="path1247"
sodipodi:nodetypes="ccsscc" />
</g>
</g>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.88056px;line-height:1.2;font-family:Pacifico;-inkscape-font-specification:Pacifico;stroke-width:0.264583"
x="49.323338"
y="63.859547"
id="text2437"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.88056px;font-family:Pacifico;-inkscape-font-specification:Pacifico;stroke-width:0.264583"
x="49.323338"
y="63.859547"
id="tspan2649">Double cliquer sur une évaluation pour la charger en mémoire et l'utiliser. </tspan></text>
<g
id="g1"
transform="translate(-32.132254,-30.801938)">
<path
id="path482"
style="fill:url(#linearGradient1536);fill-opacity:1;stroke:#000000;stroke-width:0.1;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stop-color:#000000"
d="m 78.401561,79.528246 c -0.290575,-5.6e-5 -0.580011,0.0058 -0.744515,0.01762 -1.674954,0.120793 -3.07793,0.607358 -3.741201,1.297741 -0.179854,0.187206 -0.319986,0.413789 -0.365966,0.591483 -0.03555,0.137396 -0.03729,0.382023 -0.0035,0.508426 0.141412,0.529309 0.718879,1.023291 1.607327,1.375264 0.709807,0.281203 1.431434,0.432901 2.522491,0.530574 0.300575,0.02691 1.203303,0.02313 1.532323,-0.0065 0.647419,-0.05839 1.113997,-0.131007 1.58568,-0.246663 0.23376,-0.05732 0.739083,-0.218504 0.876404,-0.279383 0.05218,-0.02313 0.12489,-0.0537 0.161085,-0.06796 0.143449,-0.05652 0.463101,-0.229588 0.635783,-0.343816 0.859819,-0.568754 1.062231,-1.288268 0.544669,-1.937548 -0.59406,-0.745246 -2.089784,-1.295748 -3.860001,-1.421072 -0.168493,-0.01193 -0.459981,-0.01807 -0.750556,-0.01812 z m -4.852688,3.03746 0.03876,1.765394 c 0.690578,2.364617 8.827042,2.381749 9.701349,0 v -1.765394 c -1.159872,2.476537 -8.648281,2.645781 -9.740109,0 z m 0.01712,2.313585 0.03876,1.765391 c 0.690578,2.364617 8.826539,2.38175 9.700845,0 v -1.765391 c -1.159871,2.476534 -8.647777,2.645781 -9.739605,0 z m -0.0589,2.104174 0.03876,1.76489 c 0.690578,2.364615 8.826539,2.381746 9.700846,0 v -1.76489 c -1.159872,2.476534 -8.647778,2.645781 -9.739607,0 z" />
<g
id="g2"
transform="matrix(0.07295087,0,0,0.07295087,79.638774,78.030901)"
style="stroke-width:13.7079">
<path
id="path2"
style="fill:#ffffff;stroke-width:13.7079"
d="m 21.865234,93.074219 c -2.649137,0.0052 -5.408577,0.995832 -7.062811,3.138694 -1.474513,1.692578 -1.869354,3.983317 -2.087738,6.147877 -0.200684,1.27858 -0.339875,2.62536 -0.630701,3.85405 -0.576018,0.41044 -1.00776,-0.45239 -1.513789,-0.65962 -2.3255267,-1.61965 -4.5235107,-3.53096 -7.2436664,-4.46342 -0.5463124,-0.33456 -1.1195005,-0.39616 -1.7208618,-0.17161 -1.17772603,0.26295 -2.42421629,0.33274 -3.4443113,1.04211 -2.2166431,1.32943 -3.954892,3.3028 -5.8063872,5.07952 -2.3890443,2.39763 -4.7782743,4.79507 -7.1674683,7.19256 2.4986,3.22171 5.050318,6.40541 7.318349,9.79736 0.3498265,0.38709 0.8687285,1.14204 0.1600917,1.38358 -2.7092567,0.50247 -5.5003487,0.74506 -8.1091247,1.66356 -0.891086,0.44931 -1.903659,0.77309 -2.716772,1.30353 -0.690605,1.51374 -1.709949,2.92399 -1.849517,4.62626 -0.375907,3.84385 -0.08154,7.71518 -0.08318,11.57009 0.02502,1.60786 0.05005,3.21572 0.07507,4.82358 4.273971,0.73002 8.548047,1.45908 12.8222655,2.1875 0.45525,0.53061 -0.039937,0.93945 -0.3580637,1.37488 -1.4367602,2.12158 -3.1681858,4.09429 -4.1674708,6.47376 -0.449725,1.36654 -0.586262,2.84443 -0.243087,4.25043 0.54406,2.78952 2.7915241,4.74222 4.6902669,6.68035 2.6374871,2.64548 5.2824577,5.28406 7.9221046,7.92762 3.6590253,-2.54087 7.3216855,-5.07648 10.9726565,-7.62891 0.725168,0.0766 0.518452,0.88836 0.680863,1.40829 0.646654,3.9808 1.326064,7.95599 1.992965,11.93351 5.015271,-0.0327 10.033864,0.07 15.046985,-0.0622 1.994629,-0.0652 3.981491,-0.77081 5.46426,-2.11512 0.690073,-0.73352 1.350026,-1.48777 1.723026,-2.43745 0.717926,-1.62351 0.823812,-3.44606 1.205807,-5.16932 0.211602,-1.13706 0.411632,-2.27619 0.612656,-3.41515 0.58334,-0.47487 1.02313,0.32557 1.526808,0.55841 3.300442,2.32603 6.61772,4.62822 9.924364,6.94549 3.657459,-3.71057 7.447199,-7.29448 10.990021,-11.1157 1.168955,-1.41244 2.033659,-3.04959 3.072479,-4.55813 -1.078139,-2.11771 -1.973414,-4.34479 -3.429827,-6.24383 -1.010497,-1.46205 -2.068137,-2.90515 -3.089704,-4.34991 0.110185,-0.72059 1.025963,-0.44356 1.547024,-0.65533 2.312577,-0.46136 4.680003,-0.73513 6.935951,-1.4265 0.988576,-0.44182 1.869678,-1.04144 2.645952,-1.79585 0.733359,-0.82661 1.359131,-1.77455 1.699697,-2.8382 0.817024,-2.51405 0.468341,-5.20359 0.556141,-7.80327 10e-7,-3.3276 0,-6.6552 0,-9.98281 -4.417246,-0.72219 -8.812435,-1.43123 -13.224609,-2.1582 -0.43359,-0.59868 0.399819,-1.05347 0.629571,-1.57681 2.307376,-3.27769 4.616698,-6.55429 6.925117,-9.83139 -3.517477,-3.47234 -6.942948,-7.04078 -10.530101,-10.44079 -1.753291,-1.61198 -4.144211,-2.65842 -6.550717,-2.36537 -2.678776,0.21589 -4.785074,2.08466 -6.894545,3.56399 -0.773903,0.56097 -1.539714,1.133 -2.309794,1.6992 -0.736981,-0.12491 -0.473393,-1.03104 -0.675357,-1.57368 -0.654246,-3.86799 -1.331991,-7.731963 -1.996518,-11.598198 -4.744695,-0.05165 -9.489958,-0.185991 -14.234375,-0.189453 z m 4.054688,39.468751 c 2.322448,0.0463 4.286975,1.93304 5.009518,4.0534 0.997363,2.72123 -0.398104,5.99878 -3.020059,7.21489 -1.756908,1.08652 -4.045771,0.88403 -5.753359,-0.1983 -1.368038,-0.88231 -2.534012,-2.29159 -2.822038,-3.92155 -0.114427,-1.49111 -0.145658,-3.11323 0.796786,-4.37285 1.024159,-1.6186 2.818868,-2.92873 4.810098,-2.78255 0.326401,-0.0173 0.652615,0.001 0.979054,0.007 z" />
<path
id="path331"
style="fill:#000000;stroke-width:13.7079"
d="m 22.24355,100.31754 c -2.16709,0.0446 -2.00947,0.47209 -2.28203,2.61948 -0.2513,1.9798 -1.1936,7.70028 -1.35909,8.25066 -0.0809,0.26891 -0.83739,0.67928 -1.9079,1.03508 -0.97551,0.32422 -2.60384,0.98702 -3.61838,1.47277 -1.01454,0.48576 -1.96936,0.88315 -2.12183,0.88315 -0.15247,0 -1.3462198,-0.7714 -2.6530698,-1.7141 -1.30684,-0.94269 -3.24438,-2.34168 -4.30568,-3.10886 -1.0613,-0.76718 -2.07333,-1.42707 -2.24896,-1.46657 -0.17562,-0.0395 -1.80331999,1.41609 -3.61683,3.23494 l -3.29696,3.30729 0.56792,0.73329 c 0.31256,0.4035 1.14168,1.56524 1.84227,2.58124 0.7006,1.016 1.89890001,2.73021 2.66288001,3.80958 0.76398,1.07939 1.38906999,2.10646 1.38906999,2.28255 0,0.17608 -0.35158999,0.97903 -0.78134999,1.78439 -0.42976,0.80536 -1.09858,2.42433 -1.48621,3.5972 l -0.70487001,2.13217 -1.35806,0.27491 c -0.74695,0.15119 -3.19222,0.56788 -5.43377,0.92605 -2.2415702,0.35818 -4.1789902,0.75491 -4.3056902,0.8816 -0.12666,0.1267 -0.19751,2.3005 -0.15761,4.83071 l 0.0724,4.60075 2.64584,0.45062 c 1.4552002,0.248 3.9456702,0.67265 5.5345402,0.94361 l 2.88923,0.49248 0.71365,2.10943 c 0.39261001,1.1601 1.10081001,2.86538 1.57355001,3.78943 0.96829999,1.89274 0.97306999,1.86325 -0.7214,4.17236 -2.30874001,3.14616 -4.19257001,5.81456 -4.52738001,6.41304 -0.34613,0.61871 -0.24371,0.75518 2.94349,3.9424 l 3.30161,3.30212 2.34869,-1.63142 c 1.29164,-0.89728 3.36021,-2.34014 4.59714,-3.20601 1.23693,-0.86587 2.3672298,-1.57457 2.5114698,-1.5751 0.14423,-4.4e-4 1.09674,0.40506 2.11667,0.90072 1.01994,0.49565 2.65213,1.16465 3.62769,1.48674 l 1.77405,0.58549 0.27337,1.35754 c 0.15045,0.74661 0.45686,2.48863 0.68058,3.87108 0.22373,1.38244 0.54177,3.31721 0.70693,4.29948 l 0.30024,1.78594 h 4.71496 c 4.67543,0 4.71629,-0.005 4.84311,-0.59532 0.26715,-1.24345 1.44797,-7.80139 1.65261,-9.17773 l 0.21395,-1.43815 2.51354,-0.95912 c 1.38244,-0.52732 3.01502,-1.21924 3.62769,-1.53789 1.44221,-0.7501 1.78728,-0.73107 2.94865,0.16226 0.53026,0.40788 2.55426,1.85255 4.4974,3.21014 l 3.53312,2.46807 3.2799,-3.27215 c 1.80401,-1.79968 3.27991,-3.35891 3.27991,-3.46491 0,-0.106 -1.33946,-2.05152 -2.97656,-4.32376 -1.63711,-2.27225 -3.12216,-4.33367 -3.30006,-4.5806 -0.26785,-0.37178 -0.17206,-0.74346 0.55604,-2.16214 0.48359,-0.94227 1.15858,-2.54651 1.50016,-3.56516 0.34157,-1.01864 0.71843,-1.98573 0.83768,-2.14922 0.11925,-0.16349 0.84001,-0.37699 1.60145,-0.47439 1.18359,-0.15143 7.28724,-1.23984 9.12348,-1.62678 0.5903,-0.12442 0.59531,-0.16437 0.59531,-4.84053 v -4.71496 l -1.78594,-0.29249 c -0.98227,-0.16097 -3.33375,-0.54499 -5.22552,-0.85317 -1.89178,-0.30817 -3.65962,-0.64619 -3.92844,-0.75086 -0.31247,-0.12167 -0.75606,-0.9627 -1.23042,-2.33164 -0.40809,-1.17771 -1.10834,-2.83661 -1.55598,-3.6866 -0.74109,-1.4072 -0.77885,-1.59333 -0.42116,-2.08308 0.21606,-0.29582 0.59844,-0.83561 0.85008,-1.19941 0.25164,-0.3638 1.57822,-2.25104 2.94762,-4.19354 l 2.48977,-3.53157 -3.30884,-3.30884 c -3.20998,-3.20997 -3.32908,-3.29856 -3.96565,-2.95072 -0.64496,0.35241 -1.88495,1.23869 -5.96346,4.26175 -1.12925,0.83702 -2.31155,1.5916 -2.62723,1.6769 -0.36565,0.0988 -1.27794,-0.18069 -2.51354,-0.76998 -1.06676,-0.50876 -2.71333,-1.20866 -3.65921,-1.55546 l -1.71979,-0.63045 -0.32247,-1.97352 c -0.17748,-1.08541 -0.60095,-3.58086 -0.94051,-5.5454 l -0.61701,-3.57187 -4.68654,-0.0724 c -1.34093,-0.0207 -2.32189,-0.0485 -3.04426,-0.0336 z m 2.97708,24.95403 c 1.42863,-0.003 2.85026,0.13423 3.75274,0.4129 3.93775,1.21587 6.99884,4.02981 8.56176,7.87032 1.99612,4.90503 0.84677,10.51015 -2.92903,14.28595 -1.73713,1.73712 -4.60482,3.28861 -6.84868,3.70468 h -5.1e-4 c -2.99403,0.55517 -5.47675,0.20617 -8.34213,-1.17202 -3.23597,-1.55644 -5.88353,-4.66933 -6.97477,-8.20002 -0.57672,-1.86612 -0.54611,-5.6998 0.0605,-7.56181 1.39405,-4.27939 4.77072,-7.65133 8.92401,-8.91108 0.93161,-0.28258 2.36752,-0.42587 3.79615,-0.42892 z" />
</g>
<path
sodipodi:type="star"
style="font-variation-settings:normal;vector-effect:none;fill:#d4aa00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.402246;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000"
id="path3"
inkscape:flatsided="false"
sodipodi:sides="5"
sodipodi:cx="-98.100731"
sodipodi:cy="-25.582302"
sodipodi:r1="8.0950813"
sodipodi:r2="4.0475407"
sodipodi:arg1="0.8593372"
sodipodi:arg2="1.4876557"
inkscape:rounded="0"
inkscape:randomized="0"
d="m -92.815132,-19.451007 -4.949471,-2.097735 -4.533997,2.888018 0.46559,-5.355463 -4.14775,-3.41964 5.23723,-1.212123 1.970544,-5.001471 2.771189,4.60633 5.365614,0.32856 -3.524536,4.058991 z"
transform="matrix(0.2029661,0.13505998,-0.19994791,0.17145193,93.169915,99.336272)" />
</g>
<g
id="g21"
inkscape:label="Logo"
transform="matrix(0.69606728,0,0,0.69606728,33.42347,16.811906)">
<g
transform="matrix(0.2200885,0,0,0.21482291,-70.978396,36.994978)"
id="g105">
<g
id="g2-0"
transform="matrix(1.0898443,0,0,1.0898443,-42.136972,-9.5233151)">
<path
d="m 469,53.998 v 2 8 2 8 2 8 2 8 2 8 2 h 60 v -2 -50 h -58 z"
fill="url(#b)"
id="path53"
style="fill:url(#b-8)" />
<g
fill="#92e285"
id="g61"
style="fill:#ffff00">
<path
d="m 470.99924,55.99855 h 17 v 8 h -17 z"
id="path55"
style="fill:#ffff00" />
<path
d="m 489.99748,55.99855 h 17.99994 v 8 h -17.99994 z"
id="path57"
style="fill:#ffff00" />
<path
d="m 509.99924,55.99855 h 17 v 8 h -17 z"
id="path59"
style="fill:#ffff00" />
</g>
<g
fill="#ccf4c6"
id="g81">
<path
d="m 470.99924,65.99855 h 17 v 8 h -17 z"
id="path63" />
<path
d="m 509.99924,65.99855 h 17 v 8 h -17 z"
id="path65" />
<path
d="m 489.99748,75.99855 h 17.99994 v 8 h -17.99994 z"
id="path67" />
<path
d="m 509.99924,75.99855 h 17 v 8 h -17 z"
id="path69" />
<path
d="m 470.99924,75.99855 h 17 v 8 h -17 z"
id="path71" />
<path
d="m 489.99748,85.99855 h 17.99994 v 8 h -17.99994 z"
id="path73" />
<path
d="m 470.99924,85.99855 h 17 v 8 h -17 z"
id="path75" />
<path
d="m 489.99748,95.99855 h 17.99994 v 8 h -17.99994 z"
id="path77" />
<path
d="m 470.99924,95.99855 h 17 v 8 h -17 z"
id="path79" />
<path
d="m 509.99924,86.085049 h 17 v 8 h -17 z"
id="path2-0" />
<path
d="m 509.87618,95.41506 h 17 v 8 h -17 z"
id="path3-4" />
</g>
<path
d="m 489.99748,65.99855 h 17.99994 v 8 h -17.99994 z"
fill="#ccf4c6"
id="path103" />
</g>
<g
id="g3"
transform="matrix(1.205185,0,0,1.4416716,-121.74764,-43.636504)">
<path
d="m 493.99924,81.99855 h 39 v 28 h -39 z"
fill="url(#c)"
id="path83"
style="fill:url(#c-0)" />
<path
d="m 495.99924,83.99855 h 35 v 24 h -35 z"
fill="url(#d)"
id="path85"
style="fill:url(#d-8)" />
<path
d="m 497.99924,90.99855 h 7 v 15.9999 h -7 z"
fill="#18a303"
id="path87" />
<path
d="m 498.99924,105.99855 h 5 v -14 h -5 z"
fill="url(#e)"
id="path89"
style="fill:url(#e-7)" />
<path
d="m 505.99924,85.99855 h 7 v 20.9999 h -7 z"
fill="url(#f)"
id="path91"
style="fill:url(#f-2)" />
<path
d="m 506.99924,105.99855 h 5 v -19 h -5 z"
fill="url(#g)"
id="path93"
style="fill:url(#g-8)" />
<path
d="m 513.99924,96.99855 h 7 v 9.9999 h -7 z"
fill="#c99c00"
id="path95" />
<path
d="m 514.99924,105.99855 h 5 v -8 h -5 z"
fill="url(#h)"
id="path97"
style="fill:url(#h-0)" />
<path
d="m 521.99924,92.99855 h 7 v 14 h -7 z"
fill="#43c330"
id="path99" />
<path
d="m 522.99924,105.99855 h 5 v -12 h -5 z"
fill="url(#i)"
id="path101"
style="fill:url(#i-0)" />
</g>
</g>
<g
id="g4"
transform="matrix(1.2868275,0,0,1.2868275,-10.940039,-14.868657)">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.148;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 44.803173,59.695644 42.192167,58.964933 43.943798,57.1318 Z"
id="path886-8" />
<path
style="fill:#ffcc00;stroke:#000000;stroke-width:0.148;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 42.192167,58.964933 -8.058075,-8.342879 1.797443,-1.817533 8.012263,8.327279 z"
id="path888-2"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#cccccc;stroke:#000000;stroke-width:0.148;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 34.134092,50.622054 1.797442,-1.817533 1.382596,1.405365 -1.834819,1.855341 z"
id="path896-5"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#000000;stroke:none;stroke-width:0.148;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 44.803173,59.695644 -0.556231,-1.659447 c -0.179234,0.151786 0.144863,0.645778 0.06664,0.77083 -0.06898,0.110267 -0.443628,-0.09683 -0.554142,-0.0072 -0.165227,0.134015 0.618232,0.607951 0.03103,0.612398 z"
id="path1247-2"
sodipodi:nodetypes="ccsscc" />
<g
id="g3176"
transform="translate(-28.851241,18.415485)"
inkscape:export-filename="C:\Users\pabr6\eclipse-workspace\analyseCalc\images\accueilanalysecalc.png"
inkscape:export-xdpi="128"
inkscape:export-ydpi="128">
<path
style="fill:#ffaaaa;stroke:#ffaaaa;stroke-width:0.257397px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 64.782774,30.389036 -0.734025,-0.804561 c -0.261592,-0.0028 -0.488807,-0.05918 -0.892393,0.159352 -0.447603,0.343499 -0.662658,0.633003 -0.85336,0.916853 -0.171891,0.333921 -0.135917,0.570072 -0.09736,0.805004 l 0.779691,0.740884 z"
id="path1605-0"
sodipodi:nodetypes="ccccccc" />
<path
id="path903-4"
d="m 65.185528,30.771366 0.962387,-0.638019 c 0.838489,1.245007 0.419423,1.619401 2.562142,3.767338"
style="fill:none;stroke:#686868;stroke-width:0.480582;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:nodetypes="ccc" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1,15 +1,26 @@
package actions;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import calc.commandes;
import fenetres.baseDonneesEvaluations;
import fenetres.create;
import fenetres.evaluate;
import fenetres.mainApp;
public class actExit extends AbstractAction {
@ -21,18 +32,156 @@ public class actExit extends AbstractAction {
putValue( Action.SHORT_DESCRIPTION, "Quitter (CRTL+Q)" );
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK ) );
}
/**
*
* Fermeture de l'application analyseWriter.
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter ?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
create.getInstance().dispose();
}
int H = 0;
if(commandes.evaluationChargeEnMemoire!=null) H=commandes.evaluationChargeEnMemoire.hashCode();
if(H==commandes.hashCodeEvaluationSave){
// Définir les dimensions de la boîte de dialogue
int dialogWidth = 420;
int dialogHeight = 260;
// Chargement de l'icône personnalisée
ImageIcon customIcon = new ImageIcon(create.class.getResource("/resources/bye-bye.png"));
// Création du panneau pour contenir l'image
JPanel panel = new JPanel(new BorderLayout());
JLabel labelImage = new JLabel(customIcon, JLabel.CENTER);
// Ajouter l'image au panneau
panel.add(labelImage, BorderLayout.CENTER);
// Définir les boutons personnalisés
JButton buttonYes = new JButton("Quitter");
JButton buttonNo = new JButton("Annuler");
// Ajout des boutons à un panneau
JPanel buttonPanel = new JPanel();
buttonPanel.add(buttonYes);
buttonPanel.add(buttonNo);
// Ajouter le panneau de boutons au panneau principal
panel.add(buttonPanel, BorderLayout.SOUTH);
// Affichage de la boîte de dialogue
JDialog dialog = new JDialog();
dialog.setTitle("Quitter");
dialog.setModal(true);
dialog.setContentPane(panel);
dialog.setSize(dialogWidth, dialogHeight);
dialog.setResizable(false);
dialog.setLocationRelativeTo(null); // Pour centrer la boîte de dialogue à l'écran
// Définir le bouton par défaut
dialog.getRootPane().setDefaultButton(buttonYes);
// Actions des boutons
buttonYes.addActionListener((ActionEvent evt) -> {
baseDonneesListesEtudiants.ferme(false);
baseDonneesEvaluations.ferme();
create.fermeCreate();
evaluate.ferme();
mainApp.ferme();
dialog.dispose();
System.exit(0); // Fermer l'application
});
buttonNo.addActionListener((ActionEvent evt) -> {
System.out.println("L'utilisateur a choisi de ne pas quitter.");
dialog.dispose();
});
// Afficher la boîte de dialogue
dialog.setVisible(true);
// Placer le focus sur le bouton "Oui"
SwingUtilities.invokeLater(() -> buttonYes.requestFocusInWindow());
}else{
// Définir les dimensions de la boîte de dialogue
int dialogWidth = 420;
int dialogHeight = 260;
// Chargement de l'icône personnalisée
ImageIcon customIcon = new ImageIcon(create.class.getResource("/resources/enregistrer_modifications.png"));
// Création du panneau pour contenir l'image
JPanel panel = new JPanel(new BorderLayout());
JLabel labelImage = new JLabel(customIcon, JLabel.CENTER);
// Ajouter l'image au panneau
panel.add(labelImage, BorderLayout.CENTER);
// Définir les boutons personnalisés
JButton buttonYes = new JButton("Quitter");
JButton buttonNo = new JButton("Annuler");
JButton buttonSave = new JButton("Enregistrer puis quitter");
// Ajout des boutons à un panneau
JPanel buttonPanel = new JPanel();
buttonPanel.add(buttonSave);
buttonPanel.add(buttonYes);
buttonPanel.add(buttonNo);
// Ajouter le panneau de boutons au panneau principal
panel.add(buttonPanel, BorderLayout.SOUTH);
// Affichage de la boîte de dialogue
JDialog dialog = new JDialog();
dialog.setTitle("Quitter");
dialog.setModal(true);
dialog.setContentPane(panel);
dialog.setSize(dialogWidth, dialogHeight);
dialog.setResizable(false);
dialog.setLocationRelativeTo(null); // Pour centrer la boîte de dialogue à l'écran
// Définir le bouton par défaut
dialog.getRootPane().setDefaultButton(buttonSave);
// Actions des boutons
buttonYes.addActionListener((ActionEvent evt) -> {
baseDonneesListesEtudiants.ferme(false);
baseDonneesEvaluations.ferme();
create.fermeCreate();
evaluate.ferme();
mainApp.ferme();
dialog.dispose();
System.exit(0); // Fermer l'application
});
buttonNo.addActionListener((ActionEvent evt) -> {
System.out.println("L'utilisateur a choisi de ne pas quitter.");
dialog.dispose();
});
buttonSave.addActionListener((ActionEvent evt) -> {
System.out.println("L'utilisateur a choisi d'enregistrer.");
// Appeler l'action d'enregistrement
new actSaveEvaluation().actionPerformed(null);
baseDonneesEvaluations.ferme();
create.fermeCreate();
evaluate.ferme();
dialog.dispose();
System.exit(0);
});
// Afficher la boîte de dialogue
dialog.setVisible(true);
// Placer le focus sur le bouton "Save"
SwingUtilities.invokeLater(() -> buttonSave.requestFocusInWindow());
}
}
}

View File

@ -17,6 +17,7 @@ import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
import AnalyseCalc.Classeur2;
import calc.commandes;
import fenetres.evaluate;
import xml.LecturesDossiers;
import xml.ecritureFileXML;
@ -42,7 +43,7 @@ public class actNewFichierAnalyse extends AbstractAction{
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle("Choisir un fichier ODF");
chooser.setCurrentDirectory(new java.io.File(calc.commandes.path));
chooser.setCurrentDirectory(new java.io.File(commandes.path));
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
FileNameExtensionFilter filter = new FileNameExtensionFilter("Format ODF", "ods");
chooser.setFileFilter(filter);
@ -53,12 +54,12 @@ public class actNewFichierAnalyse extends AbstractAction{
System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
// réinitialise les commandes
calc.commandes.initialiseParametresSettingsProprietes();;
calc.commandes.fichierAnalyseValide=true;
calc.commandes.path = chooser.getCurrentDirectory().getAbsolutePath();
calc.commandes.PathFilenameAnalysis = chooser.getCurrentDirectory().getAbsolutePath();
commandes.initialiseParametresSettingsProprietes();;
commandes.fichierAnalyseValide=true;
commandes.path = chooser.getCurrentDirectory().getAbsolutePath();
commandes.PathFilenameAnalysis = chooser.getCurrentDirectory().getAbsolutePath();
String cheminVersFichier = chooser.getSelectedFile().getAbsolutePath();
calc.commandes.nameSujet = chooser.getSelectedFile().getName();
commandes.nameSujet = chooser.getSelectedFile().getName();
try {
@ -66,44 +67,54 @@ public class actNewFichierAnalyse extends AbstractAction{
//constructionNodeAvecString A = new constructionNodeAvecString();
new transformeXLMtoNode(LecturesDossiers.getEC().getListeContentTableur().get(0), false, null);
calc.commandes.sujet = transformeXLMtoNode.getNodeRoot();
commandes.sujet = transformeXLMtoNode.getNodeRoot();
calc.commandes.sujet.getAttributs().put("analysis_filename","sujet.xml");
// Ecriture.ecritureNodeEnXML(calc.commandes.sujet, "sujet", calc.commandes.path, Ecriture.typeFichier.fichier_etudiant);
commandes.sujet.getAttributs().put("analysis_filename","sujet.xml");
commandes.sujet.removeAllEnfantWithThisName("text:change-start");
commandes.sujet.removeAllEnfantWithThisName("text:change-end");
commandes.sujet.removeAllEnfantWithThisName("text:tracked-changes");
commandes.sujet.removeAllEnfantWithThisName("text:change");
commandes.sujet.removeAllEnfantWithThisName("office:document-content");
// Ecriture.ecritureNodeEnXML(ClasseurAnalyse, "ClasseurAnalyse", calc.commandes.path, Ecriture.typeFichier.fichier_etudiant);
//calc.commandes.sujet = ecritureSujet.nodePourEcritureSujet(calc.commandes.sujet,b,0);
calc.commandes.sujet.removeAllEnfantWithThisName("text:change-start");
calc.commandes.sujet.removeAllEnfantWithThisName("text:change-end");
calc.commandes.sujet.removeAllEnfantWithThisName("text:tracked-changes");
calc.commandes.sujet.removeAllEnfantWithThisName("text:change");
ecritureFileXML.write(calc.commandes.sujet, "sujet.xml");
Classeur2 ClasseurAnalyse = new Classeur2(calc.commandes.sujet,0,ecritureFileXML.typeFichier.fichier_analyse);
ecritureFileXML.write(commandes.sujet, "sujet.xml");
Classeur2 ClasseurAnalyse = new Classeur2(commandes.sujet,0,ecritureFileXML.typeFichier.fichier_analyse);
calc.commandes.sujet = ClasseurAnalyse.convertClasseurToNode(ecritureFileXML.typeFichier.fichier_analyse);
ecritureFileXML.write(calc.commandes.sujet, "sujet2.xml");
commandes.sujet = ClasseurAnalyse.convertClasseurToNode(ecritureFileXML.typeFichier.fichier_analyse);
ecritureFileXML.write(commandes.sujet, "sujet2.xml");
// Ecriture.ecritureNodeEnXML(calc.commandes.sujet, "sujet2", calc.commandes.path, Ecriture.typeFichier.fichier_etudiant);
// Ecriture.ecritureNodeEnXML(commandes.sujet, "sujet2", commandes.path, Ecriture.typeFichier.fichier_etudiant);
// new verificationFichierAnalyse();
if(calc.commandes.fichierAnalyseValide) {
calc.commandes.sujetSauvegarde = calc.commandes.sujet.clone();
if(commandes.fichierAnalyseValide) {
// commandes.sujetSauvegarde = commandes.sujet.clone();
// fenetres.create.getTree().setVisible(true);
// fenetres.create.constructionTree();
// fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
commandes.sujetSauvegarde = commandes.sujet.clone();
commandes.evaluationChargeEnMemoire = null;
commandes.evaluationsBase=null;
commandes.IndexEvaluationCharger=-1; //Car ce n'est pas une évaluation
commandes.NameEvaluationCharger = "";
commandes.analysis_filename = commandes.sujet.getAttributs().get("analysis_filename");
commandes.initialiseParametresEvaluation();
commandes.initialiseParametresSettingsProprietes();
fenetres.create.getTree().setVisible(true);
fenetres.create.constructionTree();
fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
}else {
fenetres.create.getTextNodeSelect().setText("<h1>Le fichier n'est pas valide</h1>");
calc.commandes.sujet = new node();
commandes.sujet = new node();
}
} catch (ParserConfigurationException | SAXException | IOException | CloneNotSupportedException e1) {
@ -118,7 +129,7 @@ public class actNewFichierAnalyse extends AbstractAction{
}
calc.commandes.ecritCode = true;
commandes.ecritCode = true;
}

View File

@ -0,0 +1,38 @@
package actions;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import baseListesEtudiants.recupeNodeBaseListesEtudiants;
import fenetres.create;
import calc.*;
public class actOpenBaseListesEtudiants extends AbstractAction{
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Ouvrir la base de données des listes des étudiants" );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/baselisteetudiantmini.png")) );
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/baselisteetudiant.png")) );
putValue( Action.SHORT_DESCRIPTION, "Ouvrir la base de données des listes des étudiants" );
}
@Override
public void actionPerformed(ActionEvent e) {
new recupeNodeBaseListesEtudiants();
if(commandes.listesEtudiants!=null) {
int index = -1;
if(commandes.nodeCSV!=null) if(!commandes.nodeCSV.isVide()) if(commandes.nodeCSV.getAttributs().get("nameListStudent")!=null) {
String nameList = commandes.nodeCSV.getAttributs().get("nameListStudent");
for(int i = 0 ; i < commandes.listesEtudiants.getEnfants().size(); i++) {
if(commandes.listesEtudiants.getEnfants().get(i).getAttributs().get("nameListStudent").equals(nameList)) {
index = i;
}
}
}
baseDonneesListesEtudiants.getInstance(index);
}
}
}

View File

@ -0,0 +1,55 @@
package actions;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import baseEvaluation.creerNouvelleEvaluation;
import baseEvaluation.recupeNodeBaseEvaluations;
import calc.commandes;
import xml.node;
public class actSaveEvaluation extends AbstractAction{
/**
*
*/
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Enregister l'évaluation" );
putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/resources/saveEvaluationmini.png")) );
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_S );
putValue( Action.SHORT_DESCRIPTION, "Enregistrer l'évaluation dans la base des évaluations. (CTRL+S)" );
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_DOWN_MASK ) );
}
@Override
public void actionPerformed(ActionEvent e) {
if(!commandes.sujet.isVide()) {
if(commandes.IndexEvaluationCharger!=-1) {
new creerNouvelleEvaluation(commandes.evaluationChargeEnMemoire);
new recupeNodeBaseEvaluations();
}else {
// n'a pas été chargé depuis la base de données.
String name = "Nouvelle évaluation";
name = JOptionPane.showInputDialog(null,"Donner un nom à cette évaluation ?",name);
if(!name.isBlank()) {
new creerNouvelleEvaluation(new node(), name, false,false);
commandes.IndexEvaluationCharger=0;
commandes.NameEvaluationCharger=name;
new recupeNodeBaseEvaluations();
}else {
JOptionPane.showMessageDialog(null,"L'évaluation encours n'a pas été enregistrée\ndans la base des évaluations.");
}
}
}
}
}

View File

@ -40,7 +40,7 @@ public class CreerBaseParDefautEvaluation {
Path outputFilePath = file.toPath();
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
try {
fichier.write("<evaluationsCalc date=\""+ calcul.formatDateWriter.DateLibreOffice(aujourdhui) +"\" version=\""+calc.commandes.version +"\"></evaluations>");
fichier.write("<evaluationsCalc date=\""+ calcul.formatDateWriter.DateLibreOffice(aujourdhui) +"\" version=\""+calc.commandes.version +"\"></evaluationsCalc>");
fichier.close();
return false;
} catch (IOException e) {

View File

@ -0,0 +1,121 @@
package baseEvaluation;
import java.text.ParseException;
import java.util.Date;
import javax.swing.JOptionPane;
import calc.*;
import xml.node;
public class creerNouvelleEvaluation {
boolean majBase = false;
boolean importation = false;
/**
* Mise à jour d'une évaluation.
* @param evaluation
*/
public creerNouvelleEvaluation(node evaluation) {
this.majBase=true;
this.importation = false;
nouvelleEvaluation(evaluation, evaluation.getAttributs().get("name"));
}
/**
* Pour réaliser une mise à jour, ou une création, ou encore une importation.<br>
* majBase = true pour une mise à jour.<br>
* majBase = false pour une création.<br>
* importation = true = importation d'une évaluation.<br>
* @param evaluation
* @param name
* @param majBase
* @param importation
*/
public creerNouvelleEvaluation(node evaluation, String nameEvaluation, boolean majBase, boolean importation) {
this.majBase = majBase;
this.importation = importation;
nouvelleEvaluation(evaluation, nameEvaluation);
}
private node nouvelleEvaluation(node evaluation, String nameEvaluation) {
if(nameEvaluation==null) {
JOptionPane.showMessageDialog(null, "L'évaluation ne possède pas de nom");
return evaluation;
}
// création du nouveau node evaluation
evaluation.setNameNode("evaluation");
// La date est modifiée à la création de l'évaluation.
Date aujourdhui = new Date();
try {
if(!majBase && !importation) {
//nouvelle évaluation
evaluation.getAttributs().put("date", calcul.formatDateWriter.DateLibreOffice(aujourdhui));
evaluation.getAttributs().put("dateModification", calcul.formatDateWriter.DateLibreOffice(aujourdhui));
evaluation.getEnfants().add(commandes.sujet);
commandes.evaluationChargeEnMemoire = evaluation;
}else {
//Mise à jour
if(!importation) evaluation.getAttributs().put("dateModification", calcul.formatDateWriter.DateLibreOffice(aujourdhui));
}
} catch (ParseException e) {
e.printStackTrace();
}
// informations de l'évaluation en création ou MAJ
evaluation.getAttributs().put("version", commandes.version);
evaluation.getAttributs().put("name", nameEvaluation);
evaluation.getAttributs().put("PathFilenameAnalysis", commandes.PathFilenameAnalysis);
evaluation.getAttributs().put("path", commandes.path);
evaluation.getAttributs().put("fichierStudentMoodle", String.valueOf(commandes.fichierStudentMoodle));
evaluation.getAttributs().put("sansFeeback", String.valueOf(commandes.sansFeeback) );
evaluation.getAttributs().put("noDetail", String.valueOf(commandes.noDetail) );
evaluation.getAttributs().put("noNote", String.valueOf(commandes.noNote) );
evaluation.getAttributs().put("noAfficheProgression", String.valueOf(commandes.noAfficheProgression) );
evaluation.getAttributs().put("zipfeedback", String.valueOf(commandes.zipfeedback) );
evaluation.getAttributs().put("verifHisto2", String.valueOf(commandes.verifHisto2) );
evaluation.getAttributs().put("ecritNoteCSV", String.valueOf(commandes.ecritNoteCSV) );
evaluation.getAttributs().put("newLogo", String.valueOf(commandes.newLogo) );
evaluation.getAttributs().put("noLogo", String.valueOf(commandes.noLogo) );
evaluation.getAttributs().put("analyse_nombres_modifications_simultané_maxi", String.valueOf(commandes.analyse_nombres_modifications_simultané_maxi) );
evaluation.getAttributs().put("fourniCSV", String.valueOf(commandes.fourniCSV) );
if(commandes.nameCSV!=null) {
evaluation.getAttributs().put("nameCSV", commandes.nameCSV );
}else {
evaluation.getAttributs().put("nameCSV", "");
}
//Supprime le node CSV s'il existe, pour le remplacer par le node commandes.nodeCSV
node nodremove = evaluation.retourneFirstEnfant("fileCSV");
if(nodremove!=null)if(!nodremove.isVide()) evaluation.getEnfants().remove(nodremove);
// Ajoute les informations sur la liste d'étudiant
// Dans le nodeCSV, il y a toutes les informations sur chaque étudiants
// Mais dans le node évaluation, on ne garde que les attribut du node fileCSV.
if(commandes.nodeCSV!=null) {
evaluation.getEnfants().add(commandes.nodeCSV);
evaluation.retourneFirstEnfant("fileCSV").getEnfants().clear();
}
// Création d'une évaluation
// Insère au début de la liste
if(!majBase) {
if(commandes.evaluationsBase!=null) {
commandes.evaluationsBase.getEnfants().add(0, evaluation);
commandes.IndexEvaluationCharger=0;
}
}
new ecritureBaseEvaluation(evaluation);
commandes.hashCodeEvaluationSave = evaluation.hashCode();
return evaluation;
}
}

View File

@ -0,0 +1,133 @@
package baseEvaluation;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import calc.*;
import xml.node;
/**
* Ecriture d'une évaluation.
* @author pabr6
*
*/
public class ecritureBaseEvaluation {
/**
* Ecriture d'une évaluation
* @param evaluation
*/
public ecritureBaseEvaluation(node evaluation) {
String directoryName = "";
File file = null;
if(commandes.PathBaseEvaluationDefaut) {
directoryName = Paths.get("").toAbsolutePath().toString();
}else {
directoryName = commandes.PathBaseEvaluations;
}
if(commandes.os.contains("Win")) {
file = new File(directoryName + "\\" + commandes.NameBaseEvaluations);
}else {
file = new File(directoryName + "/" + commandes.NameBaseEvaluations);
}
String debut="";
String fin="";
String XMLBase="";
if(file!=null) {
//Lecture de la base de données
BufferedReader br;
try {
br = new BufferedReader(
new InputStreamReader(
new FileInputStream(file.getAbsoluteFile()), "UTF-8"));
String line;
StringBuilder targetString = new StringBuilder();
while ((line = br.readLine()) != null) {
targetString.append(line);
}
String baseToString = targetString.toString().replace("\t","").replace("\r", "").replace("\n", "").replaceAll(">/{1,}<","><");
Pattern p = Pattern.compile("<\\bevaluation\\b.{1,800}\\bdate\\b=\\\""+ evaluation.getAttributs().get("date") +"\\\".*?<\\/\\bevaluation\\b>");
Matcher m = p.matcher(baseToString);
if(m.find()) {
//Supprime le node évluation pour le remplacer par le nouveau.
debut = baseToString.substring(0,m.start());
fin = baseToString.substring(m.end());
// String codeXMLEvaluation = Run.ecritureNode(evaluation, 0).toString().replace("\t","").replace("\r", "").replace("\n", "").replaceAll(">/{1,}<","><");
XMLBase = debut + evaluation.ecritureXML().toString() + fin;
}else {
//Ajoute une nouvelle évaluation au début de la base
p = Pattern.compile("<evaluations.*?>");
m = p.matcher(baseToString);
if(m.find()) {
debut = baseToString.substring(0,m.end());
fin = baseToString.substring(m.end());
// String codeXMLEvaluation = Run.ecritureNode(evaluation, 0).toString().replace("\t","").replace("\r", "").replace("\n", "").replaceAll(">/{1,}<","><");
XMLBase = debut + evaluation.ecritureXML().toString() + fin;
}else {
JFrame frame = new JFrame();
JLabel texte = new JLabel("<html><h1>Problème avec la base de données des évaluations</h1><p>Il semble que ce n'est pas la base de données des évaluations.</p>"
+ "<p>"+ file.getAbsolutePath() +"</p></html>");
JOptionPane.showMessageDialog(frame, texte);
}
}
try {
// écriture du node
Path outputFilePath = file.toPath();
if (Files.isWritable(outputFilePath)) {
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
fichier.write(XMLBase);
fichier.close();
JFrame frame = new JFrame();
JLabel texte = new JLabel("<html><h1>Enregistrement réussi</h1><p>L'évaluation <b>"+evaluation.getAttributs().get("name")+ "</b> a été enregistrée dans la base de données.</p>"
+ "<p>"+ file.getAbsolutePath() +"</p></html>");
JOptionPane.showMessageDialog(frame, texte);
} else {
JFrame frame = new JFrame();
JLabel texte = new JLabel("<html><h1>L'enregistrement n'a pas réussi</h1><p>L'évaluation <b>"+evaluation.getAttributs().get("name")+ "</b> n'a pas été enregistrée dans la base de données.</p>"
+ "<p>"+ file.getAbsolutePath() +"</p><p>Vous devez avoir des droits pour écrire dans ce dossier.</p></html>");
JOptionPane.showMessageDialog(frame, texte);
}
} catch (IOException e) {
JFrame frame = new JFrame();
JLabel texte = new JLabel("<html><h1>L'enregistrement n'a pas réussi</h1><p>L'évaluation <b>"+evaluation.getAttributs().get("name")+ "</b> n'a pas été enregistrée dans la base de données.</p>"
+ "<p>"+ file.getAbsolutePath() +"</p><p>"+e.getMessage()+"</p></html>");
JOptionPane.showMessageDialog(frame, texte);
e.printStackTrace();
}
}catch (Exception e) {
}
}
}
}

View File

@ -65,7 +65,7 @@ public class myTableBaseEvaluation extends AbstractTableModel{
}else {
evaluation[i][2] = dateCreation;
}
node fichier = calc.commandes.evaluationsBase.getEnfants().get(i).retourneFirstEnfant("fichier");
node fichier = calc.commandes.evaluationsBase.getEnfants().get(i).retourneFirstEnfant("classeur");
evaluation[i][3] = fichier.getAttributs().get("titre");
evaluation[i][4] = fichier.getAttributs().get("metaSujet");
evaluation[i][5] = fichier.getAttributs().get("analysis_filename");

View File

@ -8,7 +8,7 @@ import java.nio.file.Paths;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import calc.*;
import xml.node;
/**
* Récupère la base des évaluations qui se trouve indiqué par commandes.<br>
@ -25,16 +25,16 @@ public class recupeNodeBaseEvaluations {
public recupeNodeBaseEvaluations() {
String directoryName = "";
File file = null;
if(calc.commandes.PathBaseEvaluationDefaut) {
if(commandes.PathBaseEvaluationDefaut) {
directoryName = Paths.get("").toAbsolutePath().toString();
}else {
directoryName = calc.commandes.PathBaseEvaluations;
directoryName = commandes.PathBaseEvaluations;
}
if(calc.commandes.os.contains("Win")) {
file = new File(directoryName + "\\" + calc.commandes.NameBaseEvaluations);
if(commandes.os.contains("Win")) {
file = new File(directoryName + "\\" + commandes.NameBaseEvaluations);
}else {
file = new File(directoryName + "/" + calc.commandes.NameBaseEvaluations);
file = new File(directoryName + "/" + commandes.NameBaseEvaluations);
}
System.out.println("Début de la récupération de la base.");
@ -55,7 +55,7 @@ public class recupeNodeBaseEvaluations {
evaluations = evaluations.allFirstNodesEvaluationFichierOnly(targetString.toString().replace("\t","").replace("\r", "").replace("\n", ""));
if(evaluations!=null) {
calc.commandes.evaluationsBase = evaluations;
commandes.evaluationsBase = evaluations;
System.out.println("Fin de la récupération de la base.");
}
if(evaluations.getEnfants().size()>0) HasEvaluation=true;
@ -78,7 +78,7 @@ public class recupeNodeBaseEvaluations {
File file = null;
if(calc.commandes.os.contains("Win")) {
if(commandes.os.contains("Win")) {
file = new File(directoryName + "\\" + NameNewBase);
}else {
file = new File(directoryName + "/" + NameNewBase);
@ -104,10 +104,10 @@ public class recupeNodeBaseEvaluations {
if(evaluations!=null) {
if(evaluations.getEnfants().size()>0) {
if(evaluations.getNameNode().equals("evaluations")) {
calc.commandes.evaluationsBase = evaluations;
calc.commandes.PathBaseEvaluations = (directoryName);
calc.commandes.NameBaseEvaluations = NameNewBase;
calc.commandes.PathBaseEvaluationDefaut = false;
commandes.evaluationsBase = evaluations;
commandes.PathBaseEvaluations = (directoryName);
commandes.NameBaseEvaluations = NameNewBase;
commandes.PathBaseEvaluationDefaut = false;
}
}
}

View File

@ -10,7 +10,6 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.regex.Matcher;
@ -33,12 +32,14 @@ import javax.swing.event.ListSelectionListener;
import javax.swing.table.TableColumnModel;
import baseEvaluation.chargeEvaluation;
import baseEvaluation.creerNouvelleEvaluation;
import baseEvaluation.myTableBaseEvaluation;
import baseEvaluation.recupeNodeBaseEvaluations;
import net.lingala.zip4j.exception.ZipException;
import net.miginfocom.swing.MigLayout;
import xml.Zip;
import xml.node;
import calc.*;
/**
@ -74,7 +75,7 @@ public class baseDonneesEvaluations extends JFrame { /**
private final JButton btnExtraireFileAnalysis = new JButton("<html>Extraire le fichier d'analyse<br>de l'évaluation sélectionnée</html>");
private final JButton btnFusionnerBase = new JButton("<html>Importer des évaluations<br>depuis une autre base</html>");
private final JButton btnChargerFichierAnalyse = new JButton("<html>Créer une évaluation à <br>partir d'un fichier d'analyse</html>");
private final static JLabel lblCheminVersBase = new JLabel(calc.commandes.PathBaseEvaluations);
private final static JLabel lblCheminVersBase = new JLabel(commandes.PathBaseEvaluations);
private final JButton btnArchiveBase = new JButton("<html>Copie de sauvegarde</html>");
@ -89,7 +90,7 @@ public baseDonneesEvaluations() {
ImageIcon img = new ImageIcon(getClass().getResource("/resources/evalwriter.png") );
setIconImage(img.getImage());
setTitle(calc.commandes.Titre + " - La base de données des évaluations");
setTitle(commandes.Titre + " - La base de données des évaluations");
getContentPane().setLayout(new BorderLayout(2, 2));
@ -131,8 +132,8 @@ public baseDonneesEvaluations() {
lblCheminVersBase.setIcon(new ImageIcon(baseDonneesEvaluations.class.getResource("/resources/BaseEvaluationsmini.png")));
panelBas.add(lblCheminVersBase);
if(calc.commandes.evaluationChargeEnMemoire!=null) {
textPane.setText("Evaluation chargée en mémoire : " + calc.commandes.evaluationChargeEnMemoire.getAttributs().get("name"));
if(commandes.evaluationChargeEnMemoire!=null) {
textPane.setText("Evaluation chargée en mémoire : " + commandes.evaluationChargeEnMemoire.getAttributs().get("name"));
}
@ -262,14 +263,14 @@ public static baseDonneesEvaluations getInstance() {
}
// afficheLesBoutonGestionBase();
instance.setVisible(true);
if(calc.commandes.IndexEvaluationCharger!=-1) {
selectRow(calc.commandes.IndexEvaluationCharger);
if(commandes.IndexEvaluationCharger!=-1) {
selectRow(commandes.IndexEvaluationCharger);
}
isDispose=false;
if(calc.commandes.PathBaseEvaluationDefaut) {
lblCheminVersBase.setText(calc.commandes.PathBaseEvaluations);
if(commandes.PathBaseEvaluationDefaut) {
lblCheminVersBase.setText(commandes.PathBaseEvaluations);
}else {
lblCheminVersBase.setText(calc.commandes.PathBaseEvaluations+"/"+calc.commandes.NameBaseEvaluations);
lblCheminVersBase.setText(commandes.PathBaseEvaluations+"/"+commandes.NameBaseEvaluations);
}
return instance;
}
@ -311,9 +312,9 @@ private void ListenerAction() {
@Override
public void actionPerformed(ActionEvent e) {
if(Files.isReadable(Paths.get(""))) {
if(calc.commandes.evaluationsBase!=null) {
if(commandes.evaluationsBase!=null) {
try {
String nameFile = Zip.AddBaseToZip(calc.commandes.evaluationsBase.ecritureXML());
String nameFile = Zip.AddBaseToZip(commandes.evaluationsBase.ecritureXML());
JOptionPane.showMessageDialog(null, "La base des évaluations a été sauvegardée dans \"Archive des bases.zip\"\nSous le nom " + nameFile );
} catch (ZipException e1) {
e1.printStackTrace();
@ -355,11 +356,11 @@ private void ListenerAction() {
String analysis_filename ="";
if(evaluation.getAttributs().get("analysis_filename")!=null) {
if(!evaluation.getAttributs().get("analysis_filename").isEmpty()) {
file = new File(calc.commandes.PathBaseEvaluations);
file = new File(commandes.PathBaseEvaluations);
analysis_filename = evaluation.getAttributs().get("analysis_filename");
}
}else {
file = new File(calc.commandes.PathBaseEvaluations);
file = new File(commandes.PathBaseEvaluations);
}
@ -370,25 +371,21 @@ private void ListenerAction() {
boolean notError = false;
if (userSelection == JFileChooser.APPROVE_OPTION) {
File fileToSave = fileChooser.getSelectedFile();
try {
if(calc.commandes.os.contains("Win")) {
notError = Run.ecritureNodeEnXML(evaluation.retourneFirstEnfant("fichier"), fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\")),Run.TypeFile.Sujet );
}else {
notError = Run.ecritureNodeEnXML(evaluation.retourneFirstEnfant("fichier"), fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("/")),Run.TypeFile.Sujet );
}
if(notError) {
JFrame frame = new JFrame("Extration");
JLabel texte = new JLabel("<html><h1>Extration réussie</h1><p>Le fichier d'analyse <b>"+ analysis_filename +"</b> a été extrait de la base.</p>"
+ "<p>"+fileToSave.getAbsolutePath()+"<p></html>");
JOptionPane.showMessageDialog(frame, texte);
}else {
JFrame frame = new JFrame("Erreur");
JLabel texte = new JLabel("<html><h1>Erreur</h1><p>Le fichier d'analyse n'a pas été extrait de la base.</p>"
+ "<p><p></html>");
JOptionPane.showMessageDialog(frame, texte);
}
} catch (IOException e1) {
e1.printStackTrace();
if(commandes.os.contains("Win")) {
notError = evaluation.retourneFirstEnfant("fichier").saveNodeEnXML(fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\")));
}else {
notError = evaluation.retourneFirstEnfant("fichier").saveNodeEnXML(fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("/")));
}
if(notError) {
JFrame frame = new JFrame("Extration");
JLabel texte = new JLabel("<html><h1>Extration réussie</h1><p>Le fichier d'analyse <b>"+ analysis_filename +"</b> a été extrait de la base.</p>"
+ "<p>"+fileToSave.getAbsolutePath()+"<p></html>");
JOptionPane.showMessageDialog(frame, texte);
}else {
JFrame frame = new JFrame("Erreur");
JLabel texte = new JLabel("<html><h1>Erreur</h1><p>Le fichier d'analyse n'a pas été extrait de la base.</p>"
+ "<p><p></html>");
JOptionPane.showMessageDialog(frame, texte);
}
System.out.println("Save as file: " + fileToSave.getAbsolutePath());
new recupeNodeBaseEvaluations();
@ -411,13 +408,13 @@ private void ListenerAction() {
node evaluation = new node();
evaluation.setNameNode("evaluation");
String name = "Nouvelle évaluation";
evaluation.getEnfants().add(calc.commandes.sujet);
evaluation.getEnfants().add(commandes.sujet);
name = JOptionPane.showInputDialog(null,"Donner un nom à cette évaluation ?",name);
if(name!=null) {
if(!name.isBlank()) {
evaluation.getEnfants().add(calc.commandes.sujet);
evaluation.getEnfants().add(commandes.sujet);
new creerNouvelleEvaluation(evaluation,name,false,false);
new recupeNodeBaseEvaluations();
model.addOrUpdate();
@ -442,7 +439,7 @@ private void ListenerAction() {
new trierParDateDecroissanteLaBase();
model.addOrUpdate();
table.setModel(model);
selectRow(calc.commandes.IndexEvaluationCharger);
selectRow(commandes.IndexEvaluationCharger);
}
}
});
@ -465,13 +462,13 @@ private void ListenerAction() {
public void actionPerformed(ActionEvent e) {
new ChargePathBaseEvaluation(false);
if(!ChargePathBaseEvaluation.isErreurLecture()) {
if(calc.commandes.evaluationsBase!=null) {
if(commandes.evaluationsBase!=null) {
baseDonneesEvaluations.getInstance();
}
if(calc.commandes.PathBaseEvaluationDefaut) {
lblCheminVersBase.setText(calc.commandes.PathBaseEvaluations);
if(commandes.PathBaseEvaluationDefaut) {
lblCheminVersBase.setText(commandes.PathBaseEvaluations);
}else {
lblCheminVersBase.setText(calc.commandes.PathBaseEvaluations+"/"+calc.commandes.NameBaseEvaluations);
lblCheminVersBase.setText(commandes.PathBaseEvaluations+"/"+commandes.NameBaseEvaluations);
}
model.addOrUpdate();
table = new JTable(model);
@ -485,14 +482,14 @@ private void ListenerAction() {
btndefautBaseEvaluation.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if(Files.isReadable(Paths.get(""))) {
calc.commandes.PathBaseEvaluations = Paths.get("").toAbsolutePath().toString();
calc.commandes.NameBaseEvaluations = "base_evaluations_analyseWriter.xml";
calc.commandes.PathBaseEvaluationDefaut = true;
commandes.PathBaseEvaluations = Paths.get("").toAbsolutePath().toString();
commandes.NameBaseEvaluations = "base_evaluations_analyseWriter.xml";
commandes.PathBaseEvaluationDefaut = true;
new recupeNodeBaseEvaluations();
if(calc.commandes.PathBaseEvaluationDefaut) {
lblCheminVersBase.setText(calc.commandes.PathBaseEvaluations);
if(commandes.PathBaseEvaluationDefaut) {
lblCheminVersBase.setText(commandes.PathBaseEvaluations);
}else {
lblCheminVersBase.setText(calc.commandes.PathBaseEvaluations+"/"+calc.commandes.NameBaseEvaluations);
lblCheminVersBase.setText(commandes.PathBaseEvaluations+"/"+commandes.NameBaseEvaluations);
}
model.addOrUpdate();
table = new JTable(model);
@ -519,7 +516,7 @@ private void ListenerAction() {
if (!lsm.isSelectionEmpty()) {
indexSelect = lsm.getMinSelectionIndex();
chargeEvaluation.chargeEnMémoireEvaluationSelected(indexSelect);
calc.commandes.IndexEvaluationCharger = indexSelect;
commandes.IndexEvaluationCharger = indexSelect;
if(!create.isDispose) {
create.getInstance();
}else {
@ -558,8 +555,8 @@ private void ListenerAction() {
*/
btnSaveEvaluation.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if(calc.commandes.evaluationChargeEnMemoire!=null) {
String name = calc.commandes.evaluationChargeEnMemoire.getAttributs().get("name");
if(commandes.evaluationChargeEnMemoire!=null) {
String name = commandes.evaluationChargeEnMemoire.getAttributs().get("name");
name = JOptionPane.showInputDialog(null,"Voulez-vous renommer l'évaluation ?",name);
if(name!=null) {
if(!name.isBlank()) {
@ -578,7 +575,7 @@ private void ListenerAction() {
new recupeNodeBaseEvaluations();
model.addOrUpdate();
table.setModel(model);
selectRow(calc.commandes.IndexEvaluationCharger);
selectRow(commandes.IndexEvaluationCharger);
}
});

View File

@ -50,7 +50,7 @@ public class chargeBaseAuDemarrage extends JFrame {
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
ImageIcon img = new ImageIcon(getClass().getResource("/resources/evalwriter.png") );
ImageIcon img = new ImageIcon(getClass().getResource("/resources/evalcalc.png") );
setIconImage(img.getImage());
setTitle(calc.commandes.Titre + " - La base de données des évaluations");

View File

@ -64,8 +64,10 @@ import actions.actExpandNode;
import actions.actNewFichierAnalyse;
import actions.actNodeFichier;
import actions.actOpen;
import actions.actOpenBaseEvaluation;
import actions.actSave;
import actions.actSaveAs;
import actions.actSaveEvaluation;
import actions.actSetting;
import actions.actSupprimeTitre;
import actions.actTitre1;
@ -101,11 +103,11 @@ public final class create extends JFrame {
private JMenuBar menuBar = new JMenuBar();
private static JButton buttonEvaluate;
private static JToggleButton tglbtnTousLesNodes;
// private JPanel panelPrincipal;
private static JScrollPane ScrollPaneTableBouton = new JScrollPane( );
private static JScrollBar verticalScrollBar = ScrollPaneTableBouton.getVerticalScrollBar();
private static JLabel lblInfo = new JLabel("Fichier d'analyse");
private JPanel panelDroiteBoutons= new JPanel();
public static boolean isDispose = true;
private static create instance;
@ -122,13 +124,24 @@ public final class create extends JFrame {
}
public static create getInstance() {
if (instance == null) {
if (isDispose) {
instance = new create();
}
instance.setVisible(true);
isDispose = false;
return instance;
}
/**
* Ferme la fenêtre et quitte.
*/
public static void fermeCreate() {
if(!isDispose) {
isDispose=true;
instance.dispose();
}
}
/**
* Initialize the contents of the frame.
@ -310,9 +323,7 @@ public final class create extends JFrame {
addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
dispose();
};
new actExit().actionPerformed(null);
}
});
@ -569,6 +580,18 @@ public final class create extends JFrame {
toolBarPrincipal.setName("outils principaux");
JButton btnChargeEvaluation = toolBarPrincipal.add( new actOpenBaseEvaluation() );
btnChargeEvaluation.setIcon(new ImageIcon(create.class.getResource("/resources/BaseEvaluations.png")));
btnChargeEvaluation.setHideActionText(true);
toolBarPrincipal.add(btnChargeEvaluation);
JButton btnSaveEvaluation = toolBarPrincipal.add( new actSaveEvaluation() );
btnSaveEvaluation.setIcon(new ImageIcon(create.class.getResource("/resources/saveEvaluation.png")));
btnSaveEvaluation.setHideActionText(true);
toolBarPrincipal.add(btnSaveEvaluation);
toolBarPrincipal.addSeparator();
JButton buttonLoadFile = toolBarPrincipal.add( new actOpen() );
buttonLoadFile.setIcon(new ImageIcon(create.class.getResource("/resources/fichierAnalyse.png")));
buttonLoadFile.setHideActionText(true);
@ -679,11 +702,13 @@ public final class create extends JFrame {
public void closeWindows() {
if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
dispose();
isDispose=true;
dispose();
}
}
public void closeDirectlyWindows() {
isDispose=true;
this.dispose();
}

View File

@ -472,6 +472,15 @@ public class evaluate extends JFrame {
public static void ferme() {
if(!isDispose) {
isDispose=true;
instance.dispose();
}
}
/**
*
* evaluer l'ensemble des fichiers des étudiants

View File

@ -679,17 +679,11 @@ public final class setting extends JFrame {
if (userSelection == JFileChooser.APPROVE_OPTION) {
File fileToSave = fileChooser.getSelectedFile();
try {
//
nodeTransalte.saveNodeEnXML(fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\")));
JOptionPane.showMessageDialog(null, "Le fichier \"" + fileToSave.getName() + ".xml\" a été renregistré.\n\nIl se trouve dans le dossier " + fileToSave.getPath());
} catch (IOException e1) {
e1.printStackTrace();
}
//
nodeTransalte.saveNodeEnXML(fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\")));
JOptionPane.showMessageDialog(null, "Le fichier \"" + fileToSave.getName() + ".xml\" a été renregistré.\n\nIl se trouve dans le dossier " + fileToSave.getPath());
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
src/resources/bye-bye.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -166,6 +166,12 @@ private boolean nodeClose = false;
return null;
}
/**
* Retourne le premier enfant ayant le nom nameNode.<br>
* Sinon retourne un null.
* @param nameNode : le nom de l'enfant.
* @return
*/
public node retourneFirstEnfant(String nameNode) {
if(this.nameNode.equals(nameNode)) return this;
for (node nod : enfants) {
@ -753,19 +759,28 @@ private boolean nodeClose = false;
* @param pathDestination Le répertoire de destination qui sera inclus dans le répertoire courant de l'application.
* @param fourniDestination Le répertoire courant de l'application.
* @throws IOException Exception Input Output
* @return Erreur True ou False
*/
public void saveNodeEnXML(String filename, String pathDestination) throws IOException {
if(filename.contains(".xml")) filename = filename.substring(0,filename.lastIndexOf(".xml"));
public boolean saveNodeEnXML(String filenameWithExtension, String pathDestination) {
if(!filenameWithExtension.contains(".xml")) {
filenameWithExtension = filenameWithExtension.substring(0,filenameWithExtension.lastIndexOf(".xml"));
}
Path outputFilePath = Paths.get(pathDestination +"/"+ filename + ".xml");
Path outputFilePath = Paths.get(pathDestination +"/"+ filenameWithExtension + ".xml");
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
fichier.write(this.ecritureXML().toString());
fichier.close();
if(Files.isWritable(outputFilePath)){
try {
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
fichier.write(this.ecritureXML().toString());
fichier.close();
} catch (IOException e) {
e.printStackTrace();
return false;
}
}else {
return false;
}
return true;
}
/**