[]
“; html += “Add ” + classTitle + ““; if (data.length > 1) { html += “Remove ” + classTitle + ““; } html += “”; $(“.ER_Model_Header”).html(“
Change/Add ” + classTitle + “
“); $(“.ER_Model_Content”).html(html); $(“.ER_Model_Footer”).html(“”); $(“.ER_Model_Footer”).hide(); $(“.ER_Model”).modal({ animation: true, backdrop: ‘static’, keyboard: false, show: true }); } }, error: function (a, b, c) { console.log(a + “,” + b + “,” + c); _HideLoader(); } }) }; // getcatforchangeclass = function (callfor) { _ShowLoader(); $.ajax({ type: “POST”, data: “{}”, url: “/UserData/GetUserCategoryList”, contentType: “application/json;charset=utf-8”, dataType: “json”, success: function (data) { console.log(data); if (data.length > 0) { try { closeNav(); } catch (e) { } var html = “”; html += “”; html += “”;
var isSchoolClassHidden = “”;
try {
isSchoolClassHidden = $(“#isSchoolClassHidden”).val();
}
catch (e) { }
var classTitle = “Exam”;
if (isSchoolClassHidden != undefined && isSchoolClassHidden != null && isSchoolClassHidden != “” && (isSchoolClassHidden.toLocaleLowerCase() == “true” || isSchoolClassHidden == true)) { classTitle = “Class”; }
if (callfor != undefined && callfor != null && callfor != “” && callfor == “r”) {
$(“.ER_Model_Header”).html(“
Remove ” + classTitle + “
“); } else { $(“.ER_Model_Header”).html(“
Change ” + classTitle + “
“);
}
$(“.ER_Model_Content”).html(html);
$(“.ER_Model_Footer”).html(“”);
$(“.ER_Model_Footer”).hide();
$(“.ER_Model”).modal({
animation: true,
backdrop: ‘static’,
keyboard: false,
show: true
});
}
else {
}
_HideLoader();
},
error: function (a, b, c) {
console.log(a + “,” + b + “,” + c);
_HideLoader();
}
});
//
};
removeoldclass = function (callfor) {
_ShowLoader();
var catids = “”;
var totalcatcount = $(“.changeclasscatdiv”).length;
var selectedcatcount = $(“.changeclasscatdivselected”).length;
$.each($(“.changeclasscatdivselected”), function () {
catids += $(this).attr(“dataid”) + “,”;
});
if (catids != undefined && catids != null && catids != “”) {
$.ajax({
type: “POST”,
data: “{catId: ‘” + catids + “‘}”,
url: “/UserData/RemoveEnrolledCategoryCourses”,
contentType: “application/json;charset=utf-8”,
dataType: “json”,
success: function (data) {
//console.log(data);
if (data.Status == 200) {
_ShowLoader();
if (callfor != undefined && callfor != null && callfor != “” && callfor == “r” && selectedcatcount < totalcatcount) {
_ShowLoader();
window.location.href = "/home";
}
else {
$(".ER_Model_Content").html("");
var _UserCourseCategoryWidget = '/Course/UserCourseCategoryWidget';
$.get(_UserCourseCategoryWidget, function (data) {
var widgetHTML = "
” + data + “
“; $(“.ER_Model_Content”).html(widgetHTML); var OldHeader = $(“.wid_hdr”).html(); var newHeader = “”; //newHeader += ““; //newHeader += “
Welcome to EduRev
“; newHeader += “”;
//newHeader += “”;
$(“.wid_hdr”).html(newHeader);
$(“.ER_Model_Content”).css(“padding”, “0px”);
$(“.ER_Model .modal-content”).css(“margin-top”, “0px”);
$(“.ER_Model .modal-dialog”).css(“margin-top”, “10px”);
$(“.ER_Model .modal-header”).hide();
$(“.ER_Model .modal-footer”).hide();
$(“.ER_Model”).modal(“show”);
$(“#refreshCoursesList”).val(“1”);
$(“.wid_hdr h1 img”).css(“margin-left”, “25px”);
try {
//getCatList(4, ‘catList’, ‘direct’);
loadExploreData(“”);
}
catch (e) {
}
});
}
}
_HideLoader();
},
error: function (a, b, c) {
console.log(a + “,” + b + “,” + c);
_HideLoader();
}
});
}
else {
_HideLoader();
alert(“Please select any interest”);
}
//
}
selectcatForRemove = function (catid, callfor) {
if (callfor != undefined && callfor != null && callfor != “” && callfor == “r”) {
var totalcatcount = $(“.changeclasscatdiv”).length;
var selectedcatcount = $(“.changeclasscatdivselected”).length;
//if (selectedcatcount < parseInt(totalcatcount - 1)) {
$(".changeclasscatdiv" + catid).addClass("changeclasscatdivselected");
$(".changeclasscata" + catid).attr("onclick", "unselectcatForRemove('" + catid + "','" + callfor + "')");
$(".changeclasscaticonsimg" + catid).attr("src", 'https://edurev.gumlet.io/cdn_assets/v248/assets/img/home/selectionradiored.svg');
$(".removecaterrormsg").hide();
$(".divforRemoveClassbtn").show();
//}
//else {
// if (totalcatcount == 1) {
// $(".divforRemoveClassbtn").hide();
// $(".removecaterrormsg").show();
// $(".removecaterrormsg").html("You must have at least one learning goal. You can't remove all categories Cancel“); // } // else { // $(“.removecaterrormsg”).show(); // $(“.removecaterrormsg”).html(“You must have at least one learning goal. You can’t remove all categories”);
// }
//}
}
else {
$(“.changeclasscatdiv” + catid).addClass(“changeclasscatdivselected”);
$(“.changeclasscata” + catid).attr(“onclick”, “unselectcatForRemove(‘” + catid + “‘,'” + callfor + “‘)”);
$(“.changeclasscaticonsimg” + catid).attr(“src”, ‘https://edurev.gumlet.io/cdn_assets/v248/assets/img/home/selectionradiored.svg’);
$(“.divforRemoveClassbtn”).show();
}
}
unselectcatForRemove = function (catid, callfor) {
$(“.changeclasscatdiv” + catid).removeClass(“changeclasscatdivselected”);
$(“.changeclasscata” + catid).attr(“onclick”, “selectcatForRemove(‘” + catid + “‘,'” + callfor + “‘)”);
$(“.changeclasscaticonsimg” + catid).attr(“src”, ‘https://edurev.gumlet.io/cdn_assets/v248/assets/img/home/selectionradio.svg’);
if (callfor != undefined && callfor != null && callfor != “” && callfor == “r”) {
if ($(“.changeclasscatdivselected”).length == 0) {
$(“.divforRemoveClassbtn”).hide();
}
else {
$(“.removecaterrormsg”).hide();
$(“.divforRemoveClassbtn”).show();
}
}
else {
if ($(“.changeclasscatdivselected”).length == 0) {
$(“.divforRemoveClassbtn”).hide();
}
}
}
openDirectCatePopup = function () {
$(“.ER_Model_Content”).html(“”);
var _UserCourseCategoryWidget = ‘/Course/UserCourseCategoryWidget’;
$.get(_UserCourseCategoryWidget, function (data) {
var widgetHTML = “
” + data + “
“; $(“.ER_Model_Content”).html(widgetHTML); var OldHeader = $(“.wid_hdr”).html(); var newHeader = “”; //newHeader += ““; //newHeader += “
Welcome to EduRev
“; var cntryhtml = “”; newHeader += “” + cntryhtml+””;
//newHeader += “”;
$(“.wid_hdr”).html(newHeader);
$(“.ER_Model_Content”).css(“padding”, “0px”);
$(“.ER_Model .modal-content”).css(“margin-top”, “0px”);
$(“.ER_Model .modal-dialog”).css(“margin-top”, “10px”);
$(“.ER_Model .modal-header”).hide();
$(“.ER_Model .modal-footer”).hide();
$(“.ER_Model”).modal(“show”);
$(“#refreshCoursesList”).val(“1”);
$(“.wid_hdr h1 img”).css(“margin-left”, “25px”);
try {
//getCatList(4, ‘catList’, ‘direct’);
loadExploreData(“”);
}
catch (e) {
}
});
}
UnAttemptedTestList_pp = function () {
try {
closeNav();
}
catch (e) {
}
var ht_cr = $(“.unattepmtedTestData_courses”).html().trim(“n”);
if (ht_cr == “”) {
purchasedCourses(true);
}
$(“#unattemptedTest”).modal(“show”);
$(“.unattepmtedTestData_courses”).show();
$(“.unatdtstcrshdr”).show();
$(“.unattepmtedTestData”).hide();
$(“.unattepmtedTestData_courses”).scrollTop(0);
}
unattemptedTestBak = function () {
$(“.unattepmtedTestData_courses”).show();
$(“.unatdtstcrshdr”).show();
$(“.unattepmtedTestData”).hide();
$(“.unattdtst_bck”).hide();
}
UnAttemptedTestList = function (courseId) {
_ShowLoader();
$.ajax({
type: “POST”,
data: “{courseId:” + courseId + “}”,
url: “/Quiz/UnAttemptedTestList”,
contentType: “application/json;charset=utf-8”,
dataType: “text”,
success: function (data) {
data = JSON.parse(data);
if (data != “” && data != null && data != undefined && data.length > 0) {
var row = “”;
for (var j = 0; j < data.length; j++) {
row += ""; row += "
” + data[j][“ParentSubcourseTitle”] + “
“;
for (var i = 0; i < data[j]["testList"].length; i++) {
row += "
“+ data[j][“testList”][i][“totalQues”] + ” Ques | ” + data[j][“testList”][i][“time”] + ” Mins”;
if (data[j][“testList”][i][“isInfinity”] == true && data[j][“testList”][i][“isPurchased”] == false) {
row += ” | Unlock”;
}
row += “
“; } row += “”; } $(“.unattepmtedTestData”).html(row); } else { $(“.unattepmtedTestData”).html(“
No unattempted test available
“);
}
$(“.unattepmtedTestData_courses”).hide();
$(“.unatdtstcrshdr”).hide();
$(“.unattepmtedTestData”).show();
//$(“#unattemptedTest”).modal(“show”)
$(“.unattepmtedTestData”).scrollTop(0);
$(“.unattdtst_bck”).show();
_HideLoader();
},
error: function (a, b, c) {
_HideLoader();
console.log(a + “,” + b + “,” + c);
}
});
};
var moreEnrolledCourses = “View All”;
purchasedCourses = function (onlyunattempted) {
var uid = $(“#uid”).val();
if (uid != “-1”) {
$.ajax({
type: “POST”,
url: “/Course/purchasedCourses”,
contentType: “application/json;charset=utf-8”,
data: “{UserId: ”,NeedCourseProgress:’1′}”,
dataType: “json”,
async: true,
success: function (data) {
console.log(data);
var enrolledCoursesHTML = “”;
if (data != undefined && data != null && data != “”) {
var row = “”;
var mobileViewHtml = “”;
var mobileViewHeaderHtml = “”;
var filterhtml = “”;
var headerText = “”;
var DataJson = data;
var count = 0;
var ShowLength = DataJson.purchasedCourses.length;
var TotalLength = ShowLength;
var show_course_block = “”;
var maxcourseshow = 8;
var showMoreCount = parseInt(parseInt(TotalLength) – parseInt(maxcourseshow));
var shmrimgarr = ““; var showMoreTxt = “”; if (showMoreCount == 1) { showMoreTxt = “View ” + showMoreCount + ” more course”; } else { showMoreTxt = “View ” + showMoreCount + ” more courses”; } var showMoreHTML = ““; //var showMoreHTMLMob = ““; enrolledCoursesHTML = “
” + DataJson.purchasedCourses[i][“Title”] + “ |
“; mobileViewHtml += ““; mobileViewHtml += “ |
|
” + DataJson.purchasedCourses[i][“Title”] + “ |
“;
if (ShowLength > 0) {
mobileViewHtml += “”; } $(“#hiddenuserhascoursewithtest”).val(hasCourseWithQuiz); if (hasCourseWithQuiz > 0) { $(“.unattepmtedTestData_courses”).html(enrolledCoursesHTML); $(“.unattepmtedTestData_courses”).show(); $(“.unatdtstcrshdr”).show(); $(“.unattdtst_bck”).hide(); } else { $(“.otr_opn_unatdtst”).hide(); $(“.otr_opn_unatdtst_a”).hide(); $(“.unatdtstcrshdr”).html(“”); $(“.unattepmtedTestData_courses”).html(“
No tests available in the enrolled courses
“); $(“.unattepmtedTestData_courses”).show(); //$(“.unatdtstcrshdr”).show(); //$(“.unattdtst_bck”).hide(); } $(“.unattepmtedTestData”).hide(); row = “
” + row + “
“; if (count > parseInt(maxcourseshow)) { var showMoreCount = parseInt(parseInt(TotalLength) – parseInt(maxcourseshow)); var shmrimgarr = ““;
var showMoreTxt = “”;
if (showMoreCount == 1) {
showMoreTxt = “View ” + showMoreCount + ” more course”;
}
else {
showMoreTxt = “View ” + showMoreCount + ” more courses”;
}
if ($(“#refreshCoursesList”).val() != undefined && $(“#refreshCoursesList”).val() != null && $(“#refreshCoursesList”).val() != “” && ($(“#refreshCoursesList”).val() == “1” || $(“#refreshCoursesList”).val() == 1)) {
var sh_mr = “
“; moreEnrolledCourses = “View ” + parseInt(parseInt(TotalLength) – parseInt(maxcourseshow)) + ” more courses” + shmrimgarr; row = sh_mr + row; } else { $(“.mycourses_showmore”).html(showMoreHTML); //$(“.mycourses_showmore_mob”).html(showMoreHTMLMob); //row = row + showMoreHTML; //row += ““;
moreEnrolledCourses = “View ” + parseInt(parseInt(TotalLength) – parseInt(maxcourseshow)) + ” more courses” + shmrimgarr;
}
}
if (onlyunattempted != null && onlyunattempted != undefined && onlyunattempted != “” && onlyunattempted == true) { }
else {
if (row.length > 0) {
$(“.mycourses”).show();
$(“.mycourses”).css(“display”, “inline-block”);
$(“.ed_innerBox_courses”).css(“display”, “inline-block”);
$(“.ed_innerBox_courses”).css(“width”, “100%”);
row = headerText + filterhtml + row;
mobileViewHtml = mobileViewHeaderHtml + filterhtml + mobileViewHtml;
//$(“.mycoursesmob”).html(mobileViewHtml);
var screenWidth = screen.width;
if ($(“#refreshCoursesList”).val() != undefined && $(“#refreshCoursesList”).val() != null && $(“#refreshCoursesList”).val() != “” && ($(“#refreshCoursesList”).val() == “1” || $(“#refreshCoursesList”).val() == 1)) {
if (screenWidth != null && screenWidth != undefined && screenWidth < 500) {
$(".mycourses").html(mobileViewHtml);
}
else { $(".mycourses").html(row); }
}
else {
if (screenWidth != null && screenWidth != undefined && screenWidth < 500) {
$(".mycourses").html(mobileViewHtml);
}
else {
$(".mycourses").append(row);
}
}
}
}
//setTimeout(function () {
//$.adaptiveBackground.run({
// exclude: ['rgb(0,0,0)'] // too many black pixels
//});
//}, 5000);
}
else {
$(".otr_opn_unatdtst").hide();
$(".otr_opn_unatdtst_a").hide();
$(".unatdtstcrshdr").html("");
$(".unattepmtedTestData_courses").html("
No tests available in the enrolled courses
“); $(“.unattepmtedTestData_courses”).show(); //$(“.unatdtstcrshdr”).show(); //$(“.unattdtst_bck”).hide(); } }, error: function (a, b, c) { console.log(a + “,” + b + “,” + c); } }); } }; showmorepurchased_courses = function (ctrl, hide_ctrl) { $(ctrl).show(); //$(hide_ctrl).html(“View Less”); //$(hide_ctrl).attr(“onclick”, “showlesspurchased_courses(‘” + ctrl + “‘,'” + hide_ctrl + “‘)”); $(hide_ctrl).html(“View all courses”); $(hide_ctrl).attr(“onclick”, “gotoallcourse();”); } showlesspurchased_courses = function (ctrl, hide_ctrl) { $(ctrl).hide(); $(hide_ctrl).html(moreEnrolledCourses); //$(hide_ctrl).text(“View All”); $(hide_ctrl).attr(“onclick”, “showmorepurchased_courses(‘” + ctrl + “‘,'” + hide_ctrl + “‘)”); }
0) { usr_sb = “1”; } try { firebase_anltcs.logEvent(“sb_” + usr_sb + “_” + txt + “_” + pageName); } catch (e) { } }); } catch (e) { } } ]]>
GIPHY App Key not set. Please check settings