Skip to content

Commit 99add47

Browse files
KumailKumail
authored andcommitted
changes in doubt transition
1 parent ce82ca0 commit 99add47

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

app/pods/attempt/index/route.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ export default class IndexRoute extends Route {
2020

2121
for(const section of sections.toArray()){
2222
const contents=await section.get('contents')
23-
const contentArray=contents.filter((content, index, self) => content.get("id")==contentId)
24-
if(contentArray.length){
25-
sectionId=section.get("id")
26-
break
27-
}
23+
const content=contents.findBy("id",contentId)
24+
if(content){
25+
sectionId=section.get("id")
26+
break
27+
}
2828
}
2929
this.transitionTo(
3030
"attempt.content",

app/pods/classroom/timeline/library/controller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export default class ClassroomTimelineLibraryController extends Controller {
3131
{
3232
name: 'Doubts',
3333
component: 'course-library/doubts',
34-
task: this.fetchDoubts
34+
task: this.fetchDoubts,
35+
option:true
3536
}
3637
];
3738

app/pods/classroom/timeline/library/template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@onTabChange={{action "changeTab"}}
66
>
77
<WAsync @task={{activeTab.task}} @autoFire={{true}} as |result|>
8-
{{component activeTab.component runAttempt=runAttempt payload=result option=true class="border-bottom-list my-5"}}
8+
{{component activeTab.component runAttempt=runAttempt payload=result option=activeTab.option class="border-bottom-list my-5"}}
99
</WAsync>
1010
</WTabNav>
1111

0 commit comments

Comments
 (0)