Skip to content

Commit

Permalink
SAK-30648 cleanup use of instruction class in assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
ottenhoff committed Apr 1, 2016
1 parent 8accd2e commit 0e27823
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
onclick="SPNR.disableControlsAndSpin( this, null ); ASN.submitForm( 'gradeForm', 'prevUngraded' '$validator.escapeUrl( $submission.Reference )', null ); return false;" />
#end

<div class="instruction textPanelFooter">$tlang.getString( "nav.message" )</div>
<div class="small text-muted">$tlang.getString( "nav.message" )</div>
</div>
<div class="centreColumn">
<input type="button" name="cancelgradesubmission1" class="cancelgradesubmission" value="$tlang.getString( "nav.list" )"
Expand All @@ -97,7 +97,7 @@
<input type="button" name="nextsubmission1" class="nextsubmission" value="$tlang.getString( "nav.next" )"
#if( !$!goNTButton ) disabled="disabled" #end
onclick="SPNR.disableControlsAndSpin( this, null ); ASN.submitForm( 'gradeForm', 'nextsubmission', '$validator.escapeUrl( $submission.Reference )', null ); return false;" />
<div class="instruction textPanelFooter">$tlang.getString( "nav.message" )</div>
<div class="small text-muted">$tlang.getString( "nav.message" )</div>
</div>
</fieldset>
</div>
Expand Down Expand Up @@ -412,17 +412,17 @@
#end
#if ($submissionType == 4 && !$hasInline && $size == 0)
## if this is non-electronic submission
<p class="instruction">$tlang.getString("nonelec_instruction2")</p>
<p class="text-warning">$tlang.getString("nonelec_instruction2")</p>
#else
#if(($submission.submitted || !$alertGradeDraft) && $!value_feedback_text.length() >0 )
<p class="instruction">$tlang.getString("gradingsub.belisthe")</p>
<table border="0"><tr><td>
<p class="text-info">$tlang.getString("gradingsub.belisthe")</p>
<div class="textarea-holder">
<textarea name="$name_feedback_text" id="$name_feedback_text" rows="30" wrap="virtual" cols="80">$validator.escapeHtmlFormattedTextarea($!value_feedback_text)</textarea>
#chef_setupformattedtextarea($name_feedback_text)
</td></tr></table>
</div>
#elseif($submissionType!=2 && $submissionType!=4)
## This message only shows when the submission type allows submitted text and the submission doesn't contain submitted text
<p class="instruction">$tlang.getString("gradingsub.nosubmittedtext")</p>
<p class="text-warning">$tlang.getString("gradingsub.nosubmittedtext")</p>
#end
## for returned submission, show the instructor comment as well
#if ($!prevFeedbackText)
Expand All @@ -445,7 +445,7 @@
#end
#if ($size == 0 && $attachAllowed)
## only display in submission types taht are supposed to have attachments
<p class="instruction">
<p class="text-warning">
#if ($submissionType == 5)
$tlang.getString("gen.noattsubmitted.single")
#else
Expand Down Expand Up @@ -509,7 +509,7 @@
&nbsp<img id="infoImg" title="$tlang.getString('peerassessment.peerGradeInfo')" src="/library/image/silk/information.png" onclick="$('#peerReviewInfo').show();"/>
#end
</label>
<input type="text" name="$name_grade" size="5" maxlength="11" value="$!value_grade" id="grade" onkeypress="return ASN.handleEnterKeyPress(event);" /> <span class="instruction">($tlang.getString("grade.max") $assignmentContent.getMaxGradePointDisplay())</span>
<input type="text" name="$name_grade" size="5" maxlength="11" value="$!value_grade" id="grade" onkeypress="return ASN.handleEnterKeyPress(event);" /> <span class="text-info">($tlang.getString("grade.max") $assignmentContent.getMaxGradePointDisplay())</span>

<!--for grading via an external scoring service, if enabled for the associated gradebook item -->
#if($scoringComponentEnabled)
Expand Down Expand Up @@ -609,17 +609,17 @@
<h4>
$tlang.getString("gen.instrcomment")
</h4>
<p class="instruction">
<p class="help-block">
#if ($submissionType==2)
$tlang.getString("gradingsub.usethebel2")
#else
$tlang.getString("gradingsub.usethebel1")
#end
</p>
<table border="0"><tr><td>
<div class="textarea-holder">
<textarea name="$name_feedback_comment" id="$name_feedback_comment" rows="30" wrap="virtual" cols="80">#if($!value_feedback_comment)$validator.escapeHtmlFormattedTextarea($!value_feedback_comment)#end</textarea>
#chef_setupformattedtextarea($name_feedback_comment)
</td></tr></table>
</div>
## for returned (not resubmitted ) submission, show the instructor feedback
#if ($!prevFeedbackComment)
<h4 id="toggleGen" class="toggleAnchor"><img alt="expand" class="expand" src="/library/image/sakai/expand.gif" /><img alt="collapse" class="collapse" src="/library/image/sakai/collapse.gif" />
Expand All @@ -643,7 +643,7 @@
#end
#end
#if ($size == 0)
<p class="instruction">
<p class="text-warning">
#if ($submissionType == 5)
$tlang.getString("gen.noatt.single")
#else
Expand Down Expand Up @@ -722,10 +722,10 @@
#else
#set($resubmitStyle="display:none")
#end
<p class="checkbox" id="tempAllowRes" #if ($submissionType == 4) style = "display:none"#end>
<div class="form-group" id="tempAllowRes" #if ($submissionType == 4) style = "display:none"#end>
<input type="checkbox" id="allowResToggle" name ="allowResToggle" #if($!value_allowResubmitNumber && $submissionType != 4) checked="checked"#end onclick="if(checked){document.getElementById('allowResubmitContainer').style.display = 'block';ASN.resizeFrame();}else{document.getElementById('allowResubmitContainer').style.display = 'none';}" />
<label for="allowResToggle">$tlang.getString("allowResubmit")</label>
</p>
</div>
<div id="allowResubmitContainer" style="$!resubmitStyle">
<span id="allowResubmitNumber">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label for="allowResubmitNumberSelect">
Expand Down Expand Up @@ -817,7 +817,7 @@
onclick="SPNR.disableControlsAndSpin( this, null ); ASN.submitForm( 'gradeForm', 'prevUngraded', '$validator.escapeUrl( $submission.Reference )', null ); return false;" />
#end

<div class="instruction textPanelFooter">$tlang.getString( "nav.message" )</div>
<div class="small text-muted">$tlang.getString( "nav.message" )</div>
</div>
<div class="centreColumn">
<input type="button" name="cancelgradesubmission2" class="cancelgradesubmission" value="$tlang.getString( "nav.list" )"
Expand All @@ -839,7 +839,7 @@
<input type="button" name="nextsubmission2" class="nextsubmission" value="$tlang.getString( "nav.next" )"
#if( !$!goNTButton ) disabled="disabled" #end
onclick="SPNR.disableControlsAndSpin( this, null ); ASN.submitForm( 'gradeForm', 'nextsubmission', '$validator.escapeUrl( $submission.Reference )', null ); return false;" />
<div class="instruction textPanelFooter">$tlang.getString( "nav.message" )</div>
<div class="small text-muted">$tlang.getString( "nav.message" )</div>
</div>
</fieldset>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,21 @@

#set ($submissionType = $assignmentContent.getTypeOfSubmission())

<div class="portletBody">
<div class="portletBody container-fluid">
#navBarHREF( $allowAddAssignment $withGrade $allowGradeSubmission $allowAddAssignment $allowAllGroups $assignmentscheck $allowUpdateSite $enableViewOption $view "" )
<h3>
<div class="page-header>
<h1>
$validator.escapeHtml($assignment.getTitle())
<small>
#if ($!assignment.isGroup() )
<span class="group_icon" title="$tlang.getString('gen.groupassignment')" alt="$tlang.getString('gen.groupassignment')"></span>
#else
<span class="user_icon" title="$tlang.getString('gen.userassignment')" alt="$tlang.getString('gen.userassignment')"></span>
#end <span class="highlight"> - $!tlang.getString('gen.subm2') </span>
</h3>
</small>
</h1>
</div>

#if ($alertMessage)<div class="alertMessage">$tlang.getString("gen.alert") $alertMessage</div><div class="clear"></div>#end
## reminder of submission download url
#if ($download_url_reminder)
Expand All @@ -54,18 +59,22 @@
</p>
</div>
#end

<div class="row">
<div class="col-md-8">

<form name="viewForm" id="viewForm" class="inlineForm" method="post" action="#toolForm("AssignmentAction")">
<input type="hidden" name="assignmentId" id = "assignmentId" value=$validator.escapeUrl($!assignment.Reference) />
<input type="hidden" name="option" id="option" value="x" />
<input type="hidden" name="eventSubmit_doView_submission_list_option" value="x" />
## show the view by group choice when there is at least one group defined
#if (!$assignment.isGroup())
#if (!$value_CheckAnonymousGrading.equals("true") && $!groups.hasNext())
<div class="navPanel">
<div class="viewNav spinnerBesideContainer">
<label for="view">
$tlang.getString("gen.view2")
</label>
<div class="form-group spinnerBesideContainer">
<label class="col-md-2" for="view">
$tlang.getString("gen.view2")
</label>
<div class="col-md-10">
<span class="skip">$tlang.getString("newassig.selectmessage")</span>
<select id="view" name="view" size="1" tabindex="3" onchange="SPNR.insertSpinnerAfter( this, escapeList, null ); ASN.submitForm( 'viewForm', 'changeView', null, null ); return false;">
#if (!$showSubmissionByFilterSearchOnly)
Expand All @@ -83,16 +92,18 @@

## SAK-17606
#if (!$value_CheckAnonymousGrading.equals("true"))
<p>
<label for="$form_search" class="skip">$tlang.getString("search_students")</label>
<input value="$validator.escapeHtml($searchString)" placeholder="$tlang.getString( "search_student_instruction" )"
name="search" id="search" type="text" class="searchField" size="20" />
<input type="button" value="$tlang.getString('search')" onclick="SPNR.disableControlsAndSpin( this, escapeList ); ASN.submitForm( 'viewForm', 'search', null, null ); return false;" />
<div class="form-group">
<label class="col-md-2" for="$form_search">$tlang.getString("search_students")</label>
<div class="col-md-10">
<input value="$validator.escapeHtml($searchString)" placeholder="$tlang.getString( "search_student_instruction" )" name="search" id="search" type="text" class="searchField" size="20" />
<input type="button" value="$tlang.getString('search')" onclick="SPNR.disableControlsAndSpin( this, escapeList ); ASN.submitForm( 'viewForm', 'search', null, null ); return false;" />
#if (($!searchString) && (!$searchString.equals("")))
<input type="button" class="button" value="$tlang.getString("search_clear")" onclick="SPNR.disableControlsAndSpin( this, escapeList ); ASN.submitForm( 'viewForm', 'clearSearch', null, null ); return false;" />
#end
</p>
</div>
</div>
#end

#end
#set($disableGrade=false)
#if($assignment.getAllowPeerAssessment() == true && $assignment.isPeerAssessmentClosed() == false)
Expand Down Expand Up @@ -133,6 +144,7 @@
#end
<input type="hidden" name="sakai_csrf_token" value="$sakai_csrf_token" />
</form>

#set ($submissionType = $assignmentContent.getTypeOfSubmission())
#set ($showMsg = false)
#set ($showMsg = $!allMsgNumber)
Expand Down Expand Up @@ -172,8 +184,13 @@
</form>
#end
</div>
</div>
</div>
<div class="col-md-4">
#paginator( $topMsgPos $btmMsgPos $allMsgNumber $pagesize $goFPButton $goPPButton $goNPButton $goLPButton $sakai_csrf_token $pagesizes )
</div>
</div>

<form name= "listSubmissionsForm" action="#toolForm("AssignmentAction")" method="post">
<input type="hidden" name="assignmentId" value="$assignment.Reference" />

Expand Down Expand Up @@ -298,15 +315,17 @@
</div>
#end
<div id="sendFeedbackPanelContent" style="display:none;">
<p class="instruction">
<p class="text-info">
$tlang.getString("sendFeedback.instruction"):
</p>
<textarea cols=40 rows=5 name="commentFeedback"></textarea>
<p class="instruction">
$tlang.getString("sendFeedback.options"):<br/>
<input type="checkbox" name="overWrite"/> $tlang.getString("sendFeedback.overwrite")<br/>
<input type="checkbox" name="returnToStudents"/> $tlang.getString("sendFeedback.returnToStudents")<br/>
</p>
<div class="form-group">
<label>$tlang.getString("sendFeedback.options"):</label>
<div>
<input type="checkbox" name="overWrite"/> $tlang.getString("sendFeedback.overwrite")<br/>
<input type="checkbox" name="returnToStudents"/> $tlang.getString("sendFeedback.returnToStudents")<br/>
</div>
</div>
<div class="act">
<input type="submit" class="active" name="eventSubmit_doSave_send_feedback" value="$tlang.getString("update")" accesskey="s" />
</div>
Expand All @@ -326,7 +345,7 @@
</a>
</p>
<div id="allowResubmissionPanelContent" style="display:none; overflow: hidden;">
<p class="instruction">
<p class="text-info">
#if ($assignment.isGroup())
$tlang.getString("allowResubmission.groups.instruction")
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<div class="navPanel">
#if ($allowAddAssignment)
#if (!$!view.equals('stuvie'))
<div class="viewNav">
<div class="col-md-8">
<form id="viewForm" name="viewForm" class="inlineForm" method="post" action="#toolForm("AssignmentAction")">
<input type="hidden" name="eventSubmit_doView" value="view" />
<div class="spinnerBesideContainer">
Expand All @@ -65,16 +65,18 @@
</form>
</div>
#else
<div class="viewNav" style="width:50%">
<div class="col-md-8">
<div class="instruction"> $tlang.getString("stulistassig.selanass1")</div>
</div>
#end
#else
<div class="viewNav">
<div class="col-md-8">
<div class="instruction">$tlang.getString("stulistassig.selanass")</div>
</div>
#end
#paginator( $topMsgPos $btmMsgPos $allMsgNumber $pagesize $goFPButton $goPPButton $goNPButton $goLPButton $sakai_csrf_token $pagesizes )
<div class="col-md-4">
#paginator( $topMsgPos $btmMsgPos $allMsgNumber $pagesize $goFPButton $goPPButton $goNPButton $goLPButton $sakai_csrf_token $pagesizes )
</div>
</div>

<form name="listAssignmentsForm" action="#toolForm("$action")" method="post">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
position: absolute;
}
.assignment-pager {
margin-top: 1em;
max-width: 350px;
text-align: center;
.panel-heading {
Expand Down

0 comments on commit 0e27823

Please sign in to comment.