Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hacklabr/timtec
Browse files Browse the repository at this point in the history
  • Loading branch information
bgola committed Nov 8, 2013
2 parents 316f554 + 5fb2f37 commit e162f40
Show file tree
Hide file tree
Showing 13 changed files with 247 additions and 214 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ create-production:
update-production:
cp timtec/settings_local_production.py timtec/settings_local.py
~/env/bin/pip install -r requirements.txt
~/env/bin/python manage.py migrate
~/env/bin/python manage.py syncdb --noinput
~/env/bin/python manage.py migrate --noinput
~/env/bin/python manage.py collectstatic --noinput
~/env/bin/python manage.py compilemessages
touch timtec/wsgi.py
Expand Down
2 changes: 1 addition & 1 deletion core/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<title>{% block title %}Timtec{% endblock %}</title>

<script src="//www.youtube.com/iframe_api"></script>
<script src="//youtube.com/iframe_api"></script>

{% compressed_css 'common' %}
{% compressed_css 'public' %}
Expand Down
2 changes: 1 addition & 1 deletion core/templates/course.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h3><i class="icon-double-angle-right"></i> {% trans "Instructors" %}</h3>

<div class="col-lg-12 col-sm-12">
{% for course_professor in course.courseprofessor_set.all %}
<div id="luciano-ramalho" class="instructor row">
<div id="{{ course_professor.user.username }}" class="instructor row">
<div class="col-lg-3 col-sm-3">
<img src="{{ course_professor.user.get_picture_url }}" class="col-lg-12 col-sm-12 thumbnail">
</div>
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ pytest-cov
pytest-flakes
pytest-pep8
pytest-django==2.3.1
-e git+https://github.com/vandersonmota/model_mommy.git#egg=model_mommy
model_mommy==1.2
11 changes: 0 additions & 11 deletions forum/templates/forum.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@
<!-- ASIDE -->
<aside class="col-sm-3 col-lg-3">
<p><a href="{% url 'forum_question_create' course.slug %}" class="ask-a-question btn btn-lg btn-danger uppercase">Fazer uma pergunta</a></p>
<form class="search-forum">
<div class="page-header-double">
<h3><i class="icon-double-angle-right"></i> Pesquisar Fórum</h3>
</div>
<div class="input-group">
<input type="search" class="form-control">
<span class="input-group-btn">
<button class="btn btn-default" type="button"><i class="icon-search"></i></button>
</span>
</div>
</form>
</aside>
<!-- END ASIDE -->
</div>
Expand Down
23 changes: 0 additions & 23 deletions forum/templates/question.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,29 +120,6 @@ <h1>Sua Resposta</h1>
<!-- ASIDE -->
<aside class="col-sm-3 col-lg-3">
<p><a href="{% url 'forum_question_create' question.course.slug %}" class="ask-a-question btn btn-lg btn-danger uppercase">Fazer uma pergunta</a></p>
<form class="search-forum">
<div class="page-header-double">
<h3><i class="icon-double-angle-right"></i> Pesquisar Fórum</h3>
</div>
<div class="input-group">
<input type="search" class="form-control">
<span class="input-group-btn">
<button class="btn btn-default" type="button"><i class="icon-search"></i></button>
</span>
</div>
</form>
<div class="related-questions">
<div class="page-header-double">
<h3><i class="icon-double-angle-right"></i> Perguntas Relacionadas</h3>
</div>
<ul class="no-bullet">
<li><a href="">Risus lectus non pulvinar sed ut integer. Ac elementum nunc facilisis ultricies, enim tincidunt integer mus, auctor sagittis? Et egestas.</a></li>
<li><a href="">Phasellus enim lectus augue et dis natoque amet hac magna sagittis nec elementum, velit et, phasellus pulvinar magnis aliquet.</a></li>
<li><a href="">Vel cursus nunc est dapibus hac tincidunt in tortor, aliquet pellentesque et et, tincidunt. Nec, mus placerat vel magna.</a></li>
<li><a href="">Scelerisque adipiscing ridiculus velit nunc, integer porttitor sed ac mus nisi egestas dictumst sed! Ultrices pulvinar. Ac! Ac adipiscing.</a></li>
<li><a href="">Tempor lacus parturient augue ac augue platea placerat lectus! In. Proin! Dapibus, rhoncus dapibus amet! Aliquet porttitor, sagittis! Nisi.</a></li>
</ul>
</div>
</aside>
<!-- END ASIDE -->
</div>
Expand Down
10 changes: 7 additions & 3 deletions lesson/static/js/lesson.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ function initialize_code_mirror($scope, data, expected) {

app.controller('LessonMainCtrl', ['$scope', 'LessonData',
function ($scope, LessonData) {
$scope.currentUnitPos = parseInt( /#\/(\d+)/.extract(location.hash, 1), 10);
$scope.currentUnitPos = Math.max($scope.currentUnitPos, 1);
var match = location.hash.match(/^#\/(\d+)/);
if(match) {
$scope.currentUnitPos = parseInt( match[1], 10);
} else {
$scope.currentUnitPos = 1;
}

$scope.isSelected = function(i){
return ($scope.currentUnitPos-1) === i;
Expand Down Expand Up @@ -73,7 +77,7 @@ function initialize_code_mirror($scope, data, expected) {
$location.path('/' + $main.currentUnitPos);
};
$scope.replayVideo = function() {
$location.path('/'+$main.currentUnitPos);
$location.path('/' + $main.currentUnitPos);
};

$scope.sendOrNext = function() {
Expand Down
12 changes: 6 additions & 6 deletions lesson/static/templates/activity_relationship.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ <h1 class="top">{{ currentUnit.activity.data.question }}</h1>
</div>
<div class="answers relationship-answers">
<div class="row">
<div class="col-lg-6">Coluna 1</div>
<div class="col-lg-6">Coluna 2</div>
<div class="col-lg-6 col-md-6 col-sm-6">Coluna 1</div>
<div class="col-lg-6 col-md-6 col-sm-6">Coluna 2</div>
</div>

<div class="answer relationship-answers" ng-repeat="alt in currentUnit.activity.data.column1 track by $index">
<div class="row">
<div class="col-lg-6">
<div class="col-lg-6 col-md-6 col-sm-6">
{{ $index+1 }}. {{ alt }}
</div>
<div class="col-lg-6">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="row">
<div class="col-lg-3">
<div class="col-lg-3 col-md-3 col-sm-3">
<input ng-model="$parent.answer.given[$index]" type="number"
name="unit-{{currentUnitId}}-alt-{{$index}}"
class="form-control"
id="optioncheckbox-{{$index}}" />
</div>
<div class="col-lg-9">
<div class="col-lg-9 col-md-9 col-sm-9">
<label for="optioncheckbox-{{$index}}">
{{ currentUnit.activity.data.column2[$index] }}
</label>
Expand Down
10 changes: 5 additions & 5 deletions lesson/static/templates/activity_trueorfalse.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ <h1 class="top">{{ currentUnit.activity.data.question }}</h1>
</div>
<div class="answers trueorfalse-answers">
<div class="row">
<div class="col-lg-2 col-lg-offset-8 textcenter">Verdadeiro</div>
<div class="col-lg-2 textcenter">Falso</div>
<div class="col-lg-2 col-lg-offset-8 col-md-2 col-md-offset-8 col-sm-2 col-sm-offset-8 textcenter">Verdadeiro</div>
<div class="col-lg-2 col-md-2 col-sm-2 textcenter">Falso</div>
</div>

<div class="answer" ng-repeat="alt in alternatives">
<div class="row">
<div class="col-lg-8">
<div class="col-lg-8 col-md-8 col-sm-8">
<label class="_checkbox" for="optioncheckbox-{{$index}}">
{{ alt.title }}
</label>
</div>
<div class="col-lg-2 textcenter">
<div class="col-lg-2 col-md-2 col-sm-2 textcenter">
<label class="radio bottom top">
<input ng-model="$parent.answer.given[$index]" type="radio"
name="unit-{{currentUnitId}}-alt-{{$index}}"
id="optioncheckbox-{{$index}}" ng-value="true" radio/>
</label>
</div>
<div class="col-lg-2 textcenter">
<div class="col-lg-2 col-md-2 col-sm-2 textcenter">
<label class="radio bottom top">
<input ng-model="$parent.answer.given[$index]" type="radio"
name="unit-{{currentUnitId}}-alt-{{$index}}"
Expand Down
6 changes: 3 additions & 3 deletions lesson/static/templates/lesson_activity.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="col-sm-8 col-lg-8 left">
<div class="col-lg-8 col-md-10 col-sm-10">
<div class="course-activity">
<ng:include src="activity_template"></ng:include>

Expand All @@ -12,10 +12,10 @@

<div class="submit">
<div class="row">
<div class="col-lg-6">
<div class="col-lg-6 col-md-6 col-sm-6">
<button class="btn btn-default" ng-click="nextVideo()">Pular</button>
</div>
<div class="col-lg-6 textright">
<div class="col-lg-6 col-md-6 col-sm-6 textright">
<button class="btn btn-info" ng-click="replayVideo()">Rever Vídeo</button>
<button class="btn btn-success" ng-click="sendOrNext()">{{sendOrNextText}}</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion lesson/templates/lesson.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h3><i class="icon-double-angle-right"></i> Notas do professor</h3>
<!-- FORUM -->
<div class="row">
{% include "_forum_inline.html" with course=lesson.course %}
<div class="col-lg-3 hidden-md">
<div class="col-lg-3 hidden-md hidden-sm">
<section class="course-instructions">
<div class="page-header-double">
<h3><i class="icon-double-angle-right"></i> Notas do professor</h3>
Expand Down

0 comments on commit e162f40

Please sign in to comment.