Skip to content
This repository has been archived by the owner on Aug 21, 2018. It is now read-only.

840 course career path(connects #840) #882

Open
wants to merge 39 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
72c77d2
[#840]: Layout Created For CareerPath
Pr0chin Jun 1, 2017
1c0bfd5
[#840]: Career Path
Pr0chin Jun 2, 2017
acce8e6
[#840] added multiselect feature
Rupesh87 Jun 2, 2017
ec0d6a9
[#840] Some Changes
Pr0chin Jun 2, 2017
6bf8c55
[#840]:CLean Conflict
Pr0chin Jun 2, 2017
0db709e
[#840] select value and save career
Rupesh87 Jun 5, 2017
d79ab6c
[#840]:Changes Made
Pr0chin Jun 5, 2017
3e23999
[#840]: Removed Conflit
Pr0chin Jun 5, 2017
472c573
[#840]:list of courseCareer
Rupesh87 Jun 5, 2017
b6b7650
[#840]:Upgrading
Pr0chin Jun 5, 2017
aa9400f
[#840]:Removed conflicts
Pr0chin Jun 5, 2017
72f41a5
[#840]:AddCourseCareer completed
Pr0chin Jun 5, 2017
1e319ff
[#840]:Setting new concept
Pr0chin Jun 6, 2017
efee3b0
[#840]:Some changes made
Pr0chin Jun 8, 2017
2d1ab43
[#840]:Upgraded some changes
Pr0chin Jun 9, 2017
8d181f6
[#840]save required career
Rupesh87 Jun 9, 2017
b79af87
[#840]-edit careerpath
Rupesh87 Jun 9, 2017
ed5410b
[#840]Delete and search
razu9861 Jun 9, 2017
59ac284
[#840]:Latest push Course Career
Pr0chin Jun 9, 2017
9d8958c
[#840]-changes on carrerpath
razu9861 Jun 12, 2017
6a26b1e
840-Remover Merge Conflict
Pr0chin Jun 13, 2017
de5b792
840:Changed as per required
Pr0chin Jun 14, 2017
4c288a7
[#840]:features added
razu9861 Jun 14, 2017
e65d1a9
[#840] Tab Function
Pr0chin Jun 16, 2017
a4fba58
[#840] Tab Functionality
Pr0chin Jun 19, 2017
dd4f37e
[#840] Upgraded changes
Pr0chin Jun 19, 2017
44cf88f
[#840] Made some changes
Pr0chin Jun 20, 2017
0ff745c
Merge branch '840-Course-Career-Path' of https://github.com/open-lear…
Pr0chin Jun 20, 2017
979fa97
[#840]-Career path
razu9861 Jun 21, 2017
422c207
[#840]:list career added
razu9861 Jun 26, 2017
1134278
[#840] Career Path
razu9861 Oct 9, 2017
e396ec4
[#840] careerpath
razu9861 Oct 11, 2017
a6395f6
[#840] unwanted files removed
razu9861 Oct 11, 2017
c9a06d2
careerppath
razu9861 Oct 27, 2017
c454d57
[#840] Career detail view
razu9861 Nov 2, 2017
e94449c
Merge branch 'dev' into 840-Course-Career-Path
razu9861 Jan 15, 2018
59256b6
[#840] indentation fixed
razu9861 Jan 15, 2018
731c52e
Update Text.json
razu9861 Jan 15, 2018
b14251a
[#840] indentation fixed
razu9861 Jan 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
careerppath
  • Loading branch information
razu9861 committed Oct 27, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit c9a06d22a13c77e2c85054406c8e9bf62961eb9a
26 changes: 25 additions & 1 deletion app/MyApp/app/Router.js
Original file line number Diff line number Diff line change
@@ -97,7 +97,8 @@ $(function() {
'passwordResetEmail': 'showPasswordResetEmail',
'password-reset': 'showPasswordReset',
'courseCareerPath':'addCareerPath',
'courseCareerPath/manage/:careername/:careerId':'manageCourseCareer'
'courseCareerPath/manage/:careername/:careerId':'manageCourseCareer',
'courseCareerPath/details/:carrerId': 'CareerDetails'
},
addOrUpdateWelcomeVideoDoc: function() {
// fetch existing welcome video doc if there is any
@@ -6826,6 +6827,29 @@ $(function() {
$('#LCourse').multiselect("uncheckAll");
var directionOfLang = App.languageDict.get('directionOfLang');
applyCorrectStylingSheet(directionOfLang)
},

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra line

CareerDetails: function(careerId) {
var CareerPath = new App.Models.CoursecareerPath({
_id : careerId
});
CareerPath.fetch({
async:false
});
for (var i = 0; i < CareerPath.attributes.CourseIds.length; i++){
var course = new App.Models.Course({
_id: CareerPath.attributes.CourseIds[i]
})
course.fetch({
async:false
})
}
var careerView = new App.Views.CareerDetailView({
model: course
})
careerView.render()
App.$el.children('.body').html(careerView.el);
applyCorrectStylingSheet(App.languageDict.get('directionOfLang'))
}
}))
})
65 changes: 65 additions & 0 deletions app/MyApp/app/views/CareerDetailView.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
$(function() {

App.Views.CareerDetailView = Backbone.View.extend({
template: $('#template-CareerDetailView').html(),
vars: {},
events: {
},

initialize: function() {
},

render: function (){
var vars = this.model
console.log(vars)
vars.viewCourse=App.languageDict.attributes.View+' '+App.languageDict.attributes.Course;
vars.progress=App.languageDict.attributes.Progress;
var courseLeader = vars.attributes.courseLeader
for(var i = 0; i < courseLeader.length; i++) {
var memberModel = new App.Models.Member()
_id: courseLeader[i];
memberModel.fetch({
async: false
});
}
console.log(memberModel)
var roles = memberModel.attributes.roles
console.log(roles)
if (vars.attributes.courseLeader != undefined) {
if (vars.attributes.courseLeader.indexOf($.cookie('Member._id')) > -1 ) {
vars.link = "#creditsDetails/" + vars._id;
vars.isLeader = 1;
} else {
vars.isLeader = 0;
}
}else {
vars.isLeader = 0;
}
if (roles.indexOf("Manager") != -1 || vars.isLeader!=0 ) {
vars.viewProgress = 1
} else {
vars.viewProgress = 0
}
if (roles.indexOf("Manager") != -1) {
vars.isAdmin = 1;
vars.link = "#creditsDetails/" + vars._id;
} else {
vars.isAdmin = 0;
vars.showCreditButton =false;
}


vars.viewProgress = true;
vars.isAdmin = 0
vars.isLeader = 0
vars.courseId=vars.id;
vars.CourseTitle = vars.attributes.CourseTitle
vars.showCreditButton = true;
vars.link = "#creditsDetails/" + vars._id;
vars.viewProgress = 0
this.$el.append(_.template(this.template, vars));
}

})

})
35 changes: 34 additions & 1 deletion app/MyApp/index.html
Original file line number Diff line number Diff line change
@@ -308,6 +308,7 @@
<script src="app/views/AnswerReview.js"></script> <!-- app/views.js -->
<script src="app/views/PasswordReset.js"></script> <!-- app/views.js -->
<script src="app/views/ManageCourseCareer.js"></script> <!-- app/views.js -->
<script src="app/views/CareerDetailView.js"></script> <!-- app/views.js -->
<!-- <script src="app/views/CareerPathTable.js"></script> --><!-- app/views.js -->


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line

@@ -1475,7 +1476,7 @@ <h4 style="width:25em;word-wrap:break-word;">
</tr>
<%for (var i=0; i < careerList.length; i++) {%>
<tr>
<td><a href="#usercourse/details/<%= Courseid[i] %>/<%= Courselist[i] %>"><%= careerList[i].CoursePathName %></a></td>
<td><a href="#courseCareerPath/details/<%= careerList[i]._id %>"><%= careerList[i].CoursePathName %></a></td>
<td><ul><li><%= careerList[i].Courses %></li></ul></td>
<td><ul><li><%= careerList[i].requiredCareerPathIds%></li></ul></td>
<td>
@@ -1512,6 +1513,38 @@ <h6><%= languageDict.attributes.Course_Lists %></h6>
</div>
</script>

<script type="text/template" id="template-CareerDetailView">
<h3>CareerDetailView</h3>
<table class="btable btable-striped">
<tr>
<th style='width: 430px'><%= languageDict.attributes.Title %></th>
<th colspan="7"><%=languageDict.attributes.action %></th>
</tr>
<tr>
<td>
<%= CourseTitle %>
</td>
<td>
<a id="viewCourseButton" role='button' class='btn btn-warning' href='#course/details/<%= id %>/<%= CourseTitle %>'><%=viewCourse%></a>
</td>
<td>
<% if(showCreditButton) { %>
<a role='button' class='btn btn-credit' id= "credit_view" href='#creditsDetails/<%= id %>'><%=App.languageDict.attributes.Credits%></a>
<%}%>
</td>
<td>
<%viewProgress%>
<%if(viewProgress == 1){%>
<a id="progressCourseButton" role='button' class='btn btn-info' href='#course/report/<%= _id %>/<%= CourseTitle %>'>
<i class="icon-signal icon-white"></i><%=progress%>
</a>
<%}%>
</td>
</tr>
</table>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line

</script>

<script type="text/html" id="template-courseLevelsTable">
<h3 class="bigheader">
<div style="width:95%"><%= languageDict.attributes.Step%>-<%= step%>: <b>&nbsp;&nbsp; <%=title%></b>