MAJ
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/images/
|
BIN
analyseCalc.jar
16
bin/.gitignore
vendored
@ -1,16 +1,8 @@
|
|||||||
/outils/
|
/outils/
|
||||||
/xml/
|
/xml/
|
||||||
/fenetres/
|
|
||||||
/calc/
|
|
||||||
/calcul/
|
|
||||||
/AnalyseCalc/
|
|
||||||
/nodeAC/
|
|
||||||
/resources/
|
|
||||||
/onLine/
|
|
||||||
/accueil_new_version.png
|
|
||||||
/accueill new version.svg
|
|
||||||
/baseEvaluation/
|
/baseEvaluation/
|
||||||
|
/calc/
|
||||||
/actions/
|
/actions/
|
||||||
/baseEtudiants/
|
/fenetres/
|
||||||
/baseListesEtudiants/
|
/resources/
|
||||||
/accueillChargeEvaluation.svg
|
/analyseWriter/
|
||||||
|
BIN
bin/acceuil td format 2.jpg
Normal file
After Width: | Height: | Size: 124 KiB |
113
bin/acceuil td format 2.svg
Normal file
After Width: | Height: | Size: 1.6 MiB |
143
bin/acceuil td format.svg
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
bin/accueilChargeEvaluation.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
bin/accueil_new_version.png
Normal file
After Width: | Height: | Size: 75 KiB |
1699
bin/accueill new version.svg
Normal file
After Width: | Height: | Size: 91 KiB |
671
bin/accueillChargeEvaluation.svg
Normal 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 |
BIN
bin/baseListesEtudiants/CreerBaseParDefautListesEtudiants.class
Normal file
BIN
bin/baseListesEtudiants/chargeListeEtudiants.class
Normal file
BIN
bin/baseListesEtudiants/ecritureBaseListesEtudiants.class
Normal file
BIN
bin/baseListesEtudiants/recupeNodeBaseListesEtudiants.class
Normal file
BIN
bin/bye-bye.png
Normal file
After Width: | Height: | Size: 85 KiB |
7710
bin/bye-bye.svg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
bin/onLine/verificationNewVersion.class
Normal file
Before Width: | Height: | Size: 912 B After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 901 B |
@ -1,20 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<project default="create_run_jar" name="Create Runnable Jar for Project analyseCalc">
|
<project default="create_run_jar" name="Create Runnable Jar for Project analyseWriter">
|
||||||
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
|
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
|
||||||
<!--ANT 1.7 is required -->
|
<!--ANT 1.7 is required -->
|
||||||
<!--define folder properties-->
|
<!--define folder properties-->
|
||||||
<property name="dir.buildfile" value="."/>
|
<property name="dir.buildfile" value="."/>
|
||||||
<property name="dir.workspace" value="C:/Users/pabr6/eclipse-workspace"/>
|
<property name="dir.workspace" value="C:/Users/pabr6/eclipse-workspace"/>
|
||||||
<property name="dir.jarfile" value="${dir.buildfile}"/>
|
<property name="dir.jarfile" value="C:/Users/pabr6/git/analyseWriter/MEPTL"/>
|
||||||
<target name="create_run_jar">
|
<target name="create_run_jar">
|
||||||
<jar destfile="${dir.jarfile}/analyseCalc.jar" filesetmanifest="mergewithoutmain">
|
<jar destfile="${dir.jarfile}/analyseCalc.jar" filesetmanifest="mergewithoutmain">
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Main-Class" value="fenetres.mainApp"/>
|
<attribute name="Main-Class" value="analyseWriter.fenetres.mainApp"/>
|
||||||
<attribute name="Class-Path" value="."/>
|
<attribute name="Class-Path" value="."/>
|
||||||
</manifest>
|
</manifest>
|
||||||
<fileset dir="${dir.jarfile}/bin"/>
|
<fileset dir="${dir.jarfile}/bin"/>
|
||||||
<zipfileset excludes="META-INF/*.SF" src="${dir.workspace}/zip4j-1.2.7.jar"/>
|
<zipfileset excludes="META-INF/*.SF" src="${dir.jarfile}/libs/cXML.jar"/>
|
||||||
<zipfileset excludes="META-INF/*.SF" src="${dir.jarfile}/miglayout15-swing.jar"/>
|
<zipfileset excludes="META-INF/*.SF" src="${dir.jarfile}/libs/miglayout15-swing.jar"/>
|
||||||
|
<zipfileset excludes="META-INF/*.SF" src="${dir.jarfile}/libs/zip4j-1.2.7.jar"/>
|
||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
@ -2619,124 +2619,6 @@ public class Classeur2 {
|
|||||||
} // ligne
|
} // ligne
|
||||||
} // feuille
|
} // feuille
|
||||||
|
|
||||||
// /**
|
|
||||||
// * Ecriture des objets dans un fichier sans utiliser le JSON
|
|
||||||
// * @param patch
|
|
||||||
// * @throws IOException
|
|
||||||
// */
|
|
||||||
// public void ecritureClasseur(String patch) throws IOException {
|
|
||||||
// System.getProperty("file.encoding","UTF-8");
|
|
||||||
//
|
|
||||||
// Path outputFilePath = Paths.get(patch + "/codeFichier.xml");
|
|
||||||
// BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
|
|
||||||
//
|
|
||||||
// fichier.write("<!-- Pablo Rodriguez mai 2020 symbôles : ‽ ↕ ↑ ¦ → ⌂ -->\r\r");
|
|
||||||
// fichier.write("<!-- ‽5 doit se placer à la fin correspond à 5 points -->\r\r");
|
|
||||||
// fichier.write("<!-- ⌂ ne prend pas en compte les $ -->\r\r");
|
|
||||||
// fichier.write("<!-- ¬ ne prend pas en compte les espaces -->\r\r");
|
|
||||||
// fichier.write("<!-- ⌂¬ ou ¬⌂ ne prend pas en compte les dollars et les espaces -->\r\r");
|
|
||||||
// fichier.write("<!-- ¦ OU sans nettoyer le texte -->\r\r");
|
|
||||||
// fichier.write("<!-- ↕ OU avec nettoyage du texte (caractères spéciaux et CASE) -->\r\r");
|
|
||||||
// fichier.write("<!-- ↑ OU avec nettoyage numérique (1 à 9 et la CASE) -->\r\r");
|
|
||||||
// fichier.write("<!-- → étendu entre deux bornes numérique avec ou sans unité -->\r\r");
|
|
||||||
//
|
|
||||||
// fichier.newLine();
|
|
||||||
//
|
|
||||||
// fichier.write("<classeur ");
|
|
||||||
// fichier.write("metaSujet=\"" + calc.commandes.analyse_metaSujet + "\" ");
|
|
||||||
// fichier.write("metaSujetContent=\"" + metaSujetContent + "\" ");
|
|
||||||
// fichier.write("NbreFeuille=\"" + NbreFeuille + "\" progression=\"" + calc.commandes.analyse_progression + "\" analyse=\"" + analyse +"\" bareme=\"" + calc.commandes.analyse_bareme + "\" nbmodification=\"1000\" nbcopier=\"100\" verification=\"true\">\r");
|
|
||||||
// fichier.newLine();
|
|
||||||
// fichier.write("<communication link=\"\" linktitle=\"\" title=\"\"></communication>");
|
|
||||||
// fichier.newLine();
|
|
||||||
//
|
|
||||||
// // nommage des cellules
|
|
||||||
// for (Entry<String, String> j : nommageCellules.entrySet()) {
|
|
||||||
// fichier.write("<nommage name=\"" + j.getKey() + "\" cells=\"" + j.getValue() +"\"/>");
|
|
||||||
// fichier.newLine();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// //feuille
|
|
||||||
// for (Entry<Integer, feuille> k : Feuilles.entrySet()) {
|
|
||||||
// fichier.newLine();
|
|
||||||
// fichier.write("<feuille nomFeuille=\"" + k.getValue().getNomFeuille() + "\" styleLigne=\"" + k.getValue().getStyleLigne() + "\" evaluer=\"" + k.getValue().getEvaluer() +"\" Poids=\"" + k.getValue().getPoids() + "\">\r");
|
|
||||||
// fichier.newLine();
|
|
||||||
// fichier.write("\t<communication></communication>\r");
|
|
||||||
// fichier.newLine();
|
|
||||||
//
|
|
||||||
// for (Entry<String, String> j : k.getValue().getNommageCellulesFeuille().entrySet()) {
|
|
||||||
// fichier.write("\t<nommagecellulesfeuille name=\"" + j.getKey() + "\" cells=\"" + j.getValue() +"\"/>");
|
|
||||||
// fichier.newLine();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// //colonne
|
|
||||||
// for (Entry<Integer, colonne> k1 : k.getValue().getColonnes().entrySet()) {
|
|
||||||
// fichier.newLine();
|
|
||||||
// fichier.write("\t<colonne RefColonne=\"" + k1.getValue().getRefColonne() +"\" RefColDansClasseur=\"" + k1.getValue().getRefColDansClasseur() + "\"");
|
|
||||||
// for (Entry<String, String> k2 : k1.getValue().getPropertiesColumn().entrySet()) {
|
|
||||||
// fichier.write(" " + k2.getKey() + "=\"" + k2.getValue() + "\"" ) ;
|
|
||||||
// }
|
|
||||||
// fichier.write("></colonne>\r");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// //ligne
|
|
||||||
// for (Entry<Integer, ligne> k1 : k.getValue().getLignes().entrySet()) {
|
|
||||||
// fichier.newLine();
|
|
||||||
// fichier.write("\t<ligne RefLigne=\"" + k1.getValue().getRefLigne() + "\" evaluer=\"" + k1.getValue().getEvaluer() +"\" saut=\""+ k1.getValue().isSaut() + "\" styletitre=\"H1\">\r");
|
|
||||||
// fichier.newLine();
|
|
||||||
// fichier.write("\t\t<communication>" + k1.getValue().getCommunication() +"</communication>\r");
|
|
||||||
// fichier.newLine();
|
|
||||||
// fichier.write("\t\t<propertiesRow");
|
|
||||||
// for (Entry<String, String> k2 : k1.getValue().getPropertiesRow().entrySet()) {
|
|
||||||
// fichier.write(" " + k2.getKey() + "=\"" + k2.getValue() + "\"") ;
|
|
||||||
// }
|
|
||||||
// fichier.write("></propertiesRow>\r");
|
|
||||||
//
|
|
||||||
// for (Entry<Integer, cellule> k2 : k1.getValue().getCellules().entrySet()) {
|
|
||||||
// fichier.newLine();
|
|
||||||
// fichier.write("\t\t<cellule evaluer=\""+ k2.getValue().getEvaluer() +"\" saut=\"false\" " + "styletitre=\"H1\" titre=\"\" menu=\"false\" RefLigne=\"" + k2.getValue().getRefLigne() + "\" RefLigDansClasseur=\""+ k2.getValue().getRefLigDansClasseur()
|
|
||||||
// + "\" RefColonne=\"" + k2.getValue().getRefColonne() + "\" RefColDansClasseur=\"" + k2.getValue().getRefColDansClasseur() + "\">\r" );
|
|
||||||
//
|
|
||||||
// fichier.write("\t\t\t<propertiesCell");
|
|
||||||
// for (Entry<String, String> k3 : k2.getValue().getPropertiesCell().entrySet()) {
|
|
||||||
// fichier.write(" " + k3.getKey() + "=\"" + k3.getValue() + "\"" ) ;
|
|
||||||
// }
|
|
||||||
// fichier.write("></propertiesCell>\r");
|
|
||||||
//
|
|
||||||
// fichier.newLine();
|
|
||||||
// fichier.write("\t\t\t<validation evaluer=\""+ k2.getValue().getVal().isEvaluer() + "\" saut=\"" + k2.getValue().getVal().isSaut() + "\" empty=\""+ k2.getValue().getVal().isEmpty() + "\" styletitre=\"H1\"");
|
|
||||||
// for (Entry<String, String> k3 : k2.getValue().getVal().getPropertiesValidation().entrySet()) {
|
|
||||||
// fichier.write(" " + k3.getKey() + "=\"" + k3.getValue() + "\"" ) ;
|
|
||||||
// }
|
|
||||||
// fichier.write("></validation>\r");
|
|
||||||
//
|
|
||||||
// fichier.newLine();
|
|
||||||
// if(k2.getValue().getGraph()!=null) {
|
|
||||||
// ecritureGraphique(fichier,k2.getValue().getGraph(),"\t\t");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fichier.write("\t\t</cellule>\r");
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fichier.write("\t</ligne>\r");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// //graphic
|
|
||||||
//
|
|
||||||
// for (Entry<Integer, graphic> k1 : k.getValue().getGraphics().entrySet()) {
|
|
||||||
// fichier.newLine();
|
|
||||||
// ecritureGraphique(fichier,k1.getValue(),"");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// fichier.write("</feuille>\r");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fichier.write("</classeur>\r");
|
|
||||||
// fichier.close();
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
public node convertClasseurToNode(ecritureFileXML.typeFichier type) throws IOException {
|
public node convertClasseurToNode(ecritureFileXML.typeFichier type) throws IOException {
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
package actions;
|
package actions;
|
||||||
|
|
||||||
import java.awt.Desktop;
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.InputEvent;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import javax.swing.AbstractAction;
|
import javax.swing.AbstractAction;
|
||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
@ -29,12 +26,8 @@ public class actDocumentation extends AbstractAction{
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
Desktop d = Desktop.getDesktop();
|
|
||||||
try {
|
|
||||||
d.open(new File(create.class.getResource("/resources/documentation.pdf").getPath()));
|
|
||||||
} catch (IOException e1) {
|
|
||||||
e1.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ public class actExit extends AbstractAction {
|
|||||||
|
|
||||||
// Actions des boutons
|
// Actions des boutons
|
||||||
buttonYes.addActionListener((ActionEvent evt) -> {
|
buttonYes.addActionListener((ActionEvent evt) -> {
|
||||||
baseDonneesListesEtudiants.ferme(false);
|
// baseDonneesListesEtudiants.ferme(false);
|
||||||
baseDonneesEvaluations.ferme();
|
baseDonneesEvaluations.ferme();
|
||||||
create.fermeCreate();
|
create.fermeCreate();
|
||||||
evaluate.ferme();
|
evaluate.ferme();
|
||||||
@ -151,7 +151,7 @@ public class actExit extends AbstractAction {
|
|||||||
|
|
||||||
// Actions des boutons
|
// Actions des boutons
|
||||||
buttonYes.addActionListener((ActionEvent evt) -> {
|
buttonYes.addActionListener((ActionEvent evt) -> {
|
||||||
baseDonneesListesEtudiants.ferme(false);
|
// baseDonneesListesEtudiants.ferme(false);
|
||||||
baseDonneesEvaluations.ferme();
|
baseDonneesEvaluations.ferme();
|
||||||
create.fermeCreate();
|
create.fermeCreate();
|
||||||
evaluate.ferme();
|
evaluate.ferme();
|
||||||
|
33
src/actions/actLicence.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package actions;
|
||||||
|
|
||||||
|
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import javax.swing.AbstractAction;
|
||||||
|
import javax.swing.Action;
|
||||||
|
import javax.swing.ImageIcon;
|
||||||
|
|
||||||
|
|
||||||
|
public class actLicence extends AbstractAction{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
{
|
||||||
|
putValue( Action.NAME, "Licence" );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/resources/GPLv3mini.png") ) );
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Affiche la page de la licence" );
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
try {
|
||||||
|
String url = "https://www.gnu.org/licenses/gpl-3.0.html";
|
||||||
|
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
|
||||||
|
} catch (IOException e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -59,7 +59,8 @@ public class actNewFichierAnalyse extends AbstractAction{
|
|||||||
commandes.path = chooser.getCurrentDirectory().getAbsolutePath();
|
commandes.path = chooser.getCurrentDirectory().getAbsolutePath();
|
||||||
commandes.PathFilenameAnalysis = chooser.getCurrentDirectory().getAbsolutePath();
|
commandes.PathFilenameAnalysis = chooser.getCurrentDirectory().getAbsolutePath();
|
||||||
String cheminVersFichier = chooser.getSelectedFile().getAbsolutePath();
|
String cheminVersFichier = chooser.getSelectedFile().getAbsolutePath();
|
||||||
commandes.nameSujet = chooser.getSelectedFile().getName();
|
String nameFile = chooser.getSelectedFile().getName();
|
||||||
|
commandes.nameSujet = nameFile.substring(0,nameFile.lastIndexOf(".")) + ".xml";
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -68,31 +69,30 @@ public class actNewFichierAnalyse extends AbstractAction{
|
|||||||
new transformeXLMtoNode(LecturesDossiers.getEC().getListeContentTableur().get(0), false, null);
|
new transformeXLMtoNode(LecturesDossiers.getEC().getListeContentTableur().get(0), false, null);
|
||||||
|
|
||||||
commandes.sujet = transformeXLMtoNode.getNodeRoot();
|
commandes.sujet = transformeXLMtoNode.getNodeRoot();
|
||||||
|
|
||||||
|
commandes.sujet.getAttributs().put("analysis_filename",commandes.nameSujet);
|
||||||
commandes.sujet.getAttributs().put("analysis_filename","sujet.xml");
|
|
||||||
commandes.sujet.removeAllEnfantWithThisName("text:change-start");
|
commandes.sujet.removeAllEnfantWithThisName("text:change-start");
|
||||||
commandes.sujet.removeAllEnfantWithThisName("text:change-end");
|
commandes.sujet.removeAllEnfantWithThisName("text:change-end");
|
||||||
commandes.sujet.removeAllEnfantWithThisName("text:tracked-changes");
|
commandes.sujet.removeAllEnfantWithThisName("text:tracked-changes");
|
||||||
commandes.sujet.removeAllEnfantWithThisName("text:change");
|
commandes.sujet.removeAllEnfantWithThisName("text:change");
|
||||||
commandes.sujet.removeAllEnfantWithThisName("office:document-content");
|
|
||||||
|
|
||||||
|
|
||||||
ecritureFileXML.write(commandes.sujet, "sujet.xml");
|
ecritureFileXML.write(commandes.sujet, "sujet.xml");
|
||||||
|
|
||||||
|
node LesStyles = commandes.sujet.retourneFirstEnfant("office:document-styles");
|
||||||
|
|
||||||
Classeur2 ClasseurAnalyse = new Classeur2(commandes.sujet,0,ecritureFileXML.typeFichier.fichier_analyse);
|
Classeur2 ClasseurAnalyse = new Classeur2(commandes.sujet,0,ecritureFileXML.typeFichier.fichier_analyse);
|
||||||
|
|
||||||
commandes.sujet = ClasseurAnalyse.convertClasseurToNode(ecritureFileXML.typeFichier.fichier_analyse);
|
commandes.sujet = ClasseurAnalyse.convertClasseurToNode(ecritureFileXML.typeFichier.fichier_analyse);
|
||||||
|
|
||||||
|
ecritureFileXML.write(commandes.sujet, "sujet1.xml");
|
||||||
|
|
||||||
|
commandes.sujet.removeAllEnfantWithThisName("office:document-content");
|
||||||
|
commandes.sujet.removeAllEnfantWithThisName("office:document-meta");
|
||||||
|
commandes.sujet.retourneFirstEnfant("classeur").getEnfants().add(LesStyles);
|
||||||
|
|
||||||
ecritureFileXML.write(commandes.sujet, "sujet2.xml");
|
ecritureFileXML.write(commandes.sujet, "sujet2.xml");
|
||||||
|
|
||||||
|
|
||||||
// Ecriture.ecritureNodeEnXML(commandes.sujet, "sujet2", commandes.path, Ecriture.typeFichier.fichier_etudiant);
|
|
||||||
|
|
||||||
// new verificationFichierAnalyse();
|
// new verificationFichierAnalyse();
|
||||||
if(commandes.fichierAnalyseValide) {
|
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.sujetSauvegarde = commandes.sujet.clone();
|
||||||
|
@ -7,8 +7,9 @@ import javax.swing.Action;
|
|||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
|
|
||||||
import baseListesEtudiants.recupeNodeBaseListesEtudiants;
|
import baseListesEtudiants.recupeNodeBaseListesEtudiants;
|
||||||
|
import calc.commandes;
|
||||||
|
import fenetres.baseDonneesListesEtudiants;
|
||||||
import fenetres.create;
|
import fenetres.create;
|
||||||
import calc.*;
|
|
||||||
|
|
||||||
public class actOpenBaseListesEtudiants extends AbstractAction{
|
public class actOpenBaseListesEtudiants extends AbstractAction{
|
||||||
|
|
||||||
|
@ -0,0 +1,52 @@
|
|||||||
|
package analyseWriter.baseListesEtudiants;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.BufferedWriter;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import calc.commandes;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Création de la base de données des listes des étudiants.<br>
|
||||||
|
* Et/Ou vérification de la présence de de la base de données.
|
||||||
|
* @author pabr6
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class CreerBaseParDefautListesEtudiants {
|
||||||
|
public Boolean isExist() throws IOException {
|
||||||
|
File file = null;
|
||||||
|
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||||
|
|
||||||
|
if(commandes.os.contains("Win")) {
|
||||||
|
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||||
|
}else {
|
||||||
|
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!file.exists()) {
|
||||||
|
Date aujourdhui = new Date();
|
||||||
|
Path outputFilePath = file.toPath();
|
||||||
|
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
|
||||||
|
try {
|
||||||
|
fichier.write("<ListesEtudiants date=\""+ calcul.formatDateWriter.DateLibreOffice(aujourdhui) +"\" version=\""+commandes.version +"\"></ListesEtudiants>");
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
fichier.close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return new recupeNodeBaseListesEtudiants().isHasliste();
|
||||||
|
}
|
||||||
|
}
|
13
src/analyseWriter/baseListesEtudiants/EmailValidator.java
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package analyseWriter.baseListesEtudiants;
|
||||||
|
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
public class EmailValidator {
|
||||||
|
public static boolean isValidEmail(String email) {
|
||||||
|
String emailPattern = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$";
|
||||||
|
Pattern pattern = Pattern.compile(emailPattern);
|
||||||
|
Matcher matcher = pattern.matcher(email);
|
||||||
|
return matcher.matches();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package analyseWriter.baseListesEtudiants;
|
||||||
|
|
||||||
|
import calc.commandes;
|
||||||
|
|
||||||
|
public class chargeListeEtudiants {
|
||||||
|
|
||||||
|
public static void chargeDansleNodeCSVListeEtudiants(Integer index) {
|
||||||
|
if(commandes.listesEtudiants!=null) {
|
||||||
|
if(commandes.listesEtudiants.getEnfants().size()>index && index >= 0 ) {
|
||||||
|
commandes.nodeCSV = commandes.listesEtudiants.getEnfants().get(index);
|
||||||
|
commandes.fourniCSV=true;
|
||||||
|
}else {
|
||||||
|
commandes.nodeCSV = null;
|
||||||
|
commandes.fourniCSV=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void chargeDansLeNodeCSVListeEtudiants(String nameListe) {
|
||||||
|
if(commandes.listesEtudiants!=null) {
|
||||||
|
if(commandes.listesEtudiants.getEnfants().size()>0) {
|
||||||
|
commandes.nodeCSV = commandes.listesEtudiants.retourneFirstEnfant("fileCSV", "nameListStudent", nameListe);
|
||||||
|
if(commandes.nodeCSV!=null) {
|
||||||
|
commandes.fourniCSV=true;
|
||||||
|
}else {
|
||||||
|
commandes.fourniCSV=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,204 @@
|
|||||||
|
package analyseWriter.baseListesEtudiants;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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.text.ParseException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
|
||||||
|
import calc.commandes;
|
||||||
|
import xml.node;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class ecritureBaseListesEtudiants {
|
||||||
|
|
||||||
|
|
||||||
|
private static boolean erreur = false;
|
||||||
|
|
||||||
|
public ecritureBaseListesEtudiants(node csv) {
|
||||||
|
erreur = false;
|
||||||
|
|
||||||
|
if(csv==null) {
|
||||||
|
JFrame frame = new JFrame();
|
||||||
|
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||||
|
+ "<p>Le fichier CSV est null.</p></html>");
|
||||||
|
JOptionPane.showMessageDialog(frame, texte);
|
||||||
|
erreur=true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(csv.isVide()) {
|
||||||
|
JFrame frame = new JFrame();
|
||||||
|
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||||
|
+ "<p>Le fichier CSV est vide.</p></html>");
|
||||||
|
JOptionPane.showMessageDialog(frame, texte);
|
||||||
|
erreur=true;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
File file = null;
|
||||||
|
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||||
|
|
||||||
|
if(commandes.os.contains("Win")) {
|
||||||
|
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||||
|
}else {
|
||||||
|
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!Files.isWritable(file.toPath())) {
|
||||||
|
JFrame frame = new JFrame();
|
||||||
|
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||||
|
+ "<p>"+ file.getAbsolutePath() +"</p><p>Vous devez avoir des droits pour écrire dans ce dossier.</p></html>");
|
||||||
|
JOptionPane.showMessageDialog(frame, texte);
|
||||||
|
erreur=true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
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("<\\bfileCSV\\b.{1,100}\\bnameListStudent\\b=\\\""+ csv.getAttributs().get("nameListStudent") +"\\\".*?<\\/\\bfileCSV\\b>");
|
||||||
|
Matcher m = p.matcher(baseToString);
|
||||||
|
|
||||||
|
if(m.find()) {
|
||||||
|
//Supprime le node fileCSV pour le remplacer par le nouveau.
|
||||||
|
debut = baseToString.substring(0,m.start());
|
||||||
|
fin = baseToString.substring(m.end());
|
||||||
|
String codeXMLEvaluation = csv.ecritureXML().toString(); //Run.ecritureNode(csv, 0).toString().replace("\t","").replace("\r", "").replace("\n", "").replaceAll(">/{1,}<","><");
|
||||||
|
XMLBase = debut + codeXMLEvaluation + fin;
|
||||||
|
}else {
|
||||||
|
//Ajoute une nouvelle liste (fileCSV) au début de la base
|
||||||
|
p = Pattern.compile("<ListesEtudiants.*?>");
|
||||||
|
m = p.matcher(baseToString);
|
||||||
|
if(m.find()) {
|
||||||
|
debut = baseToString.substring(0,m.end());
|
||||||
|
fin = baseToString.substring(m.end());
|
||||||
|
String codeXMLEvaluation = csv.ecritureXML().toString();//Run.ecritureNode(csv, 0).toString().replace("\t","").replace("\r", "").replace("\n", "").replaceAll(">/{1,}<","><");
|
||||||
|
XMLBase = debut + codeXMLEvaluation + fin;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
// écriture du node
|
||||||
|
Path outputFilePath = file.toPath();
|
||||||
|
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>La liste <b>"+csv.getAttributs().get("nameListStudent")+ "</b> a été enregistrée dans la base de données.</p>"
|
||||||
|
+ "<p>"+ file.getAbsolutePath() +"</p></html>");
|
||||||
|
JOptionPane.showMessageDialog(frame, texte);
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
JFrame frame = new JFrame();
|
||||||
|
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||||
|
+ "<p>"+e.getMessage()+"</p></html>");
|
||||||
|
JOptionPane.showMessageDialog(frame, texte);
|
||||||
|
erreur=true;
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mise à jour de la base liste des étudiants.
|
||||||
|
*/
|
||||||
|
public static void majBaseListesEtudiant() {
|
||||||
|
erreur=false;
|
||||||
|
|
||||||
|
if(commandes.listesEtudiants==null) {
|
||||||
|
JFrame frame = new JFrame();
|
||||||
|
JLabel texte = new JLabel("<html><h1>La liste des étudiant est nulle.</h1>"
|
||||||
|
+ "</html>");
|
||||||
|
JOptionPane.showMessageDialog(frame, texte);
|
||||||
|
erreur=true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
File file = null;
|
||||||
|
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||||
|
|
||||||
|
if(commandes.os.contains("Win")) {
|
||||||
|
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||||
|
}else {
|
||||||
|
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!Files.isWritable(file.toPath())) {
|
||||||
|
JFrame frame = new JFrame();
|
||||||
|
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||||
|
+ "<p>"+ file.getAbsolutePath() +"</p><p>Vous devez avoir des droits pour écrire dans ce dossier.</p></html>");
|
||||||
|
JOptionPane.showMessageDialog(frame, texte);
|
||||||
|
erreur=true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// écriture du node
|
||||||
|
|
||||||
|
try {
|
||||||
|
Path outputFilePath = file.toPath();
|
||||||
|
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
|
||||||
|
Date aujourdhui = new Date();
|
||||||
|
commandes.listesEtudiants.getAttributs().put("date", calcul.formatDateWriter.DateLibreOffice(aujourdhui));
|
||||||
|
commandes.listesEtudiants.getAttributs().put("version",commandes.version);
|
||||||
|
fichier.write(commandes.listesEtudiants.ecritureXML().toString());
|
||||||
|
fichier.close();
|
||||||
|
} catch (IOException | ParseException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
JFrame frame = new JFrame();
|
||||||
|
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||||
|
+ "<p>"+e.getMessage()+"</p></html>");
|
||||||
|
JOptionPane.showMessageDialog(frame, texte);
|
||||||
|
erreur=true;
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isErreur() {
|
||||||
|
return erreur;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
13
src/analyseWriter/baseListesEtudiants/idValidator.java
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package analyseWriter.baseListesEtudiants;
|
||||||
|
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
public class idValidator {
|
||||||
|
public static boolean isValidId(String id) {
|
||||||
|
String idPattern = "^[0-9]{8}$";
|
||||||
|
Pattern pattern = Pattern.compile(idPattern);
|
||||||
|
Matcher matcher = pattern.matcher(id);
|
||||||
|
return matcher.matches();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
package analyseWriter.baseListesEtudiants;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.swing.table.AbstractTableModel;
|
||||||
|
|
||||||
|
import calc.commandes;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author pabr6
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class myTableBaseListesEtudiants extends AbstractTableModel{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private String[][] listes = new String[0][2];
|
||||||
|
private List<String> columNames = new ArrayList<>(Arrays.asList(new String[] {"Nom de la liste","Année", "Nombre d'étudiant"}));
|
||||||
|
@Override
|
||||||
|
public int getRowCount() {
|
||||||
|
return listes.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getColumnCount() {
|
||||||
|
return columNames.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||||
|
return listes[rowIndex][columnIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
|
||||||
|
listes[rowIndex][columnIndex] = (String) aValue;
|
||||||
|
fireTableCellUpdated(rowIndex, columnIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColumnName(int column) {
|
||||||
|
return columNames.get(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNameListe(int rowIndex){
|
||||||
|
return listes[rowIndex][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addOrUpdate() {
|
||||||
|
new recupeNodeBaseListesEtudiants();
|
||||||
|
listes = new String[commandes.listesEtudiants.getEnfants().size()][columNames.size()];
|
||||||
|
for(int i = 0 ; i<commandes.listesEtudiants.getEnfants().size();i++) {
|
||||||
|
listes[i][0] = commandes.listesEtudiants.getEnfants().get(i).getAttributs().get("nameListStudent");
|
||||||
|
listes[i][1] = commandes.listesEtudiants.getEnfants().get(i).getAttributs().get("year");
|
||||||
|
listes[i][2] = String.valueOf(commandes.listesEtudiants.getEnfants().get(i).getEnfants().size());
|
||||||
|
}
|
||||||
|
fireTableRowsInserted(0, commandes.listesEtudiants.getEnfants().size()-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
108
src/analyseWriter/baseListesEtudiants/myTableStudent.java
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
package analyseWriter.baseListesEtudiants;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.swing.table.AbstractTableModel;
|
||||||
|
|
||||||
|
import calc.commandes;
|
||||||
|
import xml.node;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author pabr6
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class myTableStudent extends AbstractTableModel{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private String[][] listes = new String[0][3];
|
||||||
|
private List<String> columNames = new ArrayList<>(Arrays.asList(new String[] {"Nom","prénom", "identifiant","email"}));
|
||||||
|
@Override
|
||||||
|
public int getRowCount() {
|
||||||
|
return listes.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getColumnCount() {
|
||||||
|
return columNames.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||||
|
return listes[rowIndex][columnIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
|
||||||
|
listes[rowIndex][columnIndex] = (String) aValue;
|
||||||
|
fireTableCellUpdated(rowIndex, columnIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColumnName(int column) {
|
||||||
|
return columNames.get(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNameListe(int rowIndex){
|
||||||
|
return listes[rowIndex][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addOrUpdate() {
|
||||||
|
if(commandes.nodeCSV==null) {
|
||||||
|
listes = new String[0][columNames.size()];
|
||||||
|
fireTableRowsInserted(0, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!commandes.nodeCSV.isVide()) {
|
||||||
|
String name = commandes.nodeCSV.getAttributs().get("name");
|
||||||
|
String firstname = commandes.nodeCSV.getAttributs().get("firstname");
|
||||||
|
String id = commandes.nodeCSV.getAttributs().get("id");
|
||||||
|
String email = commandes.nodeCSV.getAttributs().get("email");
|
||||||
|
|
||||||
|
node nodeImport = commandes.sujet.retourneFirstEnfant("import_moodle");
|
||||||
|
|
||||||
|
if(name==null) name = nodeImport.getAttributs().get("name");
|
||||||
|
if(firstname==null) firstname = nodeImport.getAttributs().get("firstname");
|
||||||
|
if(id==null) id = nodeImport.getAttributs().get("id");
|
||||||
|
if(email==null) email = nodeImport.getAttributs().get("email");
|
||||||
|
|
||||||
|
listes = new String[commandes.nodeCSV.getEnfants().size()][columNames.size()];
|
||||||
|
for(int i = 0 ; i<commandes.nodeCSV.getEnfants().size();i++) {
|
||||||
|
if(commandes.nodeCSV.getEnfants().get(i).getAttributs().get(name)!=null &&
|
||||||
|
commandes.nodeCSV.getEnfants().get(i).getAttributs().get(firstname)!=null &&
|
||||||
|
commandes.nodeCSV.getEnfants().get(i).getAttributs().get(id)!=null &&
|
||||||
|
commandes.nodeCSV.getEnfants().get(i).getAttributs().get(email)!=null) {
|
||||||
|
listes[i][0] = commandes.nodeCSV.getEnfants().get(i).getAttributs().get(name);
|
||||||
|
listes[i][1] = commandes.nodeCSV.getEnfants().get(i).getAttributs().get(firstname);
|
||||||
|
listes[i][2] = commandes.nodeCSV.getEnfants().get(i).getAttributs().get(id);
|
||||||
|
listes[i][3] = commandes.nodeCSV.getEnfants().get(i).getAttributs().get(email);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fireTableRowsInserted(0, commandes.nodeCSV.getEnfants().size()-1);
|
||||||
|
}else {
|
||||||
|
listes = new String[0][columNames.size()];
|
||||||
|
fireTableRowsInserted(0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeRow(int row) {
|
||||||
|
if (row >= 0 && row < commandes.nodeCSV.getEnfants().size()) {
|
||||||
|
commandes.nodeCSV.getEnfants().remove(row);
|
||||||
|
fireTableRowsDeleted(row, row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addStudent(node newStudent) {
|
||||||
|
if(commandes.nodeCSV!=null) {
|
||||||
|
commandes.nodeCSV.getEnfants().add(newStudent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package analyseWriter.baseListesEtudiants;
|
||||||
|
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
public class nameStudentValidator {
|
||||||
|
public static boolean isValidName(String name) {
|
||||||
|
String namePattern = "^[a-zA-Z -]+?$";
|
||||||
|
Pattern pattern = Pattern.compile(namePattern);
|
||||||
|
Matcher matcher = pattern.matcher(name);
|
||||||
|
return matcher.matches();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,73 @@
|
|||||||
|
package analyseWriter.baseListesEtudiants;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
|
||||||
|
import calc.commandes;
|
||||||
|
import xml.node;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author pabr6
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class recupeNodeBaseListesEtudiants {
|
||||||
|
private boolean Hasliste = false;
|
||||||
|
|
||||||
|
public recupeNodeBaseListesEtudiants() {
|
||||||
|
File file = null;
|
||||||
|
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||||
|
|
||||||
|
if(commandes.os.contains("Win")) {
|
||||||
|
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||||
|
}else {
|
||||||
|
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(file!=null) {
|
||||||
|
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 codeTexte = "<!-- A -->" + targetString.toString().replace("\t","").replace("\r", "").replace("\n", "");
|
||||||
|
codeTexte = codeTexte.replaceAll(">/{1,}<", "><");
|
||||||
|
node nodRetourne = new node(codeTexte);
|
||||||
|
|
||||||
|
if(nodRetourne.getNameNode().equals("fichier")) {
|
||||||
|
nodRetourne.setNameNode("ListesEtudiants");
|
||||||
|
}
|
||||||
|
|
||||||
|
commandes.listesEtudiants = nodRetourne;
|
||||||
|
if(nodRetourne.getEnfants().size()>0) Hasliste=true;
|
||||||
|
|
||||||
|
}catch (Exception e) {
|
||||||
|
JLabel texte = new JLabel("<html><p>La base de données des listes des étudiants<br>n'est pas située dans le même répertoire que celui de l'application.</p></html>");
|
||||||
|
JOptionPane.showMessageDialog(null, texte);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHasliste() {
|
||||||
|
return Hasliste;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHasliste(boolean hasliste) {
|
||||||
|
Hasliste = hasliste;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -75,8 +75,8 @@ public class chargeEvaluation {
|
|||||||
calc.commandes.path = evaluation.getAttributs().get("path"); //Dossier des fichiers des étudiants
|
calc.commandes.path = evaluation.getAttributs().get("path"); //Dossier des fichiers des étudiants
|
||||||
|
|
||||||
// Chargement du node sujet depuis la base
|
// Chargement du node sujet depuis la base
|
||||||
calc.commandes.nameSujet = evaluation.getAttributs().get("analysis_filename");
|
calc.commandes.nameSujet = evaluation.retourneFirstEnfant("root").getAttributs().get("analysis_filename");
|
||||||
calc.commandes.sujet = evaluation.retourneFirstEnfant("fichier");
|
calc.commandes.sujet = evaluation.retourneFirstEnfant("classeur");
|
||||||
calc.commandes.PathFilenameAnalysis = evaluation.getAttributs().get("PathFilenameAnalysis");
|
calc.commandes.PathFilenameAnalysis = evaluation.getAttributs().get("PathFilenameAnalysis");
|
||||||
|
|
||||||
//** Les paramètres de l'évaluation
|
//** Les paramètres de l'évaluation
|
||||||
@ -104,23 +104,24 @@ public class chargeEvaluation {
|
|||||||
|
|
||||||
|
|
||||||
calc.commandes.nodeCSV = evaluation.retourneFirstEnfant("fileCSV");
|
calc.commandes.nodeCSV = evaluation.retourneFirstEnfant("fileCSV");
|
||||||
if(!calc.commandes.nodeCSV.isVide()) {
|
if(calc.commandes.nodeCSV!=null)if(!calc.commandes.nodeCSV.isVide()) {
|
||||||
if(calc.commandes.nodeCSV.getAttributs().get("nameListStudent")!=null) {
|
if(calc.commandes.nodeCSV.getAttributs().get("nameListStudent")!=null) {
|
||||||
String nameListeStudent = calc.commandes.nodeCSV.getAttributs().get("nameListStudent");
|
String nameListeStudent = calc.commandes.nodeCSV.getAttributs().get("nameListStudent");
|
||||||
chargeListeEtudiants.chargeDansLeNodeCSVListeEtudiants(nameListeStudent);
|
chargeListeEtudiants.chargeDansLeNodeCSVListeEtudiants(nameListeStudent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// commandes.contenuFichierSVG = evaluation.retourneFirstEnfantsByName("nodSVG").retourneLesContenusEnfants("");
|
|
||||||
|
|
||||||
calc.commandes.fichierAnalyseValide = true;
|
calc.commandes.fichierAnalyseValide = true;
|
||||||
|
|
||||||
|
if(calc.commandes.sujet!=null) {
|
||||||
try {
|
try {
|
||||||
calc.commandes.sujetSauvegarde = calc.commandes.sujet.clone();
|
calc.commandes.sujetSauvegarde = calc.commandes.sujet.clone();
|
||||||
} catch (CloneNotSupportedException e) {
|
} catch (CloneNotSupportedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Chargement des paramètres du fichier d'analyse
|
//Chargement des paramètres du fichier d'analyse
|
||||||
new chargementParametresFichierAnalyse();
|
new chargementParametresFichierAnalyse();
|
||||||
|
@ -45,6 +45,9 @@ public class creerNouvelleEvaluation {
|
|||||||
if(nameEvaluation==null) {
|
if(nameEvaluation==null) {
|
||||||
JOptionPane.showMessageDialog(null, "L'évaluation ne possède pas de nom");
|
JOptionPane.showMessageDialog(null, "L'évaluation ne possède pas de nom");
|
||||||
return evaluation;
|
return evaluation;
|
||||||
|
} else if (nameEvaluation.isBlank()) {
|
||||||
|
JOptionPane.showMessageDialog(null, "L'évaluation ne possède pas de nom");
|
||||||
|
return evaluation;
|
||||||
}
|
}
|
||||||
|
|
||||||
// création du nouveau node evaluation
|
// création du nouveau node evaluation
|
||||||
|
@ -79,7 +79,7 @@ public class ecritureBaseEvaluation {
|
|||||||
XMLBase = debut + evaluation.ecritureXML().toString() + fin;
|
XMLBase = debut + evaluation.ecritureXML().toString() + fin;
|
||||||
}else {
|
}else {
|
||||||
//Ajoute une nouvelle évaluation au début de la base
|
//Ajoute une nouvelle évaluation au début de la base
|
||||||
p = Pattern.compile("<evaluations.*?>");
|
p = Pattern.compile("<evaluationsCalc.*?>");
|
||||||
m = p.matcher(baseToString);
|
m = p.matcher(baseToString);
|
||||||
if(m.find()) {
|
if(m.find()) {
|
||||||
debut = baseToString.substring(0,m.end());
|
debut = baseToString.substring(0,m.end());
|
||||||
|
@ -66,9 +66,11 @@ public class myTableBaseEvaluation extends AbstractTableModel{
|
|||||||
evaluation[i][2] = dateCreation;
|
evaluation[i][2] = dateCreation;
|
||||||
}
|
}
|
||||||
node fichier = calc.commandes.evaluationsBase.getEnfants().get(i).retourneFirstEnfant("classeur");
|
node fichier = calc.commandes.evaluationsBase.getEnfants().get(i).retourneFirstEnfant("classeur");
|
||||||
evaluation[i][3] = fichier.getAttributs().get("titre");
|
if(fichier!=null) {
|
||||||
evaluation[i][4] = fichier.getAttributs().get("metaSujet");
|
evaluation[i][3] = fichier.getAttributs().get("titre");
|
||||||
evaluation[i][5] = fichier.getAttributs().get("analysis_filename");
|
evaluation[i][4] = fichier.getAttributs().get("metaSujet");
|
||||||
|
evaluation[i][5] = fichier.getAttributs().get("analysis_filename");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fireTableRowsInserted(0, calc.commandes.evaluationsBase.getEnfants().size()-1);
|
fireTableRowsInserted(0, calc.commandes.evaluationsBase.getEnfants().size()-1);
|
||||||
}
|
}
|
||||||
|
111
src/baseEvaluation/removeEvaluation.java
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
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 xml.node;
|
||||||
|
import calc.*;
|
||||||
|
|
||||||
|
public class removeEvaluation {
|
||||||
|
|
||||||
|
public removeEvaluation(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());
|
||||||
|
XMLBase = debut + fin;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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>Suppression réussi</h1><p>L'évaluation <b>"+evaluation.getAttributs().get("name")+ "</b> a été supprimé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>La suppression n'a pas réussi</h1><p>L'évaluation <b>"+evaluation.getAttributs().get("name")+ "</b> n'a pas été supprimé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>La suppression n'a pas réussi</h1><p>L'évaluation <b>"+evaluation.getAttributs().get("name")+ "</b> n'a pas été supprimé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) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
71
src/baseEvaluation/trierParDateDecroissanteLaBase.java
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
package baseEvaluation;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import xml.node;
|
||||||
|
import calc.*;
|
||||||
|
|
||||||
|
public class trierParDateDecroissanteLaBase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tri la base des évaluation par date décroisante
|
||||||
|
*/
|
||||||
|
public trierParDateDecroissanteLaBase(){
|
||||||
|
ArrayList<node> evaluations = commandes.evaluationsBase.retourneAllEnfants("evaluation");
|
||||||
|
HashMap<Date, Integer> dateDictionary = new HashMap<Date, Integer>();
|
||||||
|
|
||||||
|
Date dateEvaluationCharger = new Date();
|
||||||
|
if(commandes.evaluationChargeEnMemoire!=null) {
|
||||||
|
dateEvaluationCharger = calcul.formatDateWriter.DateLibreOffice(commandes.evaluationChargeEnMemoire.getAttributs().get("date"));
|
||||||
|
System.out.println("dateEvaluationCharger="+dateEvaluationCharger);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i = 0 ; i < evaluations.size();i++) {
|
||||||
|
dateDictionary.put(calcul.formatDateWriter.DateLibreOffice(evaluations.get(i).getAttributs().get("date")),i);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convertir le HashMap en liste pour pouvoir trier les éléments
|
||||||
|
List<Map.Entry<Date, Integer>> list = new ArrayList<Map.Entry<Date, Integer>>(dateDictionary.entrySet());
|
||||||
|
|
||||||
|
// Trier la liste par ordre décroissant des dates
|
||||||
|
Collections.sort(list, Collections.reverseOrder(Map.Entry.comparingByKey()));
|
||||||
|
|
||||||
|
// Créer un nouveau LinkedHashMap pour stocker les éléments triés
|
||||||
|
LinkedHashMap<Date, Integer> sortedDateDictionary = new LinkedHashMap<Date, Integer>();
|
||||||
|
for (Map.Entry<Date, Integer> entry : list) {
|
||||||
|
sortedDateDictionary.put(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
//Parcourir
|
||||||
|
node nodeTemporaire = new node();
|
||||||
|
nodeTemporaire.setNameNode("temporaire");
|
||||||
|
int j=0;
|
||||||
|
for (Map.Entry<Date, Integer> entry : sortedDateDictionary.entrySet()) {
|
||||||
|
System.out.println("Key : " + entry.getKey() + " | Value : " + entry.getValue());
|
||||||
|
nodeTemporaire.getEnfants().add(j,commandes.evaluationsBase.getEnfants().get(entry.getValue()));
|
||||||
|
if(commandes.evaluationChargeEnMemoire!=null) {
|
||||||
|
if( (entry.getKey().equals(dateEvaluationCharger)) ) {
|
||||||
|
if(commandes.evaluationsBase.getEnfants().get(entry.getValue()).getAttributs().get("name").equals(commandes.NameEvaluationCharger)) {
|
||||||
|
commandes.IndexEvaluationCharger = j;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ajoute à la base
|
||||||
|
commandes.evaluationsBase.getEnfants().clear();
|
||||||
|
for(int i = 0 ; i < nodeTemporaire.getEnfants().size();i++) {
|
||||||
|
commandes.evaluationsBase.getEnfants().add(nodeTemporaire.getEnfants().get(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -157,11 +157,14 @@ public class chargementParametresFichierAnalyse {
|
|||||||
//*****************************************************************
|
//*****************************************************************
|
||||||
//** chargement de la culture qui se trouve dans le node setting **
|
//** chargement de la culture qui se trouve dans le node setting **
|
||||||
//*****************************************************************
|
//*****************************************************************
|
||||||
if(commandes.sujet.retourneFirstEnfant("setting").isHasAttributs()) {
|
if(commandes.sujet.containChildByName("setting")) {
|
||||||
if(commandes.sujet.retourneFirstEnfant("setting").getAttributs().get("culture")!=null) {
|
if(commandes.sujet.retourneFirstEnfant("setting").isHasAttributs()) {
|
||||||
commandes.culture = commandes.sujet.retourneFirstEnfant("setting").getAttributs().get("culture"); //récupère la culture de l'utilisateur
|
if(commandes.sujet.retourneFirstEnfant("setting").getAttributs().get("culture")!=null) {
|
||||||
|
commandes.culture = commandes.sujet.retourneFirstEnfant("setting").getAttributs().get("culture"); //récupère la culture de l'utilisateur
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*******************************************************************
|
//*******************************************************************
|
||||||
//** Charge pour la taille et le nom de l'archive de l'archive ZIP **
|
//** Charge pour la taille et le nom de l'archive de l'archive ZIP **
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
package analyseWriter.fenetres;
|
package fenetres;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
@ -21,10 +23,12 @@ import javax.swing.JLabel;
|
|||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||||
|
|
||||||
import analyseWriter.MEPTL.commandes;
|
import baseEvaluation.creerNouvelleEvaluation;
|
||||||
import analyseWriter.baseEvaluations.creerNouvelleEvaluation;
|
import baseEvaluation.recupeNodeBaseEvaluations;
|
||||||
import analyseWriter.baseEvaluations.recupeNodeBaseEvaluations;
|
import calc.commandes;
|
||||||
import cXML.node;
|
import xml.node;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -161,15 +165,15 @@ public class ChargePathBaseEvaluation extends JFileChooser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for(int i = 0 ; i < evaluations.getNodes().size();i++) {
|
for(int i = 0 ; i < evaluations.getEnfants().size();i++) {
|
||||||
String date = evaluations.getNodes().get(i).getAttributs().get("date");
|
String date = evaluations.getEnfants().get(i).getAttributs().get("date");
|
||||||
if(date==null) continue;
|
if(date==null) continue;
|
||||||
ArrayList<node> A = copieDefault.retourneEnfantsByNameAndValueAttribut("evaluation", "date", date, new ArrayList<node>());
|
ArrayList<node> A = copieDefault.retourneAllEnfants("evaluation", "date", date);
|
||||||
|
|
||||||
// l'évaluation n'existe pas dans la base par défaut et ce n'est pas une importation
|
// l'évaluation n'existe pas dans la base par défaut et ce n'est pas une importation
|
||||||
if(A.size()==0) {
|
if(A.size()==0) {
|
||||||
String name = evaluations.getNodes().get(i).getAttributs().get("name");
|
String name = evaluations.getEnfants().get(i).getAttributs().get("name");
|
||||||
new creerNouvelleEvaluation(evaluations.getNodes().get(i), name, false,true);
|
new creerNouvelleEvaluation(evaluations.getEnfants().get(i), name, false,true);
|
||||||
}else {
|
}else {
|
||||||
// L'évaluation existe dans la base par défaut
|
// L'évaluation existe dans la base par défaut
|
||||||
// for(int j = 0; j < A.size();j++) {
|
// for(int j = 0; j < A.size();j++) {
|
||||||
|
493
src/fenetres/CustomInputDialogListeEtudiant.java
Normal file
@ -0,0 +1,493 @@
|
|||||||
|
package fenetres;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Font;
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
|
||||||
|
import javax.swing.ImageIcon;
|
||||||
|
import javax.swing.JFileChooser;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
import javax.swing.SwingConstants;
|
||||||
|
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||||
|
|
||||||
|
import analyseWriter.baseListesEtudiants.ecritureBaseListesEtudiants;
|
||||||
|
import calc.commandes;
|
||||||
|
import xml.node;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class permettant de générer une<br>
|
||||||
|
* boite de dialogue pour charger une liste d'étudiants<br>
|
||||||
|
* dans le node commandes.NodeCSV.<br><br>
|
||||||
|
* Cette méthode fait appel à la méthode,<br>
|
||||||
|
* meptl.chargementFichierCSV(nameListStudent, textFieldYear.getText())<br>
|
||||||
|
* <br>
|
||||||
|
* @author pabr6
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class CustomInputDialogListeEtudiant {
|
||||||
|
/**
|
||||||
|
* Class permettant de générer une<br>
|
||||||
|
* boite de dialogue pour charger une liste d'étudiants<br>
|
||||||
|
* dans le node commandes.NodeCSV.<br><br>
|
||||||
|
* Cette méthode fait appel à la méthode,<br>
|
||||||
|
* meptl.chargementFichierCSV(nameListStudent, textFieldYear.getText())<br>
|
||||||
|
* <br>
|
||||||
|
* @return
|
||||||
|
* 1- Le nom de la liste des étudiants (la liste est chargé).<br>
|
||||||
|
* 2- Code_Annule (ce qui signifie que la liste n'a pas été chargé).<br>
|
||||||
|
*/
|
||||||
|
public static String showCustominputDialog() {
|
||||||
|
String separateur ="";
|
||||||
|
String encodage ="";
|
||||||
|
String email ="inconnu";
|
||||||
|
String name = "inconnu";
|
||||||
|
String firstname = "inconnu";
|
||||||
|
String id = "inconnu";
|
||||||
|
String nameListStudent = "";
|
||||||
|
if(commandes.fichierAnalyseValide) {
|
||||||
|
if(commandes.fourniCSV) {
|
||||||
|
node CSV = commandes.sujet.retourneFirstEnfant("csv");
|
||||||
|
separateur = CSV.getAttributs().get("separator");
|
||||||
|
encodage = CSV.getAttributs().get("encoding");
|
||||||
|
node importCSV = CSV.retourneFirstEnfant("import_moodle");
|
||||||
|
if(CSV.isHasAttributs()) {
|
||||||
|
if(importCSV.getAttributs().get("email")!=null) {
|
||||||
|
email = importCSV.getAttributs().get("email");
|
||||||
|
}
|
||||||
|
if(importCSV.getAttributs().get("name")!=null) {
|
||||||
|
name = importCSV.getAttributs().get("name");
|
||||||
|
}
|
||||||
|
if(importCSV.getAttributs().get("firstname")!=null) {
|
||||||
|
firstname = importCSV.getAttributs().get("firstname");
|
||||||
|
}
|
||||||
|
if(importCSV.getAttributs().get("id")!=null) {
|
||||||
|
id = importCSV.getAttributs().get("id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(commandes.evaluationChargeEnMemoire.retourneFirstEnfant("fileCSV")!=null) {
|
||||||
|
if(commandes.evaluationChargeEnMemoire.retourneFirstEnfant("fileCSV").getAttributs().get("nameListStudent")!=null) {
|
||||||
|
nameListStudent = commandes.evaluationChargeEnMemoire.retourneFirstEnfant("fileCSV").getAttributs().get("nameListStudent");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
JLabel lblTitre = new JLabel("<html><h2>Ajouter une liste d'étudiant à l'évaluation<h2></html>");
|
||||||
|
lblTitre.setForeground(new Color(50,50,200));
|
||||||
|
|
||||||
|
JLabel lblExpliaction = new JLabel("<html><p>Le fichier au format CSV pour importer une liste d'étudiant doit avoir<br>"
|
||||||
|
+ "les caractéristiques suivantes :</p><br>"
|
||||||
|
+ "<p>Séparateur : <b>" + separateur +"</b><br>"
|
||||||
|
+ "Encodage : <b>" + encodage + "</b><br>"
|
||||||
|
+ "Nom des étudiants, la colonne : <b>" + name + "</b><br>"
|
||||||
|
+ "Prénom des étudiants, la colonne : <b>" + firstname + "</b><br>"
|
||||||
|
+ "Numéro des étudiants, la colonne : <b>" + id +"</b><br>"
|
||||||
|
+ "Courriel des étudiants, la colonne : <b>" + email + "</b></p><br>"
|
||||||
|
+ "</html>");
|
||||||
|
lblExpliaction.setFont(new Font("Tahoma", Font.BOLD, 12));
|
||||||
|
lblExpliaction.setForeground(Color.blue);
|
||||||
|
|
||||||
|
JTextField textField = new JTextField(String.valueOf(nameListStudent));
|
||||||
|
textField.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||||
|
textField.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
ImageIcon icon = new ImageIcon(create.class.getResource("/resources/fichierCSV.png"));
|
||||||
|
JTextField textFieldYear = new JTextField("2024");
|
||||||
|
|
||||||
|
Object[] message = {
|
||||||
|
lblTitre,
|
||||||
|
lblExpliaction,
|
||||||
|
"<html><p><b>Le nom d'une liste d'étudiant doit être unique.</b><br>"
|
||||||
|
+ "Sinon, les étudiants seront ajoutés à la liste existante.</p><br>"
|
||||||
|
+ "<p>Quel doit être le nom de cette liste ?</p></html>",
|
||||||
|
textField,
|
||||||
|
"<html><p>Quel est l'année ?</p></html>",
|
||||||
|
textFieldYear
|
||||||
|
};
|
||||||
|
|
||||||
|
String[] options = {"Importer la liste", "Annuler"};
|
||||||
|
|
||||||
|
int optionSelected = JOptionPane.showOptionDialog(
|
||||||
|
null,
|
||||||
|
message,
|
||||||
|
"Importer une liste d'étudiant.",
|
||||||
|
JOptionPane.DEFAULT_OPTION,
|
||||||
|
JOptionPane.INFORMATION_MESSAGE,
|
||||||
|
icon,
|
||||||
|
options,
|
||||||
|
options[0]);
|
||||||
|
|
||||||
|
if (optionSelected == 0) { // Bouton "Importer la liste" sélectionné
|
||||||
|
JFileChooser chooser = new JFileChooser();
|
||||||
|
chooser.setDialogTitle("Choisir un fichier CSV");
|
||||||
|
|
||||||
|
chooser.setCurrentDirectory(new java.io.File(commandes.path));
|
||||||
|
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
||||||
|
FileNameExtensionFilter filter = new FileNameExtensionFilter("Format CSV", "csv");
|
||||||
|
chooser.setFileFilter(filter);
|
||||||
|
chooser.setAcceptAllFileFilterUsed(true);
|
||||||
|
|
||||||
|
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
|
||||||
|
System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
|
||||||
|
System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
|
||||||
|
commandes.nameCSV = chooser.getSelectedFile().getAbsolutePath();
|
||||||
|
|
||||||
|
chargementFichierCSV(nameListStudent, textFieldYear.getText());
|
||||||
|
|
||||||
|
if(commandes.nodeCSV.getNbrEnfants()>=1) commandes.fourniCSV=true;
|
||||||
|
|
||||||
|
return nameListStudent;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "Code_Annule";
|
||||||
|
} else if (optionSelected == 1) { // Bouton "Désactivé" sélectionné
|
||||||
|
return "Code_Annule";
|
||||||
|
} else { // Si la boîte de dialogue est annulée ou fermée
|
||||||
|
return "Code_Annule";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Charge et ajoute dans le node <b>commandes.nodeCSV</b> la liste des étudiants.<br>
|
||||||
|
* Par défaut :
|
||||||
|
* La liste des étudiants doit contenir les champs <b>prenom</b>, <b>nom</b>, <b>identification</b>, <b>adresse</b><br>
|
||||||
|
* Le séparateur doit être le <b>point-virgule</b> et l'encodage <b>UTF-8</b>.<br>
|
||||||
|
* @param nameListStudent : le nom de la liste des étudiants.<br>
|
||||||
|
* @param Year : Année sous la forme d'une chaine de caractère.<br>
|
||||||
|
*/
|
||||||
|
public static void chargementFichierCSV(String nameListStudent, String Year) {
|
||||||
|
|
||||||
|
String targetString = "";
|
||||||
|
String cheminVersLeFichierCSV = "";
|
||||||
|
commandes.nameCSV = commandes.nameCSV.replace("\\", "/");
|
||||||
|
cheminVersLeFichierCSV = commandes.nameCSV;
|
||||||
|
|
||||||
|
try {
|
||||||
|
BufferedReader br = new BufferedReader(
|
||||||
|
new InputStreamReader(
|
||||||
|
new FileInputStream(cheminVersLeFichierCSV), "UTF-8"));
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null) {
|
||||||
|
targetString = targetString + line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] target = targetString.split("\\n");
|
||||||
|
node csv = commandes.sujet.retourneFirstEnfant("csv");
|
||||||
|
String separator = csv.getAttributs().get("separator");
|
||||||
|
String encoding = csv.getAttributs().get("encoding");
|
||||||
|
node import_csv = csv.retourneFirstEnfant("import_moodle");
|
||||||
|
String nameid = import_csv.getAttributs().get("id");
|
||||||
|
String nameemail = import_csv.getAttributs().get("email");
|
||||||
|
String nameStudent = import_csv.getAttributs().get("name");
|
||||||
|
String firstnameStudent = import_csv.getAttributs().get("firstname");
|
||||||
|
|
||||||
|
if(nameListStudent.isBlank()) nameListStudent=commandes.nameCSV;
|
||||||
|
if(Year.isBlank()) Year="2024";
|
||||||
|
|
||||||
|
commandes.nodeCSV.getAttributs().put("nameListStudent", nameListStudent);
|
||||||
|
commandes.nodeCSV.getAttributs().put("name", nameStudent);
|
||||||
|
commandes.nodeCSV.getAttributs().put("firstname", firstnameStudent);
|
||||||
|
commandes.nodeCSV.getAttributs().put("email", nameemail);
|
||||||
|
commandes.nodeCSV.getAttributs().put("id", nameid);
|
||||||
|
commandes.nodeCSV.getAttributs().put("separator", separator);
|
||||||
|
commandes.nodeCSV.getAttributs().put("encoding", encoding);
|
||||||
|
commandes.nodeCSV.getAttributs().put("year", Year);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(!target[0].contains(separator)||!target[0].contains(nameid)
|
||||||
|
||!target[0].contains(nameemail)||!target[0].contains(nameStudent)
|
||||||
|
||!target[0].contains(firstnameStudent)) {
|
||||||
|
JOptionPane.showMessageDialog(null, "Le fichier CSV ne correspond pas\nà la définition des paramètres d'importation", "Erreur CSV", JOptionPane.INFORMATION_MESSAGE);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String[] line1 = target[0].split(separator);
|
||||||
|
|
||||||
|
|
||||||
|
for(int i = 1 ; i < target.length ; i++) {
|
||||||
|
node nodeEtudiant = new node();
|
||||||
|
nodeEtudiant.setNameNode("student");
|
||||||
|
for(int j = 0 ; j < line1.length; j++) {
|
||||||
|
nodeEtudiant.getAttributs().put(line1[j], target[i].split(separator)[j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nodeEtudiant.getAttributs().get(nameemail)!=null
|
||||||
|
&& nodeEtudiant.getAttributs().get(nameid)!=null
|
||||||
|
&& nodeEtudiant.getNbrAttributs()==4) {
|
||||||
|
|
||||||
|
node n1 = commandes.nodeCSV.retourneFirstEnfant("student", nameid, nodeEtudiant.getAttributs().get(nameid));
|
||||||
|
node n2 = commandes.nodeCSV.retourneFirstEnfant("student", nameemail, nodeEtudiant.getAttributs().get(nameemail));
|
||||||
|
|
||||||
|
if(n1==null && n2==null) commandes.nodeCSV.getEnfants().add(nodeEtudiant);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class permettant de générer une<br>
|
||||||
|
* boite de dialogue pour écrire ou ajouter une liste d'étudiants<br>
|
||||||
|
* dans le node csv pour l'écriture.<br><br>
|
||||||
|
* Cette méthode fait appel à la méthode,<br>
|
||||||
|
* meptl.ecritureListeEtudiantsBaseFichierCSV(chemin vers fichier CSV, nameListStudent , year)<br>
|
||||||
|
* <br>
|
||||||
|
* @return
|
||||||
|
* 1- true lorsque le fichier est écrit.<br>
|
||||||
|
* 2- false lorsque le fichier n'a pas été écrit.<br>
|
||||||
|
*/
|
||||||
|
public static boolean showCustomDialogInputStudentBase() {
|
||||||
|
String separateur ="";
|
||||||
|
String encodage ="";
|
||||||
|
String email ="inconnu";
|
||||||
|
String name = "inconnu";
|
||||||
|
String firstname = "inconnu";
|
||||||
|
String id = "inconnu";
|
||||||
|
String nameListStudent = "";
|
||||||
|
if(commandes.fichierAnalyseValide) {
|
||||||
|
if(commandes.fourniCSV) {
|
||||||
|
node CSV = commandes.sujet.retourneFirstEnfant("csv");
|
||||||
|
separateur = CSV.getAttributs().get("separator");
|
||||||
|
encodage = CSV.getAttributs().get("encoding");
|
||||||
|
node importCSV = CSV.retourneFirstEnfant("import_moodle");
|
||||||
|
if(CSV.isHasAttributs()) {
|
||||||
|
if(importCSV.getAttributs().get("email")!=null) {
|
||||||
|
email = importCSV.getAttributs().get("email");
|
||||||
|
}
|
||||||
|
if(importCSV.getAttributs().get("name")!=null) {
|
||||||
|
name = importCSV.getAttributs().get("name");
|
||||||
|
}
|
||||||
|
if(importCSV.getAttributs().get("firstname")!=null) {
|
||||||
|
firstname = importCSV.getAttributs().get("firstname");
|
||||||
|
}
|
||||||
|
if(importCSV.getAttributs().get("id")!=null) {
|
||||||
|
id = importCSV.getAttributs().get("id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(commandes.evaluationChargeEnMemoire.retourneFirstEnfant("fileCSV")!=null) {
|
||||||
|
if(commandes.evaluationChargeEnMemoire.retourneFirstEnfant("fileCSV").getAttributs().get("nameListStudent")!=null) {
|
||||||
|
nameListStudent = commandes.evaluationChargeEnMemoire.retourneFirstEnfant("fileCSV").getAttributs().get("nameListStudent");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
JLabel lblTitre = new JLabel("<html><h2>Ajouter une liste d'étudiant à l'évaluation<h2></html>");
|
||||||
|
lblTitre.setForeground(new Color(50,50,200));
|
||||||
|
|
||||||
|
JLabel lblExpliaction = new JLabel("<html><p>Le fichier au format CSV pour importer une liste d'étudiant doit avoir<br>"
|
||||||
|
+ "les caractéristiques suivantes :</p><br>"
|
||||||
|
+ "<p>Séparateur : <b>" + separateur +"</b><br>"
|
||||||
|
+ "Encodage : <b>" + encodage + "</b><br>"
|
||||||
|
+ "Nom des étudiants, la colonne : <b>" + name + "</b><br>"
|
||||||
|
+ "Prénom des étudiants, la colonne : <b>" + firstname + "</b><br>"
|
||||||
|
+ "Numéro des étudiants, la colonne : <b>" + id +"</b><br>"
|
||||||
|
+ "Courriel des étudiants, la colonne : <b>" + email + "</b></p><br>"
|
||||||
|
+ "</html>");
|
||||||
|
lblExpliaction.setFont(new Font("Tahoma", Font.BOLD, 12));
|
||||||
|
lblExpliaction.setForeground(Color.blue);
|
||||||
|
|
||||||
|
JTextField textField = new JTextField(String.valueOf(nameListStudent));
|
||||||
|
textField.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||||
|
textField.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
ImageIcon icon = new ImageIcon(create.class.getResource("/resources/fichierCSV.png"));
|
||||||
|
JTextField textFieldYear = new JTextField("2024");
|
||||||
|
|
||||||
|
Object[] message = {
|
||||||
|
lblTitre,
|
||||||
|
lblExpliaction,
|
||||||
|
"<html><p><b>Le nom d'une liste d'étudiant doit être unique.</b><br>"
|
||||||
|
+ "Sinon, les étudiants seront ajoutés à la liste existante du même nom.</p><br>"
|
||||||
|
+ "<p>Quel doit être le nom de cette liste ?</p></html>",
|
||||||
|
textField,
|
||||||
|
"<html><p>Quel est l'année ?</p></html>",
|
||||||
|
textFieldYear
|
||||||
|
};
|
||||||
|
|
||||||
|
String[] options = {"Importer la liste", "Annuler"};
|
||||||
|
|
||||||
|
int optionSelected = JOptionPane.showOptionDialog(
|
||||||
|
null,
|
||||||
|
message,
|
||||||
|
"Importer une liste d'étudiant.",
|
||||||
|
JOptionPane.DEFAULT_OPTION,
|
||||||
|
JOptionPane.INFORMATION_MESSAGE,
|
||||||
|
icon,
|
||||||
|
options,
|
||||||
|
options[0]);
|
||||||
|
|
||||||
|
if (optionSelected == 0) { // Bouton "Importer la liste" sélectionné
|
||||||
|
JFileChooser chooser = new JFileChooser();
|
||||||
|
chooser.setDialogTitle("Choisir un fichier CSV");
|
||||||
|
|
||||||
|
chooser.setCurrentDirectory(new java.io.File(commandes.path));
|
||||||
|
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
||||||
|
FileNameExtensionFilter filter = new FileNameExtensionFilter("Format CSV", "csv");
|
||||||
|
chooser.setFileFilter(filter);
|
||||||
|
chooser.setAcceptAllFileFilterUsed(true);
|
||||||
|
|
||||||
|
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
|
||||||
|
|
||||||
|
if(Files.isReadable(chooser.getSelectedFile().toPath())) {
|
||||||
|
commandes.nameCSV = chooser.getSelectedFile().getAbsolutePath();
|
||||||
|
nameListStudent = textField.getText().toLowerCase().trim();
|
||||||
|
String year = textFieldYear.getText().toLowerCase().trim();
|
||||||
|
return ecritureListeEtudiantsBaseFichierCSV(chooser.getSelectedFile().getAbsolutePath(), nameListStudent , year);
|
||||||
|
}else {
|
||||||
|
JFrame frame = new JFrame();
|
||||||
|
JLabel texte = new JLabel("<html><h1>La lecture de la liste n'a pas réussi</h1>"
|
||||||
|
+ "<p>"+ chooser.getSelectedFile().getAbsolutePath() +"</p><p>Vous devez avoir des droits pour lire dans ce dossier.</p></html>");
|
||||||
|
JOptionPane.showMessageDialog(frame, texte);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
} else if (optionSelected == 1) { // Bouton "Désactivé" sélectionné
|
||||||
|
return false;
|
||||||
|
} else { // Si la boîte de dialogue est annulée ou fermée
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ajoute ou cré dans la base, la liste des étudiants.<br>
|
||||||
|
* L'ajout se fait depuis un fichier au format CSV.<br>
|
||||||
|
* Par défaut :
|
||||||
|
* La liste des étudiants doit contenir les champs <b>prenom</b>, <b>nom</b>, <b>identification</b>, <b>adresse</b><br>
|
||||||
|
* Le séparateur doit être le <b>point-virgule</b> et l'encodage <b>UTF-8</b>.<br>
|
||||||
|
* @param cheminVersLeFichierCSV : le chemin vers le fichier CSV.<br>
|
||||||
|
* @param nameListStudent : le nom de la liste des étudiants.<br>
|
||||||
|
* @param Year : Année sous la forme d'une chaine de caractère.<br>
|
||||||
|
* @return
|
||||||
|
* 1- True lorsque les étudiants ont été ajouté.<br>
|
||||||
|
* 2 - False lorsque les étudiants n'ont pas été ajouté.<br>
|
||||||
|
*/
|
||||||
|
public static Boolean ecritureListeEtudiantsBaseFichierCSV(String cheminVersLeFichierCSV, String nameListStudent, String Year) {
|
||||||
|
|
||||||
|
//Recupère la liste des étudiants nommée : nameListStudent
|
||||||
|
//Si la liste existe alors place les étudiants dans le node commandes.nodeCSV ou bien null
|
||||||
|
commandes.nodeCSV = null;
|
||||||
|
if(commandes.listesEtudiants!=null) {
|
||||||
|
commandes.nodeCSV = commandes.listesEtudiants.retourneFirstEnfant("fileCSV", "nameListStudent", nameListStudent);
|
||||||
|
commandes.nameCSV = cheminVersLeFichierCSV;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Le node csv contient les paramètres importations et la liste des étudiants.
|
||||||
|
node csv = null;
|
||||||
|
String separator = ";";
|
||||||
|
String encoding = "UTF-8";
|
||||||
|
String nameid = "id";
|
||||||
|
String nameemail = "email";
|
||||||
|
String nameStudent = "name";
|
||||||
|
String firstnameStudent = "firstname";
|
||||||
|
|
||||||
|
if(commandes.nodeCSV!=null) {
|
||||||
|
csv = commandes.nodeCSV;
|
||||||
|
separator = commandes.nodeCSV.getAttributs().get("separator");
|
||||||
|
encoding = commandes.nodeCSV.getAttributs().get("encoding");
|
||||||
|
nameid = commandes.nodeCSV.getAttributs().get("id");
|
||||||
|
nameemail = commandes.nodeCSV.getAttributs().get("email");
|
||||||
|
nameStudent = commandes.nodeCSV.getAttributs().get("name");
|
||||||
|
firstnameStudent = commandes.nodeCSV.getAttributs().get("firstname");
|
||||||
|
}else {
|
||||||
|
csv = commandes.sujet.retourneFirstEnfant("csv");
|
||||||
|
csv.getAttributs().put("nameListStudent", nameListStudent);
|
||||||
|
csv.getAttributs().put("year", Year);
|
||||||
|
|
||||||
|
separator = csv.getAttributs().get("separator");
|
||||||
|
encoding = csv.getAttributs().get("encoding");
|
||||||
|
node import_csv = csv.retourneFirstEnfant("import_moodle");
|
||||||
|
nameid = import_csv.getAttributs().get("id");
|
||||||
|
nameemail = import_csv.getAttributs().get("email");
|
||||||
|
nameStudent = import_csv.getAttributs().get("name");
|
||||||
|
firstnameStudent = import_csv.getAttributs().get("firstname");
|
||||||
|
csv.getEnfants().remove(import_csv);
|
||||||
|
csv.getAttributs().put("name", nameStudent);
|
||||||
|
csv.getAttributs().put("firstname", firstnameStudent);
|
||||||
|
csv.getAttributs().put("email", nameemail);
|
||||||
|
csv.getAttributs().put("id", nameid);
|
||||||
|
csv.setNameNode("fileCSV");
|
||||||
|
csv.getContenu().clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lecture du fichier CSV
|
||||||
|
String targetString = "";
|
||||||
|
try {
|
||||||
|
BufferedReader br = new BufferedReader(
|
||||||
|
new InputStreamReader(
|
||||||
|
new FileInputStream(cheminVersLeFichierCSV), encoding));
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null) {
|
||||||
|
targetString = targetString + line + "\n";
|
||||||
|
}
|
||||||
|
br.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] target = targetString.split("\\n");
|
||||||
|
|
||||||
|
if(!target[0].contains(separator)||!target[0].contains(nameid)
|
||||||
|
||!target[0].contains(nameemail)||!target[0].contains(nameStudent)
|
||||||
|
||!target[0].contains(firstnameStudent)) {
|
||||||
|
JOptionPane.showMessageDialog(null, "<html><p>Le fichier CSV ne correspond pas à la définition des paramètres d'importation.</p>"
|
||||||
|
+ "<p>Les paramètres d'importation sont :</p>"
|
||||||
|
+ "<ol><li>Séparateur : "+separator +"</li>"
|
||||||
|
+ "<li>Champ nom de l'étudiant : "+nameStudent+"</li>"
|
||||||
|
+ "<li>Champ prénom de l'étudiant : "+firstnameStudent+"</li>"
|
||||||
|
+ "<li>Champ identifiant de l'étudiant : " +nameid +"</li>"
|
||||||
|
+ "<li>Champ email de l'étudiant : "+nameemail +"</li></ol></html>", "Erreur CSV", JOptionPane.INFORMATION_MESSAGE);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] line1 = target[0].split(separator);
|
||||||
|
|
||||||
|
for(int i = 1 ; i < target.length ; i++) {
|
||||||
|
node nodeEtudiant = new node();
|
||||||
|
nodeEtudiant.setNameNode("student");
|
||||||
|
for(int j = 0 ; j < line1.length; j++) {
|
||||||
|
nodeEtudiant.getAttributs().put(line1[j], target[i].split(separator)[j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nodeEtudiant.getAttributs().get(nameemail)!=null
|
||||||
|
&& nodeEtudiant.getAttributs().get(nameid)!=null
|
||||||
|
&& nodeEtudiant.getNbrAttributs()==4) {
|
||||||
|
|
||||||
|
node n1 = csv.retourneFirstEnfant("student", nameid, nodeEtudiant.getAttributs().get(nameid));
|
||||||
|
node n2 = csv.retourneFirstEnfant("student", nameemail, nodeEtudiant.getAttributs().get(nameemail));
|
||||||
|
|
||||||
|
if(n1==null && n2==null) csv.getEnfants().add(nodeEtudiant);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
new ecritureBaseListesEtudiants(csv);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -35,11 +35,13 @@ import baseEvaluation.chargeEvaluation;
|
|||||||
import baseEvaluation.creerNouvelleEvaluation;
|
import baseEvaluation.creerNouvelleEvaluation;
|
||||||
import baseEvaluation.myTableBaseEvaluation;
|
import baseEvaluation.myTableBaseEvaluation;
|
||||||
import baseEvaluation.recupeNodeBaseEvaluations;
|
import baseEvaluation.recupeNodeBaseEvaluations;
|
||||||
|
import baseEvaluation.removeEvaluation;
|
||||||
|
import baseEvaluation.trierParDateDecroissanteLaBase;
|
||||||
|
import calc.commandes;
|
||||||
import net.lingala.zip4j.exception.ZipException;
|
import net.lingala.zip4j.exception.ZipException;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import xml.Zip;
|
import xml.Zip;
|
||||||
import xml.node;
|
import xml.node;
|
||||||
import calc.*;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
500
src/fenetres/baseDonneesListesEtudiants.java
Normal file
@ -0,0 +1,500 @@
|
|||||||
|
package fenetres;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Font;
|
||||||
|
import java.awt.GridLayout;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.awt.event.MouseAdapter;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
|
|
||||||
|
import javax.swing.ImageIcon;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JScrollPane;
|
||||||
|
import javax.swing.JTable;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
import javax.swing.ListSelectionModel;
|
||||||
|
import javax.swing.SwingConstants;
|
||||||
|
import javax.swing.event.ListSelectionEvent;
|
||||||
|
import javax.swing.event.ListSelectionListener;
|
||||||
|
import javax.swing.table.TableColumnModel;
|
||||||
|
|
||||||
|
import analyseWriter.baseListesEtudiants.EmailValidator;
|
||||||
|
import analyseWriter.baseListesEtudiants.chargeListeEtudiants;
|
||||||
|
import analyseWriter.baseListesEtudiants.ecritureBaseListesEtudiants;
|
||||||
|
import analyseWriter.baseListesEtudiants.idValidator;
|
||||||
|
import analyseWriter.baseListesEtudiants.myTableBaseListesEtudiants;
|
||||||
|
import analyseWriter.baseListesEtudiants.myTableStudent;
|
||||||
|
import analyseWriter.baseListesEtudiants.nameStudentValidator;
|
||||||
|
import calc.commandes;
|
||||||
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
import xml.node;
|
||||||
|
|
||||||
|
|
||||||
|
public class baseDonneesListesEtudiants extends JFrame{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private static baseDonneesListesEtudiants instance;
|
||||||
|
public static boolean isDispose = true;
|
||||||
|
private static JTable table;
|
||||||
|
private static JTable tableStudent;
|
||||||
|
private static myTableBaseListesEtudiants model = new myTableBaseListesEtudiants();
|
||||||
|
private static myTableStudent modelStudent = new myTableStudent();
|
||||||
|
private final JButton btnFermer = new JButton("<html><p>Femer</p></html>");
|
||||||
|
private JButton btnAddListeEtudiants = new JButton();
|
||||||
|
private JButton btnRemoveListe = new JButton("<html><p>Supprimer une liste</p></html>");
|
||||||
|
private JButton btnPasDeListe = new JButton();
|
||||||
|
private JButton btnAddNewStudent = new JButton("<html><p>Ajouter un nouvel étudiant</p></html>");
|
||||||
|
static JLabel lblNomListe = new JLabel("Pas de liste sélectionnée.");
|
||||||
|
JScrollPane scrollPaneTable = new JScrollPane();
|
||||||
|
JScrollPane scrollPaneBoutons = new JScrollPane();
|
||||||
|
private static int indexSelect=-1;
|
||||||
|
static ListSelectionModel lsm = null;
|
||||||
|
static ListSelectionModel rowSMTable = null;
|
||||||
|
|
||||||
|
public baseDonneesListesEtudiants() {
|
||||||
|
super();
|
||||||
|
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||||
|
setLocationRelativeTo( null );
|
||||||
|
setSize(1600,900);
|
||||||
|
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
|
||||||
|
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") );
|
||||||
|
setIconImage(img.getImage());
|
||||||
|
setTitle(commandes.Titre + " - La base de données des listes des étudiants");
|
||||||
|
|
||||||
|
JPanel panelHaut = new JPanel();
|
||||||
|
getContentPane().add(panelHaut, BorderLayout.NORTH);
|
||||||
|
|
||||||
|
JLabel lblNewLabel = new JLabel("");
|
||||||
|
lblNewLabel.setIcon(new ImageIcon(baseDonneesListesEtudiants.class.getResource("/resources/accueilBaseListesEtudiants.png")));
|
||||||
|
panelHaut.add(lblNewLabel);
|
||||||
|
|
||||||
|
JPanel panelBas = new JPanel();
|
||||||
|
getContentPane().add(panelBas, BorderLayout.SOUTH);
|
||||||
|
|
||||||
|
JPanel panelGauche = new JPanel();
|
||||||
|
panelGauche.setLayout(new MigLayout("", "[:300px:400px,fill]", "[53px][][][][39.00][][][][][30.00][20px:n][][][]"));
|
||||||
|
scrollPaneBoutons = new JScrollPane(panelGauche);
|
||||||
|
getContentPane().add(scrollPaneBoutons, BorderLayout.WEST);
|
||||||
|
|
||||||
|
|
||||||
|
model.addOrUpdate();
|
||||||
|
table = new JTable(model);
|
||||||
|
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
|
||||||
|
TableColumnModel columnModel = table.getColumnModel();
|
||||||
|
int minWidthColumn01 = 150;
|
||||||
|
int maxWidthColumn02 = 180;
|
||||||
|
columnModel.getColumn(0).setPreferredWidth(minWidthColumn01);
|
||||||
|
columnModel.getColumn(0).setMaxWidth(maxWidthColumn02);
|
||||||
|
columnModel.getColumn(1).setPreferredWidth(minWidthColumn01);
|
||||||
|
columnModel.getColumn(1).setMaxWidth(maxWidthColumn02);
|
||||||
|
columnModel.getColumn(2).setPreferredWidth(minWidthColumn01);
|
||||||
|
columnModel.getColumn(2).setMaxWidth(maxWidthColumn02);
|
||||||
|
|
||||||
|
table.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//*Détection de la ligne sélectionnée
|
||||||
|
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
|
rowSMTable = table.getSelectionModel();
|
||||||
|
|
||||||
|
// Ajout du label d'instruction
|
||||||
|
JPanel panelCentre = new JPanel();
|
||||||
|
panelCentre.setLayout(new BorderLayout());
|
||||||
|
|
||||||
|
JLabel lblInstruction = new JLabel("<html>Cliquez sur une ligne de la table ci-dessous<br>pour sélectionner une liste d'étudiants.</html>");
|
||||||
|
lblInstruction.setHorizontalAlignment(SwingConstants.CENTER);
|
||||||
|
lblInstruction.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||||
|
panelCentre.add(lblInstruction, BorderLayout.NORTH);
|
||||||
|
JScrollPane scrollPaneDroite = new JScrollPane(table);
|
||||||
|
panelCentre.add(scrollPaneDroite, BorderLayout.CENTER);
|
||||||
|
|
||||||
|
getContentPane().add(panelCentre, BorderLayout.EAST);
|
||||||
|
|
||||||
|
lblNomListe = new JLabel("Pas de liste sélectionnée.");
|
||||||
|
lblNomListe.setBackground(Color.GREEN);
|
||||||
|
lblNomListe.setHorizontalAlignment(SwingConstants.CENTER);
|
||||||
|
lblNomListe.setForeground(Color.RED);
|
||||||
|
lblNomListe.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||||
|
panelGauche.add(lblNomListe, "cell 0 0");
|
||||||
|
if(commandes.nodeCSV!=null) if(!commandes.nodeCSV.isVide()) {
|
||||||
|
if(commandes.nodeCSV.getAttributs().get("nameListStudent")!=null) {
|
||||||
|
lblNomListe.setText("Liste : " + commandes.nodeCSV.getAttributs().get("nameListStudent"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
btnAddListeEtudiants.setFont(new Font("Tahoma", Font.BOLD, 13));
|
||||||
|
btnAddListeEtudiants.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
btnAddListeEtudiants.setText("<html><p>Ajouter une liste ou des étudiants<br>à une liste depuis un fichier CSV</p></html>");
|
||||||
|
btnAddListeEtudiants.setIcon(new ImageIcon(baseDonneesEvaluations.class.getResource("/resources/addStudentbaselisteetudiant.png")));
|
||||||
|
panelGauche.add(btnAddListeEtudiants, "cell 0 1");
|
||||||
|
|
||||||
|
|
||||||
|
btnPasDeListe.setFont(new Font("Tahoma", Font.BOLD, 13));
|
||||||
|
btnPasDeListe.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
btnPasDeListe = new JButton("<html>Ne pas sélectionner de liste</html>");
|
||||||
|
btnPasDeListe.setFont(new Font("Tahoma", Font.BOLD, 13));
|
||||||
|
btnPasDeListe.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
btnPasDeListe.setIcon(new ImageIcon(baseDonneesEvaluations.class.getResource("/resources/nolistestudent.png")));
|
||||||
|
panelGauche.add(btnPasDeListe, "cell 0 2");
|
||||||
|
|
||||||
|
btnAddNewStudent.setFont(new Font("Tahoma", Font.BOLD, 13));
|
||||||
|
btnAddNewStudent.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
btnAddNewStudent.setIcon(new ImageIcon(baseDonneesEvaluations.class.getResource("/resources/addnewstudent.png")));
|
||||||
|
panelGauche.add(btnAddNewStudent, "cell 0 3");
|
||||||
|
|
||||||
|
btnRemoveListe.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
btnRemoveListe.setFont(new Font("Tahoma", Font.BOLD, 13));
|
||||||
|
btnRemoveListe.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
btnRemoveListe.setIcon(new ImageIcon(baseDonneesEvaluations.class.getResource("/resources/removeListe.png")));
|
||||||
|
btnRemoveListe.setText("Supprime une liste");
|
||||||
|
panelGauche.add(btnRemoveListe, "cell 0 5");
|
||||||
|
|
||||||
|
btnFermer.setIcon(new ImageIcon(baseDonneesEvaluations.class.getResource("/resources/quitteliste.png")));
|
||||||
|
btnFermer.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
btnFermer.setFont(new Font("Tahoma", Font.BOLD, 15));
|
||||||
|
panelGauche.add(btnFermer, "cell 0 6,growx,aligny top");
|
||||||
|
|
||||||
|
|
||||||
|
modelStudent.addOrUpdate();
|
||||||
|
tableStudent = new JTable(modelStudent);
|
||||||
|
tableStudent.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
|
||||||
|
TableColumnModel columnModelStudent = tableStudent.getColumnModel();
|
||||||
|
int minWidthColumn1 = 180;
|
||||||
|
int maxWidthColumn2 = 250;
|
||||||
|
columnModelStudent.getColumn(0).setPreferredWidth(minWidthColumn1);
|
||||||
|
columnModelStudent.getColumn(0).setMaxWidth(maxWidthColumn2);
|
||||||
|
columnModelStudent.getColumn(1).setPreferredWidth(minWidthColumn1);
|
||||||
|
columnModelStudent.getColumn(1).setMaxWidth(maxWidthColumn2);
|
||||||
|
columnModelStudent.getColumn(2).setPreferredWidth(minWidthColumn1-60);
|
||||||
|
columnModelStudent.getColumn(2).setMaxWidth(maxWidthColumn2);
|
||||||
|
columnModelStudent.getColumn(3).setPreferredWidth(minWidthColumn1+100);
|
||||||
|
columnModelStudent.getColumn(3).setMaxWidth(maxWidthColumn2);
|
||||||
|
|
||||||
|
tableStudent.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||||
|
|
||||||
|
|
||||||
|
scrollPaneTable = new JScrollPane(tableStudent);
|
||||||
|
getContentPane().add(scrollPaneTable, BorderLayout.CENTER);
|
||||||
|
|
||||||
|
|
||||||
|
ListenerAction();
|
||||||
|
ListenerTables();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void selectRow() {
|
||||||
|
if(indexSelect>=0 && indexSelect<=table.getRowCount()-1) {
|
||||||
|
table.setRowSelectionAllowed(true);
|
||||||
|
table.setRowSelectionInterval(indexSelect, indexSelect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static baseDonneesListesEtudiants getInstance(int indexRow) {
|
||||||
|
if (isDispose) {
|
||||||
|
instance = new baseDonneesListesEtudiants();
|
||||||
|
}else {
|
||||||
|
model.addOrUpdate();
|
||||||
|
table.setModel(model);
|
||||||
|
rowSMTable = table.getSelectionModel();
|
||||||
|
modelStudent.addOrUpdate();
|
||||||
|
tableStudent.setModel(modelStudent);
|
||||||
|
|
||||||
|
if(commandes.nodeCSV!=null) {
|
||||||
|
if(!commandes.nodeCSV.isVide()) {
|
||||||
|
if(commandes.nodeCSV.getAttributs().get("nameListStudent")!=null) {
|
||||||
|
lblNomListe.setText("Liste : " +commandes.nodeCSV.getAttributs().get("nameListStudent"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
lblNomListe.setText("Pas de liste sélectionnée.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
indexSelect = indexRow;
|
||||||
|
if(indexSelect>=0) {
|
||||||
|
selectRow();
|
||||||
|
}else {
|
||||||
|
table.setRowSelectionAllowed(false);
|
||||||
|
}
|
||||||
|
instance.setVisible(true);
|
||||||
|
isDispose=false;
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Si ReturnEvaluate alors recharge une nouvelle fois la fenêtre evaluate.
|
||||||
|
* @param returnEvaluate
|
||||||
|
*/
|
||||||
|
public static void ferme(boolean returnEvaluate) {
|
||||||
|
if(!isDispose) {
|
||||||
|
isDispose=true;
|
||||||
|
instance.dispose();
|
||||||
|
if(returnEvaluate) evaluate.getInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void ListenerAction() {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ferme la fenêtre.
|
||||||
|
*/
|
||||||
|
addWindowListener(new java.awt.event.WindowAdapter() {
|
||||||
|
@Override
|
||||||
|
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
|
||||||
|
evaluate.getInstance();
|
||||||
|
isDispose=true;
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Femer la fenêtre.
|
||||||
|
*/
|
||||||
|
btnFermer.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
ferme(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ajoute une liste ou des étudiants à une liste.
|
||||||
|
*/
|
||||||
|
btnAddListeEtudiants.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
CustomInputDialogListeEtudiant.showCustomDialogInputStudentBase();
|
||||||
|
model.addOrUpdate();
|
||||||
|
table.setModel(model);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
btnPasDeListe.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
commandes.nodeCSV = null;
|
||||||
|
baseDonneesListesEtudiants.getInstance(-1);
|
||||||
|
lblNomListe.setText("Pas de liste sélectionnée.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
btnAddNewStudent.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
|
||||||
|
if(commandes.nodeCSV == null) {
|
||||||
|
JOptionPane.showMessageDialog(null, "Veuillez sélectionner une liste d'étudiant.", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Créer des champs pour entrer les informations de l'étudiant
|
||||||
|
JTextField idField = new JTextField();
|
||||||
|
JTextField nameField = new JTextField();
|
||||||
|
JTextField prenomField = new JTextField();
|
||||||
|
JTextField courrielField = new JTextField();
|
||||||
|
|
||||||
|
// Créer un panneau pour les champs
|
||||||
|
JPanel panel = new JPanel(new GridLayout(0, 1));
|
||||||
|
panel.add(new JLabel("Nom :"));
|
||||||
|
panel.add(nameField);
|
||||||
|
panel.add(new JLabel("Prenom :"));
|
||||||
|
panel.add(prenomField);
|
||||||
|
panel.add(new JLabel("ID :"));
|
||||||
|
panel.add(idField);
|
||||||
|
panel.add(new JLabel("Courriel :"));
|
||||||
|
panel.add(courrielField);
|
||||||
|
|
||||||
|
// Afficher la boîte de dialogue
|
||||||
|
int result = JOptionPane.showConfirmDialog(null, panel, "Ajouter un étudiant", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
|
||||||
|
|
||||||
|
if (result == JOptionPane.OK_OPTION) {
|
||||||
|
try {
|
||||||
|
String name = nameField.getText();
|
||||||
|
String prenom = prenomField.getText();
|
||||||
|
String id = idField.getText();
|
||||||
|
String courriel = courrielField.getText();
|
||||||
|
|
||||||
|
if(!EmailValidator.isValidEmail(courriel)) {
|
||||||
|
JOptionPane.showMessageDialog(null, "Le courriel n'est pas correct.", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!idValidator.isValidId(id)) {
|
||||||
|
JOptionPane.showMessageDialog(null, "L'ID n'est pas correct.", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!nameStudentValidator.isValidName(name)) {
|
||||||
|
JOptionPane.showMessageDialog(null, "Le nom n'est pas correct.", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!nameStudentValidator.isValidName(prenom)) {
|
||||||
|
JOptionPane.showMessageDialog(null, "Le prenom n'est pas correct.", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String champNom = "name";
|
||||||
|
String champPrenom = "firstname";
|
||||||
|
String champId = "identification";
|
||||||
|
String champEmail = "adresse";
|
||||||
|
|
||||||
|
boolean erreur = false;
|
||||||
|
|
||||||
|
if(commandes.nodeCSV!=null) {
|
||||||
|
if(commandes.nodeCSV.getAttributs().get("id")!=null) champId = commandes.nodeCSV.getAttributs().get("id");
|
||||||
|
if(commandes.nodeCSV.getAttributs().get("email")!=null) champEmail = commandes.nodeCSV.getAttributs().get("email");
|
||||||
|
if(commandes.nodeCSV.getAttributs().get("name")!=null) champNom = commandes.nodeCSV.getAttributs().get("name");
|
||||||
|
if(commandes.nodeCSV.getAttributs().get("firstname")!=null) champPrenom = commandes.nodeCSV.getAttributs().get("firstname");
|
||||||
|
if(commandes.nodeCSV.retourneFirstEnfant("student", champId, id)!=null) erreur=true;
|
||||||
|
if(commandes.nodeCSV.retourneFirstEnfant("student", champEmail, courriel)!=null) erreur=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ajouter l'étudiant au modèle de la table
|
||||||
|
if(!erreur) {
|
||||||
|
node nouvelEtudiant = new node();
|
||||||
|
nouvelEtudiant.setNameNode("student");
|
||||||
|
nouvelEtudiant.getAttributs().put(champNom,name);
|
||||||
|
nouvelEtudiant.getAttributs().put(champPrenom,prenom);
|
||||||
|
nouvelEtudiant.getAttributs().put(champId,id);
|
||||||
|
nouvelEtudiant.getAttributs().put(champEmail,courriel);
|
||||||
|
((myTableStudent) tableStudent.getModel()).addStudent(nouvelEtudiant);
|
||||||
|
new ecritureBaseListesEtudiants(commandes.nodeCSV);
|
||||||
|
if(!ecritureBaseListesEtudiants.isErreur()) baseDonneesListesEtudiants.getInstance(indexSelect);
|
||||||
|
}else {
|
||||||
|
JOptionPane.showMessageDialog(null, "<html>Impossible d'ajouter cet étudiant car l'ID et/ou le courriel"
|
||||||
|
+ "<br>sont déjà présents.", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
|
JOptionPane.showMessageDialog(null, "Veuillez entrer des informations valides", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
btnRemoveListe.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
|
||||||
|
if(commandes.listesEtudiants == null) {
|
||||||
|
JOptionPane.showMessageDialog(null, "Il n'y a aucune liste d'étudiants chargée en mémoire.", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Créer un champ
|
||||||
|
JTextField nameListeField = new JTextField();
|
||||||
|
|
||||||
|
// Créer un panneau pour les champs
|
||||||
|
JPanel panel = new JPanel(new GridLayout(0, 1));
|
||||||
|
panel.add(new JLabel("Nom de la liste à supprimé :"));
|
||||||
|
panel.add(nameListeField);
|
||||||
|
|
||||||
|
// Afficher la boîte de dialogue
|
||||||
|
int result = JOptionPane.showConfirmDialog(null, panel, "Supprime une liste d'étudiants", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
|
||||||
|
|
||||||
|
if (result == JOptionPane.OK_OPTION) {
|
||||||
|
node nodeRemove = commandes.listesEtudiants.retourneFirstEnfant("fileCSV", "nameListStudent", nameListeField.getText());
|
||||||
|
if(nodeRemove!=null) {
|
||||||
|
commandes.listesEtudiants.getEnfants().remove(nodeRemove);
|
||||||
|
if(commandes.nodeCSV!=null)if(commandes.nodeCSV.getAttributs().get("nameListStudent").equals(nameListeField.getText())) {
|
||||||
|
commandes.nodeCSV=null;
|
||||||
|
}
|
||||||
|
ecritureBaseListesEtudiants.majBaseListesEtudiant();
|
||||||
|
if(!ecritureBaseListesEtudiants.isErreur()) baseDonneesListesEtudiants.getInstance(-1);
|
||||||
|
}else {
|
||||||
|
JOptionPane.showMessageDialog(null, "La liste n'a pas été trouvée dans la base de données.", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void ListenerTables() {
|
||||||
|
|
||||||
|
rowSMTable.addListSelectionListener(new ListSelectionListener() {
|
||||||
|
@Override
|
||||||
|
public void valueChanged(ListSelectionEvent e) {
|
||||||
|
//Ignore extra messages.
|
||||||
|
if (e.getValueIsAdjusting()) return;
|
||||||
|
lsm = (ListSelectionModel)e.getSource();
|
||||||
|
if (lsm.isSelectionEmpty()) {
|
||||||
|
System.out.println("Aucune ligne sélectionnée.");
|
||||||
|
} else {
|
||||||
|
indexSelect = lsm.getMinSelectionIndex();
|
||||||
|
System.out.println("La ligne " + indexSelect + " est sélectionnée.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
tableStudent.addMouseListener(new MouseAdapter() {
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(MouseEvent e) {
|
||||||
|
if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) {
|
||||||
|
int row = tableStudent.getSelectedRow();
|
||||||
|
if (row != -1) {
|
||||||
|
// Récupérer les données de la ligne sélectionnée
|
||||||
|
int columnCount = tableStudent.getColumnCount();
|
||||||
|
StringBuilder rowData = new StringBuilder();
|
||||||
|
for (int column = 0; column < columnCount; column++) {
|
||||||
|
rowData.append(tableStudent.getColumnName(column)).append(": ")
|
||||||
|
.append(tableStudent.getValueAt(row, column)).append("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Afficher les données dans une boîte de dialogue et demander la confirmation pour suppression
|
||||||
|
int response = JOptionPane.showConfirmDialog(
|
||||||
|
null,
|
||||||
|
rowData.toString() + "\nVoulez-vous supprimer cet étudiant?",
|
||||||
|
"Détails de l'étudiant",
|
||||||
|
JOptionPane.YES_NO_OPTION,
|
||||||
|
JOptionPane.INFORMATION_MESSAGE
|
||||||
|
);
|
||||||
|
|
||||||
|
// Supprimer l'étudiant si l'utilisateur a confirmé
|
||||||
|
if (response == JOptionPane.YES_OPTION) {
|
||||||
|
((myTableStudent) tableStudent.getModel()).removeRow(row);
|
||||||
|
baseDonneesListesEtudiants.getInstance(indexSelect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
table.addMouseListener(new MouseAdapter() {
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(MouseEvent e) {
|
||||||
|
if (e.getClickCount() >0) {
|
||||||
|
if (e.getClickCount() > 0 && e.getButton() == MouseEvent.BUTTON1) {
|
||||||
|
System.out.println("un click ou plus");
|
||||||
|
if(lsm!=null)if (!lsm.isSelectionEmpty()) {
|
||||||
|
indexSelect = lsm.getMinSelectionIndex();
|
||||||
|
chargeListeEtudiants.chargeDansleNodeCSVListeEtudiants(indexSelect);
|
||||||
|
baseDonneesListesEtudiants.getInstance(indexSelect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
815
src/fenetres/evaluate2.java
Normal file
@ -0,0 +1,815 @@
|
|||||||
|
package fenetres;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Font;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.InputEvent;
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
|
||||||
|
import javax.swing.AbstractAction;
|
||||||
|
import javax.swing.Action;
|
||||||
|
import javax.swing.ImageIcon;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JCheckBox;
|
||||||
|
import javax.swing.JFileChooser;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JMenu;
|
||||||
|
import javax.swing.JMenuBar;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JScrollBar;
|
||||||
|
import javax.swing.JScrollPane;
|
||||||
|
import javax.swing.JToolBar;
|
||||||
|
import javax.swing.KeyStroke;
|
||||||
|
import javax.swing.SwingConstants;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
|
import javax.swing.border.EmptyBorder;
|
||||||
|
import javax.swing.event.ChangeEvent;
|
||||||
|
import javax.swing.event.ChangeListener;
|
||||||
|
|
||||||
|
import actions.actAbout;
|
||||||
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
import calc.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class evaluate2 extends JFrame {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private JToolBar toolBar;
|
||||||
|
private JPanel contentPane;
|
||||||
|
private static JLabel lblPath;
|
||||||
|
private static JLabel lblFileAnalyse;
|
||||||
|
private static JLabel lblListe;
|
||||||
|
private static JLabel lblFichierCSV;
|
||||||
|
private static JLabel lblFichierSVG;
|
||||||
|
private static JLabel lblImageDossierEtudiant;
|
||||||
|
private static JLabel lblNoFeedBack;
|
||||||
|
private static JLabel lblNoDeatail;
|
||||||
|
private static JLabel lblnonote;
|
||||||
|
private static JLabel lblnozip;
|
||||||
|
private static JLabel lblVerifHistorique;
|
||||||
|
private static JLabel lblCsvNote;
|
||||||
|
private static JLabel lblNameEvaluation;
|
||||||
|
private static JCheckBox chckbxfichiersEtudiants;
|
||||||
|
private static JCheckBox chckbxZipfeedback;
|
||||||
|
private static JCheckBox chckbxnoFeedback;
|
||||||
|
private static JCheckBox chckbxNoNote;
|
||||||
|
private static JCheckBox chckCSVNotes;
|
||||||
|
private static JCheckBox chckbxVerif;
|
||||||
|
// private static JCheckBox chckbxNoDetail;
|
||||||
|
private static JCheckBox chckPasDeProgression ;
|
||||||
|
private static afficheText txtpnmessages;
|
||||||
|
private static evaluate instance;
|
||||||
|
private static JScrollPane scrollPane = new JScrollPane();
|
||||||
|
private static JScrollBar verticalScrollBar = scrollPane.getVerticalScrollBar();
|
||||||
|
public static boolean isDispose = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the frame.
|
||||||
|
*/
|
||||||
|
public evaluate2() {
|
||||||
|
|
||||||
|
ImageIcon img = new ImageIcon(mainApp.class.getResource("/resources/evalcalc.png"));
|
||||||
|
this.setIconImage(img.getImage());
|
||||||
|
setTitle(calc.commandes.Titre + " - " + calc.commandes.version + " " + calc.commandes.branch);
|
||||||
|
|
||||||
|
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
||||||
|
setBounds(100, 100, 980, 700);
|
||||||
|
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
|
||||||
|
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
|
||||||
|
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
|
||||||
|
|
||||||
|
createMenu();
|
||||||
|
createToolBar();
|
||||||
|
|
||||||
|
contentPane = new JPanel();
|
||||||
|
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||||
|
setContentPane(contentPane);
|
||||||
|
contentPane.setLayout(new BorderLayout(0, 0));
|
||||||
|
|
||||||
|
|
||||||
|
contentPane.add(toolBar, BorderLayout.NORTH);
|
||||||
|
|
||||||
|
JPanel panelWest = new JPanel();
|
||||||
|
contentPane.add(panelWest, BorderLayout.WEST);
|
||||||
|
panelWest.setLayout(new MigLayout("", "[309px][]", "[38.00][71px][71px][][71px][][74.00][][]"));
|
||||||
|
|
||||||
|
JLabel lblTITRE = new JLabel("<HTML><U>PARAMETRES</U></HTML>");
|
||||||
|
lblTITRE.setForeground(Color.RED);
|
||||||
|
lblTITRE.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||||
|
lblTITRE.setHorizontalAlignment(SwingConstants.CENTER);
|
||||||
|
panelWest.add(lblTITRE, "cell 0 0,alignx left,aligny center");
|
||||||
|
|
||||||
|
lblFileAnalyse = new JLabel("<HTML><B><U>Fichier de l'analyse</U></B> : </HTML>");
|
||||||
|
lblFileAnalyse.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
lblFileAnalyse.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||||
|
panelWest.add(lblFileAnalyse, "flowy,cell 0 1,alignx left,growy");
|
||||||
|
|
||||||
|
chckbxfichiersEtudiants = new JCheckBox("Les fichiers ne sont pas dans des dossiers nominatifs");
|
||||||
|
chckbxfichiersEtudiants.addChangeListener(new ChangeListener() {
|
||||||
|
public void stateChanged(ChangeEvent e) {
|
||||||
|
if(chckbxfichiersEtudiants.isSelected()) {
|
||||||
|
calc.commandes.fichierStudentMoodle=true;
|
||||||
|
}else {
|
||||||
|
calc.commandes.fichierStudentMoodle=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
chckbxfichiersEtudiants.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||||
|
chckbxfichiersEtudiants.setToolTipText("Cochez si les fichiers des étudiants ne sont pas dans des dossier nominatifs");
|
||||||
|
panelWest.add(chckbxfichiersEtudiants, "flowy,cell 0 2,grow");
|
||||||
|
|
||||||
|
lblFichierCSV = new JLabel("<HTML><B><U>Fichier CSV liste des étudiants</U></B></HTML> :");
|
||||||
|
lblFichierCSV.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||||
|
panelWest.add(lblFichierCSV, "flowy,cell 0 4,grow");
|
||||||
|
|
||||||
|
lblFichierSVG = new JLabel("<HTML><B><U>Fichier SVG</U></B> :</HTML>");
|
||||||
|
lblFichierSVG.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||||
|
panelWest.add(lblFichierSVG, "flowy,cell 0 6,growx");
|
||||||
|
|
||||||
|
chckCSVNotes = new JCheckBox("Créer un fichier CSV des notes");
|
||||||
|
chckCSVNotes.addChangeListener(new ChangeListener() {
|
||||||
|
public void stateChanged(ChangeEvent e) {
|
||||||
|
if(chckCSVNotes.isSelected()) {
|
||||||
|
calc.commandes.ecritNoteCSV=true;
|
||||||
|
}else {
|
||||||
|
calc.commandes.ecritNoteCSV=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
chckCSVNotes.setToolTipText("Cochez si vous voulez importer les notes dans un fichier CSV.");
|
||||||
|
panelWest.add(chckCSVNotes, "cell 0 4,grow");
|
||||||
|
|
||||||
|
lblPath = new JLabel();
|
||||||
|
lblPath.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
lblPath.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||||
|
lblPath.setText("<HTML><B><U>Dossier de l'analyse</U></B> : " + calc.commandes.path.substring(calc.commandes.path.lastIndexOf("\\")+1,calc.commandes.path.length()) + "</HTML>");
|
||||||
|
panelWest.add(lblPath, "cell 0 1,grow");
|
||||||
|
|
||||||
|
chckbxnoFeedback = new JCheckBox("Pas de feedback");
|
||||||
|
chckbxnoFeedback.addChangeListener(new ChangeListener() {
|
||||||
|
public void stateChanged(ChangeEvent e) {
|
||||||
|
if(chckbxnoFeedback.isSelected()) {
|
||||||
|
calc.commandes.sansFeeback=true;
|
||||||
|
}else {
|
||||||
|
calc.commandes.sansFeeback=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
chckbxnoFeedback.setToolTipText("Cochez si vous ne voulez pas générer des feedbacks");
|
||||||
|
chckbxnoFeedback.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||||
|
panelWest.add(chckbxnoFeedback, "cell 0 2,grow");
|
||||||
|
|
||||||
|
chckbxZipfeedback = new JCheckBox("Zip les feedbacks");
|
||||||
|
chckbxZipfeedback.addChangeListener(new ChangeListener() {
|
||||||
|
public void stateChanged(ChangeEvent e) {
|
||||||
|
if(chckbxZipfeedback.isSelected()) {
|
||||||
|
calc.commandes.zipfeedback=true;
|
||||||
|
}else {
|
||||||
|
calc.commandes.zipfeedback=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
chckbxZipfeedback.setToolTipText("Cochez si vous voulez placer tous les feedbacks dans une archive ZIP");
|
||||||
|
chckbxZipfeedback.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||||
|
panelWest.add(chckbxZipfeedback, "cell 0 2,grow");
|
||||||
|
|
||||||
|
chckbxNoNote = new JCheckBox("Pas de note dans les feedbacks");
|
||||||
|
chckbxNoNote.addChangeListener(new ChangeListener() {
|
||||||
|
public void stateChanged(ChangeEvent e) {
|
||||||
|
if(chckbxNoNote.isSelected()) {
|
||||||
|
calc.commandes.noNote=true;
|
||||||
|
}else {
|
||||||
|
calc.commandes.noNote=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
chckbxNoNote.setToolTipText("Cochez si vous voulez pas faire apparaître les notes dans les feedbacks");
|
||||||
|
chckbxNoNote.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||||
|
panelWest.add(chckbxNoNote, "cell 0 2,grow");
|
||||||
|
|
||||||
|
chckbxVerif = new JCheckBox("Vérification des historiques avant analyse");
|
||||||
|
chckbxVerif.addChangeListener(new ChangeListener() {
|
||||||
|
public void stateChanged(ChangeEvent e) {
|
||||||
|
if(chckbxVerif.isSelected()) {
|
||||||
|
calc.commandes.verifHisto2=true;
|
||||||
|
}else {
|
||||||
|
calc.commandes.verifHisto2=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
chckbxVerif.setToolTipText("Cochez si vous voulez vérifier les échanges de fichiers entre les étudiants.");
|
||||||
|
chckbxVerif.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||||
|
panelWest.add(chckbxVerif, "cell 0 2,grow");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
JPanel panelCentre = new JPanel();
|
||||||
|
contentPane.add(panelCentre, BorderLayout.CENTER);
|
||||||
|
panelCentre.setLayout(new BorderLayout(0, 0));
|
||||||
|
|
||||||
|
JScrollPane scrollPane = new JScrollPane();
|
||||||
|
panelCentre.add(scrollPane);
|
||||||
|
|
||||||
|
|
||||||
|
txtpnmessages = new afficheText();
|
||||||
|
txtpnmessages.setFont(new Font("Tahoma", Font.PLAIN, 16));
|
||||||
|
txtpnmessages.setContentType("text/html");
|
||||||
|
txtpnmessages.setText(baliseStyle.balise() + "<hr><h1 class\"city\">*** Charger un fichier d'analyse. ***</h1><hr>");
|
||||||
|
scrollPane.setViewportView(txtpnmessages);
|
||||||
|
|
||||||
|
this.setExtendedState(MAXIMIZED_BOTH);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ListenerAction();
|
||||||
|
|
||||||
|
refreshLabel();
|
||||||
|
setVisible(true);
|
||||||
|
// Pro();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Affichage de la fenêtre.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static evaluate getInstance() {
|
||||||
|
if (instance == null) {
|
||||||
|
instance = new evaluate();
|
||||||
|
}else {
|
||||||
|
instance.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(commandes.fichierAnalyseValide) {
|
||||||
|
refreshLabel();
|
||||||
|
}else {
|
||||||
|
txtpnmessages.setText(baliseStyle.balise() + "<hr class=\"city\"><h1>*** Veuillez charger une évaluation ***</h1><hr>");
|
||||||
|
}
|
||||||
|
positionScrollDebut();
|
||||||
|
isDispose=false;
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void positionScrollDebut() {
|
||||||
|
// Positionne le curseur au début du texte pour que le JScrollPane affiche le haut
|
||||||
|
SwingUtilities.invokeLater(() -> {
|
||||||
|
txtpnmessages.setCaretPosition(0);
|
||||||
|
verticalScrollBar.setValue(verticalScrollBar.getMinimum());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void ListenerAction() {
|
||||||
|
|
||||||
|
/*Some piece of code*/
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void createMenu() {
|
||||||
|
JMenuBar menuBar = new JMenuBar();
|
||||||
|
menuBar.setFont(new Font("Segoe UI", Font.BOLD, 14));
|
||||||
|
setJMenuBar(menuBar);
|
||||||
|
|
||||||
|
JMenu mnNewMenu = new JMenu("Fichier");
|
||||||
|
mnNewMenu.setMnemonic( 'F' );
|
||||||
|
menuBar.add(mnNewMenu);
|
||||||
|
mnNewMenu.add( actSave );
|
||||||
|
mnNewMenu.add( actSaveas );
|
||||||
|
mnNewMenu.addSeparator();
|
||||||
|
mnNewMenu.add( actExit );
|
||||||
|
|
||||||
|
|
||||||
|
JMenu mnMenu_Fichier = new JMenu("Fichier d'analyse");
|
||||||
|
menuBar.add(mnMenu_Fichier);
|
||||||
|
mnMenu_Fichier.add( actOpen );
|
||||||
|
mnMenu_Fichier.addSeparator();
|
||||||
|
mnMenu_Fichier.add( actAboutFichierAnalyse );
|
||||||
|
|
||||||
|
mnMenu_Fichier.add( actModifierFichierAnalyse );
|
||||||
|
|
||||||
|
JMenu mnMenu_Liste_Etudiant = new JMenu("Liste des étudiants");
|
||||||
|
menuBar.add(mnMenu_Liste_Etudiant);
|
||||||
|
|
||||||
|
mnMenu_Liste_Etudiant.addSeparator();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
JMenu mnMenu_Logo = new JMenu("Logo");
|
||||||
|
menuBar.add(mnMenu_Logo);
|
||||||
|
|
||||||
|
|
||||||
|
JMenu mnMenu_Evaluation = new JMenu("Evaluation des étudiants");
|
||||||
|
menuBar.add(mnMenu_Evaluation);
|
||||||
|
mnMenu_Evaluation.add(actSelectFolder);
|
||||||
|
mnMenu_Evaluation.addSeparator();
|
||||||
|
mnMenu_Evaluation.add(actEvaluate);
|
||||||
|
mnMenu_Evaluation.addSeparator();
|
||||||
|
mnMenu_Evaluation.add(actVerifHistorique);
|
||||||
|
|
||||||
|
JMenu mnMenu_Informations = new JMenu("Informations");
|
||||||
|
menuBar.add(mnMenu_Informations);
|
||||||
|
mnMenu_Informations.add(actTutoriels);
|
||||||
|
mnMenu_Informations.addSeparator();
|
||||||
|
mnMenu_Informations.add( new actAbout() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void createToolBar() {
|
||||||
|
toolBar = new JToolBar();
|
||||||
|
JButton btnSelectFileAnalyse = toolBar.add( actOpen );
|
||||||
|
btnSelectFileAnalyse.setHideActionText( true );
|
||||||
|
btnSelectFileAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyse.png")));
|
||||||
|
|
||||||
|
|
||||||
|
JButton btnAfficheCodeFichierAnalyse = toolBar.add( actAboutFichierAnalyse );
|
||||||
|
btnAfficheCodeFichierAnalyse.setHideActionText(true);
|
||||||
|
btnAfficheCodeFichierAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseInfo.png")));
|
||||||
|
toolBar.add(btnAfficheCodeFichierAnalyse);
|
||||||
|
|
||||||
|
JButton btnModifierFichierAnalyse = toolBar.add(actModifierFichierAnalyse);
|
||||||
|
btnModifierFichierAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseModif.png")));
|
||||||
|
btnModifierFichierAnalyse.setHideActionText(true);
|
||||||
|
toolBar.add(btnModifierFichierAnalyse);
|
||||||
|
|
||||||
|
toolBar.addSeparator();
|
||||||
|
|
||||||
|
JButton btnEvaluerLesFichiers = toolBar.add(actEvaluate);
|
||||||
|
btnEvaluerLesFichiers.setHideActionText(true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
toolBar.addSeparator();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
toolBar.addSeparator();
|
||||||
|
|
||||||
|
JButton btnSelectFolder = toolBar.add(actSelectFolder);
|
||||||
|
btnSelectFolder.setIcon(new ImageIcon(evaluate.class.getResource("/resources/open.png")));
|
||||||
|
btnSelectFolder.setHideActionText(true);
|
||||||
|
toolBar.add(btnSelectFolder);
|
||||||
|
|
||||||
|
btnEvaluerLesFichiers.setIcon(new ImageIcon(evaluate.class.getResource("/resources/evaluate.png")));
|
||||||
|
toolBar.add(btnEvaluerLesFichiers);
|
||||||
|
|
||||||
|
JButton btnVerifHistorique = toolBar.add(actVerifHistorique);
|
||||||
|
btnVerifHistorique.setIcon(new ImageIcon(evaluate.class.getResource("/resources/verifhistorique.png")));
|
||||||
|
btnVerifHistorique.setHideActionText(true);
|
||||||
|
toolBar.add(btnVerifHistorique);
|
||||||
|
|
||||||
|
toolBar.addSeparator();
|
||||||
|
|
||||||
|
JButton btnAbout = toolBar.add(new actAbout());
|
||||||
|
btnAbout.setIcon(new ImageIcon(evaluate.class.getResource("/resources/apropos.png")));
|
||||||
|
btnAbout.setHideActionText(true);
|
||||||
|
toolBar.add(btnAbout);
|
||||||
|
|
||||||
|
JButton btnTutoriels = toolBar.add(actTutoriels);
|
||||||
|
btnTutoriels.setIcon(new ImageIcon(evaluate.class.getResource("/resources/tutoriel.png")));
|
||||||
|
toolBar.add(btnTutoriels);
|
||||||
|
|
||||||
|
toolBar.addSeparator();
|
||||||
|
|
||||||
|
JButton btnExit = toolBar.add(actExit);
|
||||||
|
btnExit.setIcon(new ImageIcon(evaluate.class.getResource("/resources/exit.png")));
|
||||||
|
btnExit.setHideActionText(true);
|
||||||
|
toolBar.add(btnExit);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Raffraichissement des informationss.</br>
|
||||||
|
* Activation des chckBoxs.</br>
|
||||||
|
*/
|
||||||
|
private static void refreshLabel() {
|
||||||
|
if(!commandes.fichierAnalyseValide) {
|
||||||
|
System.out.println( "Erreur du fichier d'analyse" );
|
||||||
|
// if(!verificationFichierAnalyse_node_commandesSujet.messageErreur.toString().isEmpty()) {
|
||||||
|
// txtpnmessages.setText(verificationFichierAnalyse_node_commandesSujet.messageErreur.toString());
|
||||||
|
// }
|
||||||
|
chckbxfichiersEtudiants.setEnabled(false);
|
||||||
|
chckbxZipfeedback.setEnabled(false);
|
||||||
|
chckbxnoFeedback.setEnabled(false);
|
||||||
|
chckbxNoNote.setEnabled(false);
|
||||||
|
chckCSVNotes.setEnabled(false);
|
||||||
|
chckbxVerif.setEnabled(false);
|
||||||
|
// chckbxNoDetail.setEnabled(false);
|
||||||
|
chckPasDeProgression.setEnabled(false);
|
||||||
|
}else {
|
||||||
|
chckbxfichiersEtudiants.setSelected(commandes.fichierStudentMoodle);
|
||||||
|
chckbxZipfeedback.setSelected(commandes.zipfeedback);
|
||||||
|
chckbxnoFeedback.setSelected(commandes.sansFeeback);
|
||||||
|
chckCSVNotes.setSelected(commandes.ecritNoteCSV);
|
||||||
|
chckbxNoNote.setSelected(commandes.noNote);
|
||||||
|
chckbxVerif.setSelected(commandes.verifHisto2);
|
||||||
|
// chckbxNoDetail.setSelected(commandes.noDetail);
|
||||||
|
chckPasDeProgression.setSelected(commandes.noAfficheProgression);
|
||||||
|
chckbxfichiersEtudiants.setEnabled(true);
|
||||||
|
chckbxZipfeedback.setEnabled(true);
|
||||||
|
chckbxnoFeedback.setEnabled(true);
|
||||||
|
chckbxNoNote.setEnabled(true);
|
||||||
|
chckCSVNotes.setEnabled(true);
|
||||||
|
chckbxVerif.setEnabled(true);
|
||||||
|
// chckbxNoDetail.setEnabled(true);
|
||||||
|
chckPasDeProgression.setEnabled(true);
|
||||||
|
|
||||||
|
if(commandes.nodeCSV!=null) {
|
||||||
|
if(commandes.nodeCSV.getAttributs().get("nameListStudent")==null) {
|
||||||
|
commandes.nodeCSV.getAttributs().put("nameListStudent","?");
|
||||||
|
commandes.nodeCSV.getAttributs().put("year", "?");
|
||||||
|
lblListe.setText("<html><b>Liste ???</b></html>");
|
||||||
|
}else {
|
||||||
|
lblListe.setText("<html><b>"+commandes.nodeCSV.getAttributs().get("nameListStudent")+"</b></html>");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
lblListe.setText("<html><b>Liste ???</b></html>");
|
||||||
|
}
|
||||||
|
|
||||||
|
txtpnmessages.afficheChargementFichierAnalyse();
|
||||||
|
}
|
||||||
|
|
||||||
|
String nameEvaluation = commandes.NameEvaluationCharger;
|
||||||
|
if(nameEvaluation.length()>44) nameEvaluation = nameEvaluation.substring(0, 44) + "<br>" + nameEvaluation.substring(44, nameEvaluation.length());
|
||||||
|
|
||||||
|
String nameDossierAnalyse = commandes.path.substring(commandes.path.lastIndexOf("\\")+1,commandes.path.length());
|
||||||
|
if(nameDossierAnalyse.length()>44) nameDossierAnalyse = nameDossierAnalyse.substring(0, 44) + "<br>" + nameDossierAnalyse.substring(44, nameDossierAnalyse.length());
|
||||||
|
|
||||||
|
String nameFichierAnalyse = commandes.analysis_filename;
|
||||||
|
if(nameFichierAnalyse.length()>44) nameFichierAnalyse = nameFichierAnalyse.substring(0, 44) + "<br>" + nameFichierAnalyse.substring(44, nameFichierAnalyse.length());
|
||||||
|
|
||||||
|
if(commandes.NameEvaluationCharger!=null) lblNameEvaluation.setText("<html>Évalution :<br><b> "+ nameEvaluation +"</b></html>");
|
||||||
|
if(commandes.path!=null) lblPath.setText("<html><p>Dossier de l'analyse :<br><b> " + nameDossierAnalyse + "</b></p><hr></html>");
|
||||||
|
if(commandes.analysis_filename!=null) lblFileAnalyse.setText("<html>Fichier de l'analyse :<br><b> " + nameFichierAnalyse + "</b></html>");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void ferme() {
|
||||||
|
if(!isDispose) {
|
||||||
|
isDispose=true;
|
||||||
|
instance.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* evaluer l'ensemble des fichiers des étudiants
|
||||||
|
*/
|
||||||
|
private AbstractAction actEvaluate = new AbstractAction() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
{
|
||||||
|
putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/evaluate.png")));
|
||||||
|
putValue( Action.NAME, "Evaluer les fichiers" );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/evaluatemini.png")) );
|
||||||
|
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_E );
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Evaluer les fichiers (CTRL+E)" );
|
||||||
|
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_DOWN_MASK) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
// Thread t2 = new Thread(new evaluerLesFichiersEtudiants(txtpnmessages));
|
||||||
|
// t2.start();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ouvre et affiche un fichier XML
|
||||||
|
*/
|
||||||
|
private AbstractAction actOpen = new AbstractAction() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
{
|
||||||
|
putValue(LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyse.png")));
|
||||||
|
putValue( Action.NAME, "Ouvrir un nouveau fichier d'analyse" );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/fichierAnalysemini.png")) );
|
||||||
|
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_O );
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Ouvrir un nouveau fichier d'analyse (CTRL+O)" );
|
||||||
|
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_DOWN_MASK) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed( ActionEvent e ) {
|
||||||
|
new filechooserXML();
|
||||||
|
refreshLabel();
|
||||||
|
System.out.println( "Open" );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sélectionne le dossier courant contenant les fichiers des étudiants
|
||||||
|
*/
|
||||||
|
private AbstractAction actSelectFolder = new AbstractAction() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
{
|
||||||
|
putValue(LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/open.png")));
|
||||||
|
putValue( Action.NAME, "Dossier d'analyse" );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/openmini.png")) );
|
||||||
|
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_U );
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Dossier d'analyse (CTRL+U)" );
|
||||||
|
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_U, InputEvent.CTRL_DOWN_MASK) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed( ActionEvent e ) {
|
||||||
|
JFileChooser chooser = new JFileChooser();
|
||||||
|
|
||||||
|
chooser.setCurrentDirectory(new java.io.File(calc.commandes.path));
|
||||||
|
chooser.setDialogTitle("Sélectionner le dossier contenant les fichiers des étudiants.");
|
||||||
|
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
||||||
|
chooser.setAcceptAllFileFilterUsed(false);
|
||||||
|
|
||||||
|
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
|
||||||
|
System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
|
||||||
|
System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
|
||||||
|
calc.commandes.path = chooser.getSelectedFile().getAbsolutePath();
|
||||||
|
} else {
|
||||||
|
System.out.println("No Selection ");
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshLabel();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verification
|
||||||
|
*/
|
||||||
|
private AbstractAction actVerifHistorique = new AbstractAction() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
{
|
||||||
|
putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/verifhistorique.png")));
|
||||||
|
putValue( Action.NAME, "Evaluer l'historique des modification" );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/verifhistoriquemini.png")));
|
||||||
|
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_H );
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Evaluer l'historique des modification (CTRL+H)" );
|
||||||
|
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_H, InputEvent.CTRL_DOWN_MASK) );
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void actionPerformed( ActionEvent e ) {
|
||||||
|
calc.commandes.verifHisto = true;
|
||||||
|
calc.commandes.analyse = false;
|
||||||
|
if(!calc.commandes.path.isEmpty()) {
|
||||||
|
}else {
|
||||||
|
txtpnmessages.setText("*** Veuillez sélectionner un dossier d'analyse. ***");
|
||||||
|
}
|
||||||
|
calc.commandes.verifHisto = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Information sur le fichier d'analyse
|
||||||
|
*/
|
||||||
|
private AbstractAction actAboutFichierAnalyse = new AbstractAction() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
{
|
||||||
|
putValue( Action.NAME, "Informations du fichier d'analyse" );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseInfo2mini.png")));
|
||||||
|
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_K );
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Informations du fichier d'analyse (CTRL+K)" );
|
||||||
|
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_K, InputEvent.CTRL_DOWN_MASK) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public void actionPerformed( ActionEvent e ) {
|
||||||
|
if(calc.commandes.fichierAnalyseValide) {
|
||||||
|
txtpnmessages.afficheChargementFichierAnalyse();
|
||||||
|
}else {
|
||||||
|
txtpnmessages.setText(baliseStyle.balise() + "<hr class=\"city\"><h1>*** Veuillez charger une évaluation ***</h1><hr>");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println( "Refresh Labels and texts" );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Quitter l'application
|
||||||
|
*/
|
||||||
|
private AbstractAction actExit = new AbstractAction() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
{
|
||||||
|
putValue( Action.NAME, "Quitter" );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/exitmini.png")));
|
||||||
|
putValue( Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/exit.png")) );
|
||||||
|
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_Q );
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Quitter (CRTL+Q)" );
|
||||||
|
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@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) {
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enregistre L'évaluation
|
||||||
|
*/
|
||||||
|
private AbstractAction actSave = new AbstractAction() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
{
|
||||||
|
putValue( Action.NAME, "Enregistrer la zone de texte" );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/savemini.png")));
|
||||||
|
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_S );
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Enregistrer la zone de texte (CRTL+S)" );
|
||||||
|
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_DOWN_MASK ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public void actionPerformed( ActionEvent e ) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enregistre sous l'évaluation
|
||||||
|
*/
|
||||||
|
private AbstractAction actSaveas = new AbstractAction() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
{
|
||||||
|
putValue( Action.NAME, "Enregistrer la zone de texte sous ..." );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/saveasmini.png")));
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Enregistrer la zone de texte sous ..." );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public void actionPerformed( ActionEvent e ) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private AbstractAction actSavePreference = new AbstractAction() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
{
|
||||||
|
putValue( Action.NAME, "Enregistrer prefrences" );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/savepreferencemini.png")) );
|
||||||
|
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/savepreference.png")) );
|
||||||
|
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_W );
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Enregistrer prefrences" );
|
||||||
|
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.ALT_DOWN_MASK) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public void actionPerformed( ActionEvent e ) {
|
||||||
|
if(calc.commandes.fichierAnalyseValide) {
|
||||||
|
|
||||||
|
}else {
|
||||||
|
JOptionPane.showMessageDialog(null, "Charger un fichier Writer (.odt) ou un fichier d'évaluaton (.xml).");
|
||||||
|
}
|
||||||
|
System.out.println( "Configuration" );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Affiche les tutoriels sur Youtube
|
||||||
|
*/
|
||||||
|
private AbstractAction actTutoriels = new AbstractAction() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
{
|
||||||
|
putValue( Action.NAME, "Tutoriels" );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/tutorielmini.png")));
|
||||||
|
putValue(Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/tutoriel.png")));
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Tutoriels" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public void actionPerformed( ActionEvent e ) {
|
||||||
|
try {
|
||||||
|
String url = "https://www.youtube.com/channel/UCG3tJWp_oZvOumH5kWUJ55g";
|
||||||
|
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
|
||||||
|
}
|
||||||
|
catch (java.io.IOException e1) {
|
||||||
|
System.out.println(e1.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Affiche le code XMl du fichier d'analyse
|
||||||
|
*/
|
||||||
|
private AbstractAction actModifierFichierAnalyse = new AbstractAction() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
{
|
||||||
|
putValue( Action.NAME, "Modifier le fichier d'analyse" );
|
||||||
|
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseModifmini.png")) );
|
||||||
|
putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseModif.png")));
|
||||||
|
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_M );
|
||||||
|
putValue( Action.SHORT_DESCRIPTION, "Modifier le fichier d'analyse (CTRL+M)" );
|
||||||
|
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_DOWN_MASK) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public void actionPerformed( ActionEvent e ) {
|
||||||
|
create.getInstance();
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * Permet l'évaluation des fichiers des étudaints.
|
||||||
|
// * @throws ParserConfigurationException
|
||||||
|
// * @throws SAXException
|
||||||
|
// * @throws IOException
|
||||||
|
// * @throws CloneNotSupportedException
|
||||||
|
// */
|
||||||
|
// private void evaluerLesFichiersEtudiants() throws ParserConfigurationException, SAXException, IOException, CloneNotSupportedException {
|
||||||
|
//
|
||||||
|
// calc.commandes.analyse=true;
|
||||||
|
// progressBarre.setVisible(true);
|
||||||
|
//
|
||||||
|
// if(chckbxfichiersEtudaints.isSelected()) calc.commandes.fichierStudentMoodle=true;
|
||||||
|
// if(chckbxZipfeedback.isSelected()) calc.commandes.zipfeedback=true;
|
||||||
|
// if(chckbxnoFeedback.isSelected()) calc.commandes.sansFeeback=true;
|
||||||
|
// if(chckbxNoNote.isSelected()) calc.commandes.noNote=true;
|
||||||
|
// if(chckCSVNotes.isSelected()) calc.commandes.ecritNoteCSV=true;
|
||||||
|
// if(chckbxNewLogo.isSelected()) calc.commandes.newLogo=true;
|
||||||
|
// if(chckbxNoLogo.isSelected()) calc.commandes.noLogo = true;
|
||||||
|
// if(chckbxVerif.isSelected()) calc.commandes.verifHisto2 = true;
|
||||||
|
//
|
||||||
|
// meptl.analyseVerifieHistoriqueLesFichiersEtudiantsEtExportNoteCSV();
|
||||||
|
//
|
||||||
|
// txtpnmessages.setText(calc.commandes.message.toString());
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
BIN
src/resources/GPLv3.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
src/resources/GPLv3mini.png
Normal file
After Width: | Height: | Size: 699 B |
BIN
src/resources/accueil evaluation.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
src/resources/afficheprogression.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/resources/afficheprogressionmini.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/resources/baselisteetudiant.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
src/resources/baselisteetudiantmini.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/resources/defautBaseEvaluation.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
src/resources/detailfeedback.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/resources/detailfeedbackmini.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 912 B After Width: | Height: | Size: 1.7 KiB |
BIN
src/resources/documentationmax.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 901 B |
BIN
src/resources/dossieretudiant.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
src/resources/dossieretudiantmin.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/resources/dossieretudiantmini.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
src/resources/extraireFichierAnalyse.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
src/resources/extraireFichierAnalysemini.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/resources/feedback.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
src/resources/feedbackmini.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
src/resources/feedbackstudent.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/resources/feedbackstudentmini.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/resources/fichierAnalyseRenomme.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
src/resources/fichierAnalyseRenommemini.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/resources/fusionneBaseEvaluation.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
src/resources/fusionneBaseEvaluationmini.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
src/resources/listestudent.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
src/resources/listestudentmini.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/resources/newlogo.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/resources/newlogomini.png
Normal file
After Width: | Height: | Size: 1003 B |
BIN
src/resources/noafficheprogression.png
Normal file
After Width: | Height: | Size: 1.3 KiB |