Skip to content
Snippets Groups Projects
Commit c130d73b authored by Florian Gnaegi - frentix GmbH's avatar Florian Gnaegi - frentix GmbH
Browse files

OO-1068 bootstrapify cl, iqself, surv startpage

parent ee45731d
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.ControllerEventListener;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.generic.dtabs.Activateable2;
import org.olat.core.gui.control.generic.folder.FolderHelper;
import org.olat.core.gui.util.CSSHelper;
import org.olat.core.id.OLATResourceable;
import org.olat.core.id.context.ContextEntry;
import org.olat.core.id.context.StateEntry;
......@@ -209,9 +209,8 @@ public class CheckListRunController extends FormBasicController implements Contr
String filename = checkbox.getFilename();
String name = "file_" + checkbox.getCheckboxId();
downloadLink = uifactory.addFormLink(name, "download", filename, null, formLayout, Link.LINK | Link.NONTRANSLATED);
String type = FolderHelper.extractFileType(filename, getLocale());
if (!FolderHelper.isKnownFileType(type)) { type = "file"; }
downloadLink.setElementCssClass("b_with_small_icon_left b_filetype_" + type);
String css = CSSHelper.createFiletypeIconCssClassFor(filename);
downloadLink.setIconLeftCSS("o_icon o_icon-fw " + css);
((Link)downloadLink.getComponent()).setTarget("_blank");
}
......
#if($hasScoreField || $hasPassedField || $hasCommentField)
<div class="o_course_run_scoreinfo">
#if ($hasScoreField)
<h4>$r.translate("score.title")</h4>
<table>
<tbody>
<tr><td>$r.translate("score.min"):</td>
<td>$scoreMin</td></tr>
<tr><td>$r.translate("score.max"):</td>
<td>$scoreMax</td></tr>
<tr><td>$r.translate("score.yourscore"):</td>
<td>
#if($score)
$score
#else
<div class="o_course_run_scoreinfo_noinfo">$r.translate("score.noscore")</div>
#end
</td>
</tr>
</tbody>
</table>
#end
#if ($hasPassedField)
<h4>$r.translate("passed.title")</h4>
<table>
<tbody>
#if($hasScoreField || $hasPassedField)
<div class="panel panel-default o_personal">
<div class="panel-heading">$r.translate("score.title")</div>
<table class="table">
<tbody>
#if ($hasScoreField)
<tr class="o_score_config_min">
<th>$r.translate("score.min")</th>
<td>$scoreMin</td>
</tr>
<tr class="o_score_config_max">
<th>$r.translate("score.max")</th>
<td>$scoreMax</td>
</tr>
<tr class="o_score">
<th>$r.translate("score.yourscore")</th>
<td>
#if($score)
$score
#else
<div class="o_noinfo">$r.translate("score.noscore")</div>
#end
</td>
</tr>
#end
#if ($hasPassedField)
#if ($passedCutValue)
<tr><td>$r.translate("passed.cut"):</td>
<td>$passedCutValue</td></tr>
<tr class="o_cutval">
<th>$r.translate("passed.cut")</th>
<td>$passedCutValue</td>
</tr>
#end
<tr class="o_state #if ($hasPassedValue && $passed) o_passed #elseif($hasPassedValue && !$passed) o_failed #else o_unknown #end">
<th>$r.translate("passed.yourpassed")</th>
<td>
#if($hasPassedValue && $passed)
<i class="o_icon o_icon_passed"></i>
$r.translate("passed.yes")
#elseif($hasPassedValue && !$passed)
<i class="o_icon o_icon_failed"></i>
$r.translate("passed.no")
#else
<div class="o_noinfo">$r.translate("passed.nopassed")</div>
#end
</td>
</tr>
#end
<tr><td>$r.translate("passed.yourpassed"):</td>
<td>
#if($hasPassedValue && $passed == true)
<span class="o_passed">$r.translate("passed.yes")</span>
#elseif($hasPassedValue && $passed == false)
<span class="o_notpassed">$r.translate("passed.no")</span>
#else
<div class="o_course_run_scoreinfo_noinfo">$r.translate("passed.nopassed")</div>
#end
</td>
</tr>
</tbody>
</table>
#end
</tbody>
</table>
</div>
#end
#if ($hasCommentField)
<h4>$r.translate("comment.title")</h4>
#if($comment)
$comment
#else
<div class="o_course_run_scoreinfo_noinfo">$r.translate("comment.nocomment")</div>
#end
#end
</div>
#if ($hasCommentField)
<div class="panel panel-default o_comment">
<div class="panel-heading">$r.translate("comment.title")</div>
<div class="panel-body">
#if($comment)
$comment
#else
<div class="o_noinfo">$r.translate("comment.nocomment")</div>
#end
</div>
</div>
#end
#if($infoTextUser)
<div class="o_course_run_disclaimer">
<h4>$r.translate("info.title")</h4>
$r.formatLatexFormulas($infoTextUser)
<div class="panel panel-default o_disclaimer">
<div class="panel-heading">$r.translate("info.title")</div>
<div class="panel-body">
$r.formatLatexFormulas($infoTextUser)
</div>
</div>
#end
#if($dueDate)
<div class="o_course_run_deadline">
<p>$r.translate("run.due.date.desc")</p>
<p class="o_cl_duedate #if($afterDueDate) o_cl_duedate_passed #end">$r.translate("run.due.date", $r.formatDateAndTime($dueDate))</p>
<div class="panel panel-default o_duedate #if($afterDueDate) o_duedate_passed #end">
<div class="panel-heading">$r.translate("config.due.date")</div>
<div class="panel-body">
<p>
$r.translate("run.due.date.desc")
</p>
<p class="#if($afterDueDate) o_passed #else o_failed #end">
$r.translate("run.due.date", $r.formatDateAndTime($dueDate))
</p>
</div>
</div>
#end
<div class="o_cl">
<div class="b_clearfix">
<div class="b_c25l"><h5>$r.translate("run.mark")</h5></div>
<div class="b_c75r"><h5>$r.translate("run.info")</h5></div>
<div class="o_cl row">
<div class="col-xs-12 col-sm-2"><h5>$r.translate("run.mark")</h5></div>
<div class="col-xs-12 col-sm-10"><h5>$r.translate("run.info")</h5></div>
</div>
#foreach($checkbox in $checkboxList)
<div class="b_clearfix o_cl_line #if($velocityCount %2 == 0) o_even #else o_odd #end">
<div class="b_c25l o_cl_cb">
<div class="o_cl_line row clearfix #if($velocityCount %2 == 0) o_even #else o_odd #end">
<div class="col-xs-12 col-sm-2">
$r.render($checkbox.checkboxElName)
</div>
<div class="b_c75r">
<div class="b_cl_title">
<b>$checkbox.title</b> #if($withScore && $checkbox.pointsAvailable) $r.translate("box.points.info", $checkbox.points) #end
</div>
<div class="col-xs-12 col-sm-10">
<h5 class="o_cl_title">
$checkbox.title
#if($withScore && $checkbox.pointsAvailable)
<small>$r.translate("box.points.info", $checkbox.points)</small>
#end
</h5>
#if($checkbox.description)
<div class="o_cl_desc">$checkbox.description</div>
#end
#if($checkbox.checkbox.filename)
<div class="o_cl_file">Download: $r.render($checkbox.downloadName)</div>
<div class="o_cl_file">$r.render($checkbox.downloadName)</div>
#end
</div>
</div>
......
#if ($enableScoreInfo)
<div class="o_course_run_scoreinfo">
<h4>$r.translate("score.title")</h4>
<table>
<tbody>
#if ($hasResults)
<tr>
<td>
$r.translate("score.yourscore"):
</td>
#if ($hasResults)
<div class="panel panel-default o_personal">
<div class="panel-heading">$r.translate("score.title")</div>
<table class="table">
<tbody>
<tr class="o_attempts">
<th>$r.translate("attempts.yourattempts")</th>
<td>
$score
</td>
</tr>
<tr>
<td>
$r.translate("passed.yourpassed"):
</td>
$attempts
</td>
</tr>
<tr class="o_score">
<th>$r.translate("score.yourscore")</th>
<td>
#if($hasPassedValue && $passed == true)
<span class="o_passed">$r.translate("passed.yes")</span>
#elseif($hasPassedValue && $passed == false)
<span class="o_notpassed">$r.translate("passed.no")</span>
#end
</td>
</tr>
#if ($comment)
<tr>
<td>
$r.translate("comment.yourcomment"):
</td>
$score
</td>
</tr>
<tr class="o_state #if ($hasPassedValue && $passed) o_passed #elseif($hasPassedValue && !$passed) o_failed #else o_unknown #end">
<th>$r.translate("passed.yourpassed")</th>
<td>
$comment
#if($hasPassedValue && $passed)
<i class="o_icon o_icon_passed"></i>
$r.translate("passed.yes")
#elseif($hasPassedValue && !$passed)
<i class="o_icon o_icon_failed"></i>
$r.translate("passed.no")
#else
$r.translate("passed.noinfo")
#end
</td>
</tr>
#end
</tbody>
</table>
#else
</tbody>
</table>
<div class="o_course_run_scoreinfo_noinfo">$r.translate("score.noscoreinfoyet")</div>
#end
</div>##END o_course_run_scoreinfo
#end
#if($showResultsOnHomePage && $attempts >0)
<h4>$r.translate("showResults.title")</h4>
#if($showResultsVisible)
#if ($showResults)
$r.render("command.hideResults")
#else
$r.render("command.showResults")
#end
#if ($showResults)
#if ($displayreporting)
<br />
<h4>$r.translate("showResults.detailed")</h4>
<div class="b_small">
$!resreporting
</div>
#end
#end
#else
$visibilityPeriod
</table>
</div>
#if ($comment)
<div class="panel panel-default o_comment">
<div class="panel-heading">$r.translate("comment.yourcomment")</div>
<div class="panel-body">
$comment
</div>
</div>
#end
#end ##END of if showResultsOnHomePage ...
#if ($showResultsVisible && $showResults)
#else
#if ($hasDisc)
<div class="o_course_run_disclaimer">
$r.render("disc")
#else
<div class="o_no_scoreinfo">
$r.translate("score.noscoreinfoyet")
</div>
#end
#end
<div class="o_course_run_statusinfo">
<p>
$r.translate("Intro.self")
</p>
<p>
$r.translate("info.selfassessment")
</p>
#if($showResultsOnHomePage && $attempts >0)
<div class="panel panel-default o_results">
<div class="panel-heading">$r.translate("showResults.title")</div>
<div class="panel-body">
#if($showResultsVisible)
#if ($showResults)
$r.render("command.hideResults")
#else
$r.render("command.showResults")
#end
#if ($showResults)
#if ($displayreporting)
<br />
<h4>$r.translate("showResults.detailed")</h4>
<div id="o_qti_results" class="small">
$!resreporting
</div>
#end
#end
#else
$visibilityPeriod
#end
</div>
</div>
<div class="b_button_group">
$r.render("start")
</div>
#end
#if ($hasDisc)
<div class="panel panel-default o_disclaimer">
<div class="panel-heading">$r.translate("disclaimer")</div>
<div class="panel-body">
$r.render("disc")
</div>
</div>
#end
<div class="o_statusinfo">
<p>
$r.translate("Intro.self")
</p>
<p>
$r.translate("info.selfassessment")
</p>
</div>
<div class="o_button_group">
$r.render("start")
</div>
#if($changeLog)
<p />
<div class=o_box">
#o_togglebox_start("o_course_run_changelog" $r.translate("changelog.title"))
<pre>
<pre class="small">
$changeLog
</pre>
#o_togglebox_end()
</div>
#end
\ No newline at end of file
#if ($hasDisc)
<div class="o_course_run_disclaimer">
$r.render("disc")
</div>
#end
#if ($hasDisc)
<div class="panel panel-default o_disclaimer">
<div class="panel-heading">$r.translate("disclaimer")</div>
<div class="panel-body">
$r.render("disc")
</div>
</div>
#end
#if ($attempts == 0)
<div class="o_course_run_statusinfo">
<p>
$r.translate("Intro.surv")
</p>
<p>
$r.translate("info.survey")
</p>
</div>
<div class="b_button_group">
$r.render("start")
</div>
#else
<div class="o_course_run_statusinfo">
$r.translate("info.survey.alreadydone")
</div>
#end
#if ($attempts == 0)
<div class="o_statusinfo">
<p>
$r.translate("Intro.surv")
</p>
<p>
$r.translate("info.survey")
</p>
</div>
<div class="o_button_group">
$r.render("start")
</div>
#else
<div class="o_statusinfo">
$r.translate("info.survey.alreadydone")
</div>
#end
#if($changeLog)
<p />
#o_togglebox_start("o_course_run_changelog" $r.translate("changelog.title"))
<pre>
#if($changeLog)
<p />
#o_togglebox_start("o_course_run_changelog" $r.translate("changelog.title"))
<pre class="small">
$changeLog
</pre>
#o_togglebox_end()
#end
\ No newline at end of file
</pre>
#o_togglebox_end()
#end
\ No newline at end of file
......@@ -16,15 +16,11 @@
</tr>
<tr class="o_attempts">
<th>$r.translate("attempts.yourattempts")</th>
<td>
$attempts
</td>
<td>$attempts</td>
</tr>
<tr class="o_score">
<th>$r.translate("score.yourscore")</th>
<td>
$score
</td>
<td>$score</td>
</tr>
<tr class="o_state #if ($hasPassedValue && $passed) o_passed #elseif($hasPassedValue && !$passed) o_failed #else o_unknown #end">
<th>$r.translate("passed.yourpassed")</th>
......@@ -138,19 +134,21 @@
#end
#if ($log && $showChangelog)
<p />
<div class=o_box">
#o_togglebox_start("o_course_run_log" $r.translate("log.title"))
<pre class="small">
$log
</pre>
#o_togglebox_end()
#end
</div>
#end
#if($changeLog)
<p />
#if($changeLog)
<div class=o_box">
#o_togglebox_start("o_course_run_changelog" $r.translate("changelog.title"))
<pre class="small">
$changeLog
</pre>
#o_togglebox_end()
#end
\ No newline at end of file
</div>
#end
\ No newline at end of file
......@@ -59,6 +59,9 @@
color: $text-color
}
}
.o_noinfo {
@extend .text-muted;
}
.o_course_run {
......@@ -85,7 +88,6 @@
.o_statusinfo {
@extend .o_note;
}
}
.o_st_peekview {
......@@ -94,4 +96,13 @@
margin-bottom: 0.5em;
}
}
}
\ No newline at end of file
}
.o_cl_line {
margin-bottom: $padding-large-vertical;
padding-bottom: $padding-small-vertical;
&.o_even {
background-color: $table-bg-accent;
}
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment