This repository was archived by the owner on Jun 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,11 @@ def index():
124124 chapters = db (db .chapters .course_id == course .base_course ).select (
125125 orderby = db .chapters .chapter_num
126126 )
127+ c_origin = getCourseOrigin (course .base_course )
128+ if c_origin and c_origin .value == "PreTeXt" :
129+ c_origin = "PreTeXt"
130+ else :
131+ c_origin = "Runestone"
127132
128133 logger .debug ("getting chapters for {}" .format (auth .user .course_name ))
129134 chapget = ChapterGet (chapters )
@@ -320,6 +325,7 @@ def index():
320325 studentactivity = studentactivity ,
321326 recentactivity = recentactivity ,
322327 dailyactivity = dailyactivity ,
328+ origin = c_origin ,
323329 )
324330
325331
Original file line number Diff line number Diff line change 5151 {{ for section in sections: }}
5252 {{ sectionnumber=section["number"] }}
5353 < div style ="height: 30px; ">
54- < div style ="font-size:1.0em; font-weight: bold; margin-top: 0.5em; "> < a style ="color:black; " href ="{{=get_course_url(selected_chapter['chapter_label'], section['text'])}}.html "> {{=section["name"]}}</ a > </ div >
54+ < div style ="font-size:1.0em; font-weight: bold; margin-top: 0.5em; ">
55+ {{ if origin == "Runestone":}}
56+ < a style ="color:black; " href ="{{=get_course_url(selected_chapter['chapter_label'], section['text'])}}.html "> {{=section["name"]}}</ a >
57+ {{ else: }}
58+ < a style ="color:black; " href ="{{=get_course_url( "", section['text'])}}.html"> {{=section["name"]}}</ a >
59+
60+ {{ pass }}
61+
62+ </ div >
63+
5564 < div style ="" class ="dash-bar-container ">
5665 < div class ="dash-bar dash-bar-correct " style ="width: {{=section['readPercent']}}; "> {{=section["readPercent"]}} </ div >
5766 < div class ="dash-bar dash-bar-attempts " style =" width: {{=section['startedPercent']}}; "> {{=section["startedPercent"]}} </ div >
You can’t perform that action at this time.
0 commit comments