diff --git a/Athena/migrations/0004_atividade_restricoes.py b/Athena/migrations/0004_atividade_restricoes.py new file mode 100644 index 0000000..1eab714 --- /dev/null +++ b/Athena/migrations/0004_atividade_restricoes.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2016-05-22 14:43 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('Athena', '0003_auto_20160508_0121'), + ] + + operations = [ + migrations.AddField( + model_name='atividade', + name='restricoes', + field=models.CharField(default=1, max_length=1000), + preserve_default=False, + ), + ] diff --git a/Athena/models.py b/Athena/models.py index bf8d5dc..1feaa38 100755 --- a/Athena/models.py +++ b/Athena/models.py @@ -126,6 +126,9 @@ def prof_json_data(self): descricao = models.CharField( max_length=1000, ) + restricoes = models.CharField( + max_length=1000, + ) arquivo_roteiro = models.FileField(upload_to=atividade_path) arquivo_entrada = models.FileField(upload_to=atividade_path) arquivo_saida = models.FileField(upload_to=atividade_path) diff --git a/Cerberus/forms.py b/Cerberus/forms.py index f90fea3..c7defd9 100755 --- a/Cerberus/forms.py +++ b/Cerberus/forms.py @@ -7,7 +7,6 @@ import uuid import re - class UserRegistrationForm(UserCreationForm): travis1 = "Esse valor deve conter apenas letras" travis2 = ", números e os caracteres @/./+/-/_." @@ -153,6 +152,7 @@ def AtividadeRegistration(request): arquivo_roteiro=request.FILES[prefixo + 'arquivo_roteiro'], arquivo_entrada=request.FILES[prefixo + 'arquivo_entrada'], arquivo_saida=request.FILES[prefixo + 'arquivo_saida'], + restricoes=request.POST['restricoes'], turma=turma, ) atividade.save() diff --git a/Promachos/templates/aluno_ativ.html b/Promachos/templates/aluno_ativ.html index 40b48e5..451ed25 100755 --- a/Promachos/templates/aluno_ativ.html +++ b/Promachos/templates/aluno_ativ.html @@ -47,8 +47,8 @@ cursor: pointer; } .thumbnail_work { - height: 310px; - text-align: center; + height: 350px; + text-align: left; } .tab-pane { padding-top: 20px; @@ -59,6 +59,8 @@ + +
@@ -89,9 +91,9 @@

{{ atividade.nome }}

{{atividade.turma.nome}} - Prof. {{atividade.turma.professor.nome}}

{% if atividade.estaFechada %} -

Status: fechada (em {{atividade.data_limite}})

+

Status: fechada (em {{atividade.data_limite}})

{% else %} -
Status: aberta (até {{atividade.data_limite}})
+

Status: aberta (até {{atividade.data_limite}})

{% endif %}
@@ -99,10 +101,13 @@
Status: aberta (até {{atividade.data_limite}})
-

Submissão:

+

Submissão:


Descrição: {{ atividade.descricao }}

Atividade: {{ atividade.nome_roteiro }}

+

Restrições: + +

{% if prazo_valido %}
@@ -111,7 +116,7 @@

Submissão:

-
+
@@ -124,6 +129,8 @@

Submissão:

+

Status:

+
{% if submissao and relAlunoAtividade %} {% if relAlunoAtividade.foiEntregue %}
@@ -142,7 +149,8 @@

Status de Submissão:

-

Erros: {{ compilation_error|safe }}

+

Erros: {{ compilation_error|safe }}

+
diff --git a/Promachos/templates/pane_professor.html b/Promachos/templates/pane_professor.html index e0cb9eb..a47620b 100755 --- a/Promachos/templates/pane_professor.html +++ b/Promachos/templates/pane_professor.html @@ -1,3 +1,6 @@ + + +
@@ -37,6 +40,11 @@

Abrir nova atividade

{{field}}
{% endfor %} +
+
+ +


diff --git a/Promachos/templates/prof_ativ.html b/Promachos/templates/prof_ativ.html index 8e155c6..6c8553f 100755 --- a/Promachos/templates/prof_ativ.html +++ b/Promachos/templates/prof_ativ.html @@ -53,6 +53,8 @@ + +
@@ -79,6 +81,11 @@ {{field}}
{% endfor %} +
+
+ +


diff --git a/Promachos/templates/professor.html b/Promachos/templates/professor.html index 76549a4..ef2153f 100755 --- a/Promachos/templates/professor.html +++ b/Promachos/templates/professor.html @@ -1,108 +1,106 @@ - - - - - - Athena | Professor - - - - - - - - - - -
-
-
- -
- -
-
-
-   -
-
-
-
-
- - - -
-
-
-
-
-
-

Abrir nova turma

-
-
- - {% csrf_token %} - {{form}} -

- -
+ } + + + +
+
+
+ +
+ +
+
+
+   +
+
+
+
+
+ + + +
+
+
+
+
+
+

+

Abrir nova turma

+

+
+
+ + {% csrf_token %} + {{form}} +

+ +
+
+
+
-
-
- - {% for pane in panes %} - {{pane |safe}} - {% endfor %} + + + {% for pane in panes %} + {{pane |safe}} + {% endfor %} +
+
-
-
- - + + \ No newline at end of file diff --git a/arquivos/atividades/1/8/LabMaisSugaDeTodos/entrada b/arquivos/atividades/1/8/LabMaisSugaDeTodos/entrada new file mode 100644 index 0000000..654d526 --- /dev/null +++ b/arquivos/atividades/1/8/LabMaisSugaDeTodos/entrada @@ -0,0 +1 @@ +2 3 diff --git a/arquivos/atividades/1/8/LabMaisSugaDeTodos/roteiro b/arquivos/atividades/1/8/LabMaisSugaDeTodos/roteiro new file mode 100644 index 0000000..116fab0 --- /dev/null +++ b/arquivos/atividades/1/8/LabMaisSugaDeTodos/roteiro @@ -0,0 +1 @@ +roteiro da atividade diff --git a/arquivos/atividades/1/8/LabMaisSugaDeTodos/saida b/arquivos/atividades/1/8/LabMaisSugaDeTodos/saida new file mode 100644 index 0000000..654d526 --- /dev/null +++ b/arquivos/atividades/1/8/LabMaisSugaDeTodos/saida @@ -0,0 +1 @@ +2 3 diff --git a/static/css/bootstrap-tagsinput.css b/static/css/bootstrap-tagsinput.css new file mode 100644 index 0000000..55f7c09 --- /dev/null +++ b/static/css/bootstrap-tagsinput.css @@ -0,0 +1,46 @@ +.bootstrap-tagsinput { + background-color: #fff; + border: 1px solid #ccc; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + display: inline-block; + padding: 4px 6px; + margin-bottom: 10px; + color: #555; + vertical-align: middle; + border-radius: 4px; + max-width: 100%; + line-height: 22px; + cursor: text; +} +.bootstrap-tagsinput input { + border: none; + box-shadow: none; + outline: none; + background-color: transparent; + padding: 0; + margin: 0; + width: auto !important; + max-width: inherit; +} +.bootstrap-tagsinput input:focus { + border: none; + box-shadow: none; +} +.bootstrap-tagsinput .tag { + margin-right: 2px; + color: white; +} +.bootstrap-tagsinput .tag [data-role="remove"] { + margin-left: 8px; + cursor: pointer; +} +.bootstrap-tagsinput .tag [data-role="remove"]:after { + content: "x"; + padding: 0px 2px; +} +.bootstrap-tagsinput .tag [data-role="remove"]:hover { + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} +.bootstrap-tagsinput .tag [data-role="remove"]:hover:active { + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} diff --git a/static/js/bootstrap-tagsinput.min.js b/static/js/bootstrap-tagsinput.min.js new file mode 100644 index 0000000..46e88cc --- /dev/null +++ b/static/js/bootstrap-tagsinput.min.js @@ -0,0 +1,7 @@ +/* + * bootstrap-tagsinput v0.4.2 by Tim Schlechter + * + */ + +!function(a){"use strict";function b(b,c){this.itemsArray=[],this.$element=a(b),this.$element.hide(),this.isSelect="SELECT"===b.tagName,this.multiple=this.isSelect&&b.hasAttribute("multiple"),this.objectItems=c&&c.itemValue,this.placeholderText=b.hasAttribute("placeholder")?this.$element.attr("placeholder"):"",this.inputSize=Math.max(1,this.placeholderText.length),this.$container=a('
'),this.$input=a('').appendTo(this.$container),this.$element.after(this.$container);var d=(this.inputSize<3?3:this.inputSize)+"em";this.$input.get(0).style.cssText="width: "+d+" !important;",this.build(c)}function c(a,b){if("function"!=typeof a[b]){var c=a[b];a[b]=function(a){return a[c]}}}function d(a,b){if("function"!=typeof a[b]){var c=a[b];a[b]=function(){return c}}}function e(a){return a?i.text(a).html():""}function f(a){var b=0;if(document.selection){a.focus();var c=document.selection.createRange();c.moveStart("character",-a.value.length),b=c.text.length}else(a.selectionStart||"0"==a.selectionStart)&&(b=a.selectionStart);return b}function g(b,c){var d=!1;return a.each(c,function(a,c){if("number"==typeof c&&b.which===c)return d=!0,!1;if(b.which===c.which){var e=!c.hasOwnProperty("altKey")||b.altKey===c.altKey,f=!c.hasOwnProperty("shiftKey")||b.shiftKey===c.shiftKey,g=!c.hasOwnProperty("ctrlKey")||b.ctrlKey===c.ctrlKey;if(e&&f&&g)return d=!0,!1}}),d}var h={tagClass:function(){return"label label-info"},itemValue:function(a){return a?a.toString():a},itemText:function(a){return this.itemValue(a)},freeInput:!0,addOnBlur:!0,maxTags:void 0,maxChars:void 0,confirmKeys:[13,44],onTagExists:function(a,b){b.hide().fadeIn()},trimValue:!1,allowDuplicates:!1};b.prototype={constructor:b,add:function(b,c){var d=this;if(!(d.options.maxTags&&d.itemsArray.length>=d.options.maxTags||b!==!1&&!b)){if("string"==typeof b&&d.options.trimValue&&(b=a.trim(b)),"object"==typeof b&&!d.objectItems)throw"Can't add objects when itemValue option is not set";if(!b.toString().match(/^\s*$/)){if(d.isSelect&&!d.multiple&&d.itemsArray.length>0&&d.remove(d.itemsArray[0]),"string"==typeof b&&"INPUT"===this.$element[0].tagName){var f=b.split(",");if(f.length>1){for(var g=0;gd.options.maxInputLength)){var l=a.Event("beforeItemAdd",{item:b,cancel:!1});if(d.$element.trigger(l),!l.cancel){d.itemsArray.push(b);var m=a(''+e(i)+'');if(m.data("item",b),d.findInputWrapper().before(m),m.after(" "),d.isSelect&&!a('option[value="'+encodeURIComponent(h)+'"]',d.$element)[0]){var n=a("");n.data("item",b),n.attr("value",h),d.$element.append(n)}c||d.pushVal(),(d.options.maxTags===d.itemsArray.length||d.items().toString().length===d.options.maxInputLength)&&d.$container.addClass("bootstrap-tagsinput-max"),d.$element.trigger(a.Event("itemAdded",{item:b}))}}}else if(d.options.onTagExists){var o=a(".tag",d.$container).filter(function(){return a(this).data("item")===k});d.options.onTagExists(b,o)}}}},remove:function(b,c){var d=this;if(d.objectItems&&(b="object"==typeof b?a.grep(d.itemsArray,function(a){return d.options.itemValue(a)==d.options.itemValue(b)}):a.grep(d.itemsArray,function(a){return d.options.itemValue(a)==b}),b=b[b.length-1]),b){var e=a.Event("beforeItemRemove",{item:b,cancel:!1});if(d.$element.trigger(e),e.cancel)return;a(".tag",d.$container).filter(function(){return a(this).data("item")===b}).remove(),a("option",d.$element).filter(function(){return a(this).data("item")===b}).remove(),-1!==a.inArray(b,d.itemsArray)&&d.itemsArray.splice(a.inArray(b,d.itemsArray),1)}c||d.pushVal(),d.options.maxTags>d.itemsArray.length&&d.$container.removeClass("bootstrap-tagsinput-max"),d.$element.trigger(a.Event("itemRemoved",{item:b}))},removeAll:function(){var b=this;for(a(".tag",b.$container).remove(),a("option",b.$element).remove();b.itemsArray.length>0;)b.itemsArray.pop();b.pushVal()},refresh:function(){var b=this;a(".tag",b.$container).each(function(){var c=a(this),d=c.data("item"),f=b.options.itemValue(d),g=b.options.itemText(d),h=b.options.tagClass(d);if(c.attr("class",null),c.addClass("tag "+e(h)),c.contents().filter(function(){return 3==this.nodeType})[0].nodeValue=e(g),b.isSelect){var i=a("option",b.$element).filter(function(){return a(this).data("item")===d});i.attr("value",f)}})},items:function(){return this.itemsArray},pushVal:function(){var b=this,c=a.map(b.items(),function(a){return b.options.itemValue(a).toString()});b.$element.val(c,!0).trigger("change")},build:function(b){var e=this;if(e.options=a.extend({},h,b),e.objectItems&&(e.options.freeInput=!1),c(e.options,"itemValue"),c(e.options,"itemText"),d(e.options,"tagClass"),e.options.typeahead){var i=e.options.typeahead||{};d(i,"source"),e.$input.typeahead(a.extend({},i,{source:function(b,c){function d(a){for(var b=[],d=0;d$1")}}))}if(e.options.typeaheadjs){var j=e.options.typeaheadjs||{};e.$input.typeahead(null,j).on("typeahead:selected",a.proxy(function(a,b){e.add(j.valueKey?b[j.valueKey]:b),e.$input.typeahead("val","")},e))}e.$container.on("click",a.proxy(function(){e.$element.attr("disabled")||e.$input.removeAttr("disabled"),e.$input.focus()},e)),e.options.addOnBlur&&e.options.freeInput&&e.$input.on("focusout",a.proxy(function(){0===a(".typeahead, .twitter-typeahead",e.$container).length&&(e.add(e.$input.val()),e.$input.val(""))},e)),e.$container.on("keydown","input",a.proxy(function(b){var c=a(b.target),d=e.findInputWrapper();if(e.$element.attr("disabled"))return void e.$input.attr("disabled","disabled");switch(b.which){case 8:if(0===f(c[0])){var g=d.prev();g&&e.remove(g.data("item"))}break;case 46:if(0===f(c[0])){var h=d.next();h&&e.remove(h.data("item"))}break;case 37:var i=d.prev();0===c.val().length&&i[0]&&(i.before(d),c.focus());break;case 39:var j=d.next();0===c.val().length&&j[0]&&(j.after(d),c.focus())}{var k=c.val().length;Math.ceil(k/5)}c.attr("size",Math.max(this.inputSize,c.val().length))},e)),e.$container.on("keypress","input",a.proxy(function(b){var c=a(b.target);if(e.$element.attr("disabled"))return void e.$input.attr("disabled","disabled");var d=c.val(),f=e.options.maxChars&&d.length>=e.options.maxChars;e.options.freeInput&&(g(b,e.options.confirmKeys)||f)&&(e.add(f?d.substr(0,e.options.maxChars):d),c.val(""),b.preventDefault());{var h=c.val().length;Math.ceil(h/5)}c.attr("size",Math.max(this.inputSize,c.val().length))},e)),e.$container.on("click","[data-role=remove]",a.proxy(function(b){e.$element.attr("disabled")||e.remove(a(b.target).closest(".tag").data("item"))},e)),e.options.itemValue===h.itemValue&&("INPUT"===e.$element[0].tagName?e.add(e.$element.val()):a("option",e.$element).each(function(){e.add(a(this).attr("value"),!0)}))},destroy:function(){var a=this;a.$container.off("keypress","input"),a.$container.off("click","[role=remove]"),a.$container.remove(),a.$element.removeData("tagsinput"),a.$element.show()},focus:function(){this.$input.focus()},input:function(){return this.$input},findInputWrapper:function(){for(var b=this.$input[0],c=this.$container[0];b&&b.parentNode!==c;)b=b.parentNode;return a(b)}},a.fn.tagsinput=function(c,d){var e=[];return this.each(function(){var f=a(this).data("tagsinput");if(f)if(c||d){if(void 0!==f[c]){var g=f[c](d);void 0!==g&&e.push(g)}}else e.push(f);else f=new b(this,c),a(this).data("tagsinput",f),e.push(f),"SELECT"===this.tagName&&a("option",a(this)).attr("selected","selected"),a(this).val(a(this).val())}),"string"==typeof c?e.length>1?e:e[0]:e},a.fn.tagsinput.Constructor=b;var i=a("
");a(function(){a("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput()})}(window.jQuery); +//# sourceMappingURL=bootstrap-tagsinput.min.js.map