Skip to content
Snippets Groups Projects
Commit 3356ff2e authored by uhensler's avatar uhensler
Browse files

OO-4207: Visualization of the leaning path in the course menu

parent 1441a050
No related branches found
No related tags found
No related merge requests found
Showing
with 73 additions and 20 deletions
......@@ -78,6 +78,11 @@ public class ConditionNodeAccessProvider implements NodeAccessProvider {
return null;
}
@Override
public String getCourseTreeCssClass() {
return "";
}
@Override
public CourseTreeModelBuilder getCourseTreeModelBuilder(UserCourseEnvironment userCourseEnv) {
return new ConditionCourseTreeModelBuilder(userCourseEnv);
......@@ -113,4 +118,5 @@ public class ConditionNodeAccessProvider implements NodeAccessProvider {
AssessmentEntryStatus status, Role by) {
// nothing to do
}
}
......@@ -54,6 +54,7 @@ public class LearningPathCourseTreeModelBuilder extends CourseTreeModelBuilder {
String iconDecorator1CssClass = getIconDecorator1CssClass(assessmentEvaluation, userCourseEnv);
if (userCourseEnv.isParticipant()) {
learningPathTreeNode.setIconCssClass(iconDecorator1CssClass);
learningPathTreeNode.setCssClass(iconDecorator1CssClass);
} else {
learningPathTreeNode.setIconDecorator1CssClass(iconDecorator1CssClass);
}
......
......@@ -87,6 +87,11 @@ public class LearningPathNodeAccessProvider implements NodeAccessProvider {
return new TabbableLeaningPathNodeConfigController(ureq, wControl, configCtrl);
}
@Override
public String getCourseTreeCssClass() {
return "o_lp_tree";
}
@Override
public CourseTreeModelBuilder getCourseTreeModelBuilder(UserCourseEnvironment userCourseEnv) {
return new LearningPathCourseTreeModelBuilder(userCourseEnv);
......
......@@ -42,6 +42,8 @@ public interface NodeAccessProvider extends NodeAccessProviderIdentifier {
public TabbableController createEditController(UserRequest ureq, WindowControl wControl, CourseNode courseNode,
UserCourseEnvironment userCourseEnv, CourseEditorTreeModel editorModel);
public String getCourseTreeCssClass();
public CourseTreeModelBuilder getCourseTreeModelBuilder(UserCourseEnvironment userCourseEnv);
public boolean onNodeVisited(CourseNode courseNode, UserCourseEnvironment userCourseEnvironment);
......
......@@ -59,6 +59,14 @@ public interface NodeAccessService {
public TabbableController createEditController(UserRequest ureq, WindowControl wControl, NodeAccessType type,
CourseNode courseNode, UserCourseEnvironment userCourseEnv, CourseEditorTreeModel editorModel);
/**
* CSS class to inject in the course menu tree.
*
* @param type
* @return
*/
public String getCourseTreeCssClass(NodeAccessType type);
/**
* Builder to build the TreeModel of the complete course run structure.
* The builded TreeModel holds only TreeNodes of the (sub) type CourseTreeNode
......@@ -121,5 +129,4 @@ public interface NodeAccessService {
public void onStatusUpdated(CourseNode courseNode, UserCourseEnvironment userCourseEnv,
AssessmentEntryStatus status, Role by);
}
......@@ -85,6 +85,11 @@ public class NodeAccessServiceImpl implements NodeAccessService, NodeVisitedList
return getNodeAccessProvider(type).createEditController(ureq, wControl, courseNode, userCourseEnv, editorModel);
}
@Override
public String getCourseTreeCssClass(NodeAccessType type) {
return getNodeAccessProvider(type).getCourseTreeCssClass();
}
@Override
public CourseTreeModelBuilder getCourseTreeModelBuilder(UserCourseEnvironment userCourseEnv) {
NodeAccessType type = NodeAccessType.of(userCourseEnv);
......
......@@ -82,6 +82,7 @@ import org.olat.course.config.CourseConfig;
import org.olat.course.editor.PublishEvent;
import org.olat.course.groupsandrights.CourseGroupManager;
import org.olat.course.nodeaccess.NodeAccessService;
import org.olat.course.nodeaccess.NodeAccessType;
import org.olat.course.nodes.CourseNode;
import org.olat.course.run.glossary.CourseGlossaryFactory;
import org.olat.course.run.glossary.CourseGlossaryToolLinkController;
......@@ -184,7 +185,8 @@ public class RunMainController extends MainLayoutBasicController implements Gene
luTree = new MenuTree(null, "luTreeRun", this);
luTree.setScrollTopOnClick(true);
luTree.setExpandSelectedNode(false);
luTree.setElementCssClass("o_course_menu");
String treeCssClass =nodeAccessService.getCourseTreeCssClass(NodeAccessType.of(course));
luTree.setElementCssClass("o_course_menu " + treeCssClass);
contentP = new Panel("building_block_content");
paginationCtrl = new CoursePaginationController(ureq, getWindowControl());
......
......@@ -254,6 +254,7 @@ $o-tree-padding-vertical : 10px !default;
$o-tree-padding-horizontal_root_visible : 10px !default;
$o-tree-padding-horizontal_root_hidden : 20px !default;
$o-tree-padding-steps-px : 15px !default;
$o-tree-padding-left-steps-px : 2px !default;
$o-tree-padding-opener-left-px : 1px !default;
$o-tree-dnd-hover : $brand-warning;
......
This diff is collapsed.
{
"version": 3,
"mappings": "AAkBA,aAAc,CACb,WAAW,CC20Be,wGAA8G,CD10BxI,SAAS,CC20BgB,KAAK,CDz0B9B,8BAAiB,CAChB,MAAM,CCy0BsB,aAAc,CDx0B1C,YAAY,CCy0BoB,IAAI,CDv0BpC,iCAAG,CACF,gBAAgB,CC60BK,OAAe,CD50BpC,KAAK,CC20BkB,IAAkB,CD10BzC,OAAO,CAAE,gBAAyC,CAClD,aAAa,CAAE,IAAI,CACnB,WAAW,CAAE,KAA8B,CAC3C,SAAS,CAAE,OAAO,CAGnB,qCAAO,CACN,KAAK,CCo0BgB,OAAe,CDj0BtC,6BAAgB,CACf,SAAS,CAAE,OAAO,CAClB,KAAK,CC4zBqB,IAAgB,CD3zB1C,UAAU,CAAE,iBAAmC,CAC/C,OAAO,CAAE,QAAQ,CACjB,UAAU,CAAE,GAAG,CAEf,+BAAE,CACD,KAAK,CCszBoB,IAAgB,CD/yB3C,6BAAc,CACb,WAAW,CAAE,OAAO,CAWrB,6BAAgB,CACf,KAAK,CCoyBmB,IAAkB,CDnyB1C,gBAAgB,CCoyBM,OAAe,CDnyBrC,YAAY,CCoyBiB,OAAmB,CDnyBhD,aAAa,CCoyBiB,GAAG,CDnyBjC,OAAO,CAAE,QAAQ,CACjB,UAAU,CAAE,MAAM,CAClB,WAAW,CAAE,MAAM,CACnB,cAAc,CAAE,MAAM,CACtB,YAAY,CAAE,YAAY,CAC1B,MAAM,CAAE,OAAO,CACf,eAAe,CAAE,IAAI,CAGtB,mCAAsB,CACrB,UAAU,CAAE,GAAG,CACf,aAAa,CAAE,GAAG,CAClB,UAAU,CAAE,MAAM,CAElB,qCAAE,CACD,YAAY,CAAE,GAAG,CACjB,aAAa,CAAE,KAAK,C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DAAa,CACZ,YAAY,CAAE,CAAC,CAMlB,wCAA2B,CAC1B,UAAU,CAAE,IAAI,CAEjB,yCAA4B,CAC3B,UAAU,CAAE,KAAK",
"sources": ["email.scss","_config.scss"],
"names": [],
"file": "email.css"
......
......@@ -17,13 +17,36 @@
}
}
.o_course_menu {
.o_lp_not_accessible { color: $o-lp-not-accessible; }
.o_lp_ready { color: $o-lp-ready; }
.o_lp_in_progress { color: $o-lp-in-progress; }
.o_lp_done { color: $o-lp-done; }
.o_lp_tree.o_tree {
border: none;
ul li div {
border-bottom: none;
}
span.o_tree_link {
border-left: 2px solid;
}
li.o_lp_not_accessible > div > span.o_tree_link {
border-color: $o-lp-not-accessible;
}
li.o_lp_ready > div > span.o_tree_link {
border-color: $o-lp-ready;
}
li.o_lp_in_progress > div > span.o_tree_link {
border-color: $o-lp-in-progress;
}
li.o_lp_done > div > span.o_tree_link {
border-color: $o-lp-done;
}
i.o_lp_not_accessible { color: $o-lp-not-accessible; }
i.o_lp_ready { color: $o-lp-ready; }
i.o_lp_in_progress { color: $o-lp-in-progress; }
i.o_lp_done { color: $o-lp-done; }
}
/* score info status classes */
.o_passed {
color: $o-course-state-passed-color;
......
......@@ -630,10 +630,10 @@ $fa-css-prefix: "o_icon" !default;
.o_midlock:before { content: $fa-var-lock;}
.o_miderr:before { content: $fa-var-exclamation-circle;}
.o_middel:before { content: $fa-var-eraser;}
.o_lp_not_accessible:before { content: $fa-var-times-circle;}
.o_lp_ready:before { content: $fa-var-unlock;}
.o_lp_in_progress:before { content: $fa-var-play;}
.o_lp_done:before { content: $fa-var-check-circle;}
i.o_lp_not_accessible:before { content: $fa-var-times;}
i.o_lp_ready:before { content: $fa-var-unlock;}
i.o_lp_in_progress:before { content: $fa-var-play;}
i.o_lp_done:before { content: $fa-var-check;}
/* File type icons */
......
......@@ -85,7 +85,8 @@
@for $i from 0 through 11 {
li div span.o_tree_l#{$i} {
display:block;
padding: $o-tree-padding-vertical 2px $o-tree-padding-vertical ($o-tree-padding-horizontal_root_visible + ($i * $o-tree-padding-steps-px));
padding: $o-tree-padding-vertical 2px $o-tree-padding-vertical $o-tree-padding-left-steps-px;
margin-left: $o-tree-padding-horizontal_root_visible + ($i * $o-tree-padding-steps-px);
z-index:9;
}
}
......
This diff is collapsed.
This diff is collapsed.
{
"version": 3,
"mappings": "AAkBA,aAAc,CACb,WAAW,CC20Be,wGAA8G,CD10BxI,SAAS,CC20BgB,KAAK,CDz0B9B,8BAAiB,CAChB,MAAM,CCy0BsB,aAAc,CDx0B1C,YAAY,CCy0BoB,IAAI,CDv0BpC,iCAAG,CACF,gBAAgB,CC60BK,OAAe,CD50BpC,KAAK,CC20BkB,IAAkB,CD10BzC,OAAO,CAAE,gBAAyC,CAClD,aAAa,CAAE,IAAI,CACnB,WAAW,CAAE,KAA8B,CAC3C,SAAS,CAAE,OAAO,CAGnB,qCAAO,CACN,KAAK,CCo0BgB,OAAe,CDj0BtC,6BAAgB,CACf,SAAS,CAAE,OAAO,CAClB,KAAK,CC4zBqB,IAAgB,CD3zB1C,UAAU,CAAE,iBAAmC,CAC/C,OAAO,CAAE,QAAQ,CACjB,UAAU,CAAE,GAAG,CAEf,+BAAE,CACD,KAAK,CCszBoB,IAAgB,CD/yB3C,6BAAc,CACb,WAAW,CAAE,OAAO,CAWrB,6BAAgB,CACf,KAAK,CCoyBmB,IAAkB,CDnyB1C,gBAAgB,CCoyBM,OAAe,CDnyBrC,YAAY,CCoyBiB,OAAmB,CDnyBhD,aAAa,CCoyBiB,GAAG,CDnyBjC,OAAO,CAAE,QAAQ,CACjB,UAAU,CAAE,MAAM,CAClB,WAAW,CAAE,MAAM,CACnB,cAAc,CAAE,MAAM,CACtB,YAAY,CAAE,YAAY,CAC1B,MAAM,CAAE,OAAO,CACf,eAAe,CAAE,IAAI,CAGtB,mCAAsB,CACrB,UAAU,CAAE,GAAG,CACf,aAAa,CAAE,GAAG,CAClB,UAAU,CAAE,MAAM,CAElB,qCAAE,CACD,YAAY,CAAE,GAA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B,WAAW,CAAE,IAAI,CACjB,gDAAa,CACZ,YAAY,CAAE,CAAC,CAMlB,wCAA2B,CAC1B,UAAU,CAAE,IAAI,CAEjB,yCAA4B,CAC3B,UAAU,CAAE,KAAK",
"sources": ["../light/email.scss","../light/_config.scss"],
"names": [],
"file": "email.css"
......
This diff is collapsed.
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