Enlever contenu et ressources
This commit is contained in:
parent
27ddf8883a
commit
82f87a5841
5 changed files with 115 additions and 30 deletions
|
|
@ -10,30 +10,103 @@
|
|||
|
||||
|
||||
{% block content %}
|
||||
<script type="text/javascript" src="{% static 'js/Chart.min.js' %}"></script>
|
||||
<style>
|
||||
.container{
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ul.tabs{
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
list-style: none;
|
||||
}
|
||||
ul.tabs li{
|
||||
background: none;
|
||||
color: #222;
|
||||
display: inline-block;
|
||||
padding: 10px 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
ul.tabs li.current{
|
||||
background: #ededed;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tab-content{
|
||||
display: none;
|
||||
background: #ededed;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.tab-content.current{
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function(){
|
||||
$("select.P01").change(function(){
|
||||
|
||||
tot = 0
|
||||
$('select.P01 option:selected').each(function(){
|
||||
$('select').change(function(){
|
||||
cl = $(this).attr('class');
|
||||
tt = 'select.' + cl +' option:selected'
|
||||
tot = 0;
|
||||
max = $(tt).length * 3;
|
||||
$(tt).each(function(){
|
||||
tot = tot + parseInt($(this).val());
|
||||
});
|
||||
alert(tot);
|
||||
});
|
||||
$('#tot_' + cl).text(Math.round(tot/max*100) + ' %');
|
||||
});
|
||||
$('ul.tabs li').click(function(){
|
||||
var tab_id = $(this).attr('data-tab');
|
||||
|
||||
$('ul.tabs li').removeClass('current');
|
||||
$('.tab-content').removeClass('current');
|
||||
|
||||
$(this).addClass('current');
|
||||
$("#"+tab_id).addClass('current');
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<div id="content-main">
|
||||
<h1>Evaluation des compétences</h1>
|
||||
<table>
|
||||
{% for p in object_list %}
|
||||
<tr><th>{{p}}</th><td></td></tr>
|
||||
{% for c in p.competence_set.all %}
|
||||
<tr><td>{{c}}</td><td><select class="{{p.code}}" ><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></td></tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
<div class="container">
|
||||
<div>
|
||||
<ul class="tabs">
|
||||
<li class="tab-link current" data-tab="P01">P01</li>
|
||||
<li class="tab-link" data-tab="P02">P02</li>
|
||||
<li class="tab-link" data-tab="P03">P03</li>
|
||||
<li class="tab-link" data-tab="P04">P04</li>
|
||||
<li class="tab-link" data-tab="P05">P05</li>
|
||||
<li class="tab-link" data-tab="P06">P06</li>
|
||||
<li class="tab-link" data-tab="P07">P07</li>
|
||||
<li class="tab-link" data-tab="P08">P08</li>
|
||||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
{% for p in object_list %}
|
||||
<div id="{{p.code}}" class="tab-content">
|
||||
<table>
|
||||
<tr><th>{{p}}</th><td width="100px"><div id="tot_{{p.code}}"></div></td></tr>
|
||||
{% for c in p.competence_set.all %}
|
||||
<tr><td>{{c}}</td><td><select class="{{p.code}}" ><option value="0">0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option></select></td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</div><!-- container -->
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
{% for c in object.competence_set.all %}- {{c.nom}} ({{c.code}})<br />
|
||||
{% if user.is_authenticated %}
|
||||
{% for sc in c.souscompetence_set.all %} -- {{sc.nom}} <br />{%endfor %}{% endif %}{% endfor %}</td></tr>
|
||||
<tr><th>Ressources à acquérir</th><td>{% for c in object.ressource_set.all %}- {{c}}<br />{% endfor %}</td></tr>
|
||||
<!-- <tr><th>Ressources à acquérir</th><td>{% for c in object.ressource_set.all %}- {{c}}<br />{% endfor %}</td></tr> -->
|
||||
<tr><th>Objectifs à atteindre</th><td>{% for c in object.objectif_set.all %}- {{c}}<br />{% endfor %}</td></tr>
|
||||
<tr><th>Contenu</th><td>{{object.contenu|linebreaksbr}}</td></tr>
|
||||
<!-- <tr><th>Contenu</th><td>{{object.contenu|linebreaksbr}}</td></tr> -->
|
||||
<tr><th>Evaluation</th><td>{{object.evaluation|linebreaksbr}}</td></tr>
|
||||
<tr><th>Type</th><td>{{object.type}}, obligatoire</td></tr>
|
||||
<tr><th>Semestre</th><td>Sem. {{object.semestre}}</td></tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue