Skip to content
Snippets Groups Projects
Commit 21095e6f authored by Thomas Fradet's avatar Thomas Fradet
Browse files

path diplay improvement

parent d5909453
Branches
Tags
No related merge requests found
......@@ -28,5 +28,23 @@ Deprecated: Non-static method block_career_ressource::get_ressources_by_id_secti
[x] La méthode est déclarée static
#### 5
Notice: Undefined variable: imagePath in /Applications/MAMP/htdocs/moodle37/blocks/career/view/view_career_setting.php on line 169
[x] Suppression d'un morceau de code restant faisant appel à l'image (fonctionnalité de représenter un parcours par une image, précédemment abandonnée).
## Améliorations diverses
### Vue du parcours
#### Decriptions parcours et sections
Suppression de la possibilité de plier / déplier les description de parcours et de section en raison du bug de taille d'affichage.
#### Affichage des titres et liste ressources
Amélioration de l'affichage des titres et de la liste des ressources du parcours.
.btn-career-block {
width: 100%;
width: 100%;
}
.career-section-title {
background-color: #008196;
}
.career-section-title > h3 {
color: #fafafa;
padding: 0.6rem 1rem;
}
/*.left {
float: left;
}*/
float: left;
}*/
/*.img_moodle_course {
max-width: 100%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
display: block;
margin: -1px;
min-height: 64px;
min-width: 64px;
}*/
max-width: 100%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
display: block;
margin: -1px;
min-height: 64px;
min-width: 64px;
}*/
/*.padding_column {
padding: 2rem;
}*/
padding: 2rem;
}*/
/*.align_center {
display: flex;
justify-content: center;
align-items: center;
}*/
display: flex;
justify-content: center;
align-items: center;
}*/
/*.button {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
}*/
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
}*/
/*.img_center {
top: 1rem;
left: 1rem;
}*/
top: 1rem;
left: 1rem;
}*/
/*.img_moodle_list {
max-width: 100%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
display: block;
margin: -1px;
height: 32px;
width: 32px;
}*/
.left_course_elements, .right_course_elements {
width: 33%;
float: left;
padding: 1%;
color: white;
text-align: center;
-webkit-box-shadow: 0 1px 3px 0 #d4d4d5, 0 0 0 1px #d4d4d5;
box-shadow: 0 1px 3px 0 #d4d4d5, 0 0 0 1px #d4d4d5;
}
.left_course_elements {
background: #2d2d2d;
}
.right_course_elements {
background: #009186;
}
max-width: 100%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
display: block;
margin: -1px;
height: 32px;
width: 32px;
}*/
.left_course_elements, .right_course_elements {
width: 33%;
float: left;
padding: 1%;
color: white;
text-align: center;
-webkit-box-shadow: 0 1px 3px 0 #d4d4d5, 0 0 0 1px #d4d4d5;
box-shadow: 0 1px 3px 0 #d4d4d5, 0 0 0 1px #d4d4d5;
}
.left_course_elements {
background: #2d2d2d;
}
.right_course_elements {
background: #009186;
}
/*.title {
font-size: 1.5rem;
color: white;
padding-bottom: 0.5rem
}*/
.middle_elements {
text-align: center;
width: 11%;
float: left;
padding: 1%;
}
font-size: 1.5rem;
color: white;
padding-bottom: 0.5rem
}*/
.middle_elements {
text-align: center;
width: 11%;
float: left;
padding: 1%;
}
/*#outer-dropzone {
height: 140px;
}*/
height: 140px;
}*/
/*#inner-dropzone {
height: 80px;
}*/
height: 80px;
}*/
/*.dropzone {
background-color: #ccc;
border: dashed 4px transparent;
border-radius: 4px;
margin: 10px auto 30px;
padding: 10px;
width: 80%;
transition: background-color 0.3s;
}*/
background-color: #ccc;
border: dashed 4px transparent;
border-radius: 4px;
margin: 10px auto 30px;
padding: 10px;
width: 80%;
transition: background-color 0.3s;
}*/
/*.drop-active {
border-color: #aaa;
}*/
border-color: #aaa;
}*/
/*.drop-target {
background-color: #29e;
border-color: #fff;
border-style: solid;
}*/
background-color: #29e;
border-color: #fff;
border-style: solid;
}*/
/*.drag-drop {
display: inline-block;
min-width: 40px;
padding: 2em 0.5em;
display: inline-block;
min-width: 40px;
padding: 2em 0.5em;
color: #fff;
background-color: #29e;
border: solid 2px #fff;
color: #fff;
background-color: #29e;
border: solid 2px #fff;
-webkit-transform: translate(0px, 0px);
transform: translate(0px, 0px);
-webkit-transform: translate(0px, 0px);
transform: translate(0px, 0px);
transition: background-color 0.3s;
}*/
transition: background-color 0.3s;
}*/
/*.drag-drop.can-drop {
color: #000;
background-color: #4e4;
}*/
color: #000;
background-color: #4e4;
}*/
/*.textarea:not([rows]) {
max-height: 600px;
min-height: 120px;
}*/
max-height: 600px;
min-height: 120px;
}*/
/*.textarea {
display: block;
max-width: 99%;
min-width: 99%;
padding: 0.625em;
resize: vertical;
}*/
display: block;
max-width: 99%;
min-width: 99%;
padding: 0.625em;
resize: vertical;
}*/
/*.input, .textarea {
-moz-appearance: none;
-webkit-appearance: none;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
border: 1px solid transparent;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: transparent;
border-radius: 3px;
-webkit-box-shadow: none;
box-shadow: none;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
font-size: 1rem;
height: 2.25em;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
line-height: 1.5;
padding-bottom: calc(0.375em - 1px);
padding-left: calc(0.625em - 1px);
padding-right: calc(0.625em - 1px);
padding-top: calc(0.375em - 1px);
position: relative;
vertical-align: top;
background-color: white;
border-color: #dbdbdb;
color: #363636;
-webkit-box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);
box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);
margin: 0.5rem;
width: auto;
max-width: 90%;
}*/
-moz-appearance: none;
-webkit-appearance: none;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
border: 1px solid transparent;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: transparent;
border-radius: 3px;
-webkit-box-shadow: none;
box-shadow: none;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
font-size: 1rem;
height: 2.25em;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
line-height: 1.5;
padding-bottom: calc(0.375em - 1px);
padding-left: calc(0.625em - 1px);
padding-right: calc(0.625em - 1px);
padding-top: calc(0.375em - 1px);
position: relative;
vertical-align: top;
background-color: white;
border-color: #dbdbdb;
color: #363636;
-webkit-box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);
box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);
margin: 0.5rem;
width: auto;
max-width: 90%;
}*/
/*input[type='file'] {
margin-bottom: 1rem;
padding: 0rem;
background: none;
border: 0px;
box-shadow: none;
}*/
.subject-info-box-1,
.subject-info-box-2 {
float: left;
width: 100%;
}
.subject-info-box-1 select,
.subject-info-box-2 select {
height: 200px;
padding: 0;
}
.subject-info-box-1 select option,
.subject-info-box-2 select option {
padding: 4px 10px 4px 10px;
}
.subject-info-box-1 select option:hover,
.subject-info-box-2 select option:hover {
background: #EEEEEE;
}
margin-bottom: 1rem;
padding: 0rem;
background: none;
border: 0px;
box-shadow: none;
}*/
.subject-info-box-1,
.subject-info-box-2 {
float: left;
width: 100%;
}
.subject-info-box-1 select,
.subject-info-box-2 select {
height: 200px;
padding: 0;
}
.subject-info-box-1 select option,
.subject-info-box-2 select option {
padding: 4px 10px 4px 10px;
}
.subject-info-box-1 select option:hover,
.subject-info-box-2 select option:hover {
background: #EEEEEE;
}
/*.subject-info-arrows {
float: left;
width: 50%;
margin-left: 25%;
}*/
float: left;
width: 50%;
margin-left: 25%;
}*/
/*.subject-info-arrows input {
width: 70%;
margin-bottom: 5px;
}*/
.path-list-edit-link {
position: absolute;
top: 0;
right: 0;
}
width: 70%;
margin-bottom: 5px;
}*/
.iena-btn-career-arrow {
padding: 0.5rem;
}
.path-list-edit-link {
position: absolute;
top: 0;
right: 0;
}
.iena-btn-career-arrow {
padding: 0.5rem;
}
/*.iena-career-description {
background: #EEE;
color: #323232;
padding: 1rem;
clear: both;
margin-bottom: 0, 5rem;
}*/
background: #EEE;
color: #323232;
padding: 1rem;
clear: both;
margin-bottom: 0, 5rem;
}*/
/*.iena-carrer-path-descr {
border: 1px solid #1587bc;
border-radius: 0.15rem;
background-color: white;
color: #333;
padding: 1rem;
} */
border: 1px solid #1587bc;
border-radius: 0.15rem;
background-color: white;
color: #333;
padding: 1rem;
} */
/*.iena-carrer-path-descr a {
color: #1587bc;
margin-top: 1rem;
display: block;
}*/
color: #1587bc;
margin-top: 1rem;
display: block;
}*/
/*.iena-career-description p,
.iena-carrer-path-descr p {
font-size: initial !important;
}*/
font-size: initial !important;
}*/
......@@ -165,9 +165,9 @@ class view_career_setting extends moodleform
// console.log()
</script>';
if ($careerId != 0) {
$content .= '<input type="hidden" name="imagePath" value="'.$imagePath.'">';
}
// if ($careerId != 0) {
// $content .= '<input type="hidden" name="imagePath" value="'.$imagePath.'">';
// }
$content .= '
<div class="row mt-3">
......
......@@ -19,34 +19,34 @@ $sections = array();
$ressources = array();
$i = 0;
foreach ($elements as $value) {
$ressource = new block_career_ressource();
$ressource->get_ressource_by_id($value);
$sections[$i] = $ressource->section;
$ressources[$i] = $ressource;
$i++;
$ressource = new block_career_ressource();
$ressource->get_ressource_by_id($value);
$sections[$i] = $ressource->section;
$ressources[$i] = $ressource;
$i++;
}
//var_dump($sections);
//Supprime les doublons
for($i = 0; $i < count($sections);$i++)
{
$temp = $i;
$temp++;
$temp = $i;
$temp++;
if ($temp != count($sections))
{
if ($sections[$i]->id == $sections[$temp]->id)
{
unset($sections[$i]);
}
}
if ($temp != count($sections))
{
if ($sections[$i]->id == $sections[$temp]->id)
{
unset($sections[$i]);
}
}
}
//Met dans l'orde
$keys = array();
$i = 0;
foreach ($sections as $value){
$keys[$i] = $value->orde;
$i++;
$keys[$i] = $value->orde;
$i++;
}
$sections = array_combine($keys,$sections);
ksort($sections);
......@@ -56,51 +56,34 @@ ksort($sections);
<section class="section">
<h2 class="display-3"><?=$titre;?></h2>
<div class="iena-carrer-path-descr wrapper">
<div class="small">
<?= $intro ;?>
</div>
<a href="#">Voir la description complète</a>
</div>
<?php foreach ($sections as $section) : ?>
<div style="margin-bottom: 0rem; margin-top: 1rem;">
<div class="card card_block">
<div class="heading-iena set_height" style="background-color: #009186 !important;">
<div class="titre_section set_height">
<h3><?php echo $section->name; ?></h3>
</div>
</div>
</div>
<div class="iena-career-description wrapper">
<div class="small">
<p><?= $section->intro ;?></p>
</div>
<a href="#">Voir la description complète</a>
<h2 class="display-3"><?=$titre;?></h2>
<div class="iena-carrer-path-descr wrapper">
<?php echo $intro; ?>
</div>
<?php foreach ($sections as $section) : ?>
<div style="margin-bottom: 0rem; margin-top: 1rem;">
<div class="career-section-title">
<h3><?php echo $section->name; ?></h3>
</div>
<div class="iena-career-description wrapper">
<?php echo $section->intro; ?>
</div>
<div class="list-group">
<?php foreach ($ressources as $value) : ?>
<?php if($value->section->id == $section->id) : ?>
<a href="<?php echo "$value->link&career=$careerId" ?>" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">
<?php echo $value->name;?>
</h5>
<img class="" alt="" src="<?php echo $CFG->wwwroot ?>/theme/image.php/boost/<?php echo $value->type ?>/1/icon>">
</div>
<!-- <div><?php echo $value->descrition;?></div> -->
</a>
<?php endif;?>
<?php endforeach;?>
</div>
</div>
<?php endforeach;?>
</div>
<div class="elements">
<div class="list-group">
<?php foreach ($ressources as $value) : ?>
<?php if($value->section->id == $section->id) : ?>
<div class="row" style="padding-bottom: 0.5rem;">
<div class="col-md-12 col-sm-12 col-lg-12">
<a href="<?php echo "$value->link&career=$careerId" ?>" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1"><img class="" alt="" src="<?php echo $CFG->wwwroot ?>/theme/image.php/boost/<?php echo $value->type ?>/1/icon>">
<?php echo $value->name;?></h5></div>
<!--<div style="max-height:100px;overflow-y:auto;"><p class="mb-1"><?php echo $value->descrition;?></p></div>--></a>
</div>
</div>
<?php endif;?>
<?php endforeach;?>
</div>
</div></div>
<?php endforeach;?>
<!-- </ul> -->
<!-- </div> -->
</section>
</section>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment