EduRev
- Home
- Explore Courses
- Signup
- Pricing Plans
- EduRev Infinity
"; html += "
Change " + classTitle + ""; 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-header").addClass("chng_cls_pp"); $(".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 isSchoolClassHidden = ""; try { isSchoolClassHidden = $("#isSchoolClassHidden").val(); } catch (e) { } var classTitle = "Exam"; if (isSchoolClassHidden != undefined && isSchoolClassHidden != null && isSchoolClassHidden != "" && (isSchoolClassHidden.toLocaleLowerCase() == "true" || isSchoolClassHidden == true)) { classTitle = "Class"; } var isonecat = 0; //if (data.length == 1) { // isonecat = 1; //} var html = "
"; html += "
Select the " + classTitle.toLowerCase() + " you want to leave
"; for (var i = 0; i < data.length; i++) { var checkselectedclass = ""; if (isonecat == 1) { html += "
" + data[i]["name"] + ""; } else { html += "
" + data[i]["name"] + ""; } // html += "
"; } html += "
"; if (isonecat == 1) { if (callfor != undefined && callfor != null && callfor != "" && callfor == "r") { html += "
Proceed
"; } else { html += "
Next Step
"; } } else { if (callfor != undefined && callfor != null && callfor != "" && callfor == "r") { html += "
Proceed
"; html += "
"; } else { html += "
Next Step
"; html += "
"; } } 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-header").addClass("chng_cls_pp"); $(".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(); try { DeleteCookie("starblockfirst"); } catch (e) { } 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'); debugger; loadExploreData(""); } catch (e) { } }); _HideLoader(); } } else { _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/v309/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/v309/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/v309/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-header").addClass("chng_cls_pp"); $(".ER_Model").modal("show"); $("#refreshCoursesList").val("1"); $(".wid_hdr h1 img").css("margin-left", "25px"); try { //getCatList(4, 'catList', 'direct'); debugger; loadExploreData(""); } catch (e) { } }); } $('#ER_Model').on('hidden.bs.modal', function () { try { $(".ER_Model .modal-header").removeClass("chng_cls_pp"); } catch (e) { } }); // PracticeandReviseTestList_pp = function () { try { closeNav(); } catch (e) { } var ht_cr = $(".PracticeandReviseTestData_courses").html().trim("\n"); if (ht_cr == "") { purchasedCourses('practiceandrevise'); } $("#PracticeandReviseTest").modal("show"); var headinghtml = ""; headinghtml += ""; headinghtml += ""; headinghtml += ""; headinghtml += "Practice & Revise"; $(".ER_Model_Header").html(headinghtml); $(".modal-header").show(); $(".PracticeandRevisetst_bck").hide(); $(".PracticeandReviseTestData_courses").show(); $(".PracticeandRevisecrshdr").show(); $(".PracticeandReviseTestData").hide(); $(".PracticeandReviseTestData").scrollTop(0); } PracticeandReviseTestBak = function () { $(".PracticeandReviseTestData_courses").show(); $(".PracticeandRevisecrshdr").show(); $(".PracticeandReviseTestData").hide(); $(".PracticeandRevisetst_bck").hide(); $(".headpractext").html("Practice & Revise"); } PractiseandReviseList = function (courseId) { _ShowLoader(); $.ajax({ type: "POST", data: "{courseId:" + courseId + "}", url: "/Quiz/ListofChapterForPractice", contentType: "application/json;charset=utf-8", dataType: "text", success: function (data) { data = JSON.parse(data); console.log(data); if (data.courselist != "" && data.courselist != null && data.courselist != undefined && data.courselist.length > 0) { var row = ""; for (var j = 0; j < data.courselist.length; j++) { row += "
"; row += "
"; row += "
"; row += " "; row += " "; row += data.courselist[j].title; row += " "; row += " "; row += parseInt(parseInt(data.courselist[j].testCount) * 15) + "+ Practice Questions"; row += " "; row += " | "; row += ""; row += " "; row += "Practice"; row += " | "; row += "
"; row += "
"; row += "
"; } $(".PracticeandReviseTestData").html(row); } else { $(".PracticeandReviseTestData").html("
No test available
"); } if (data.coursetitle != "" && data.coursetitle != null && data.coursetitle != undefined) { $(".headpractext").html(data.coursetitle); } else { $(".headpractext").html("Practice & Revise"); } $(".PracticeandReviseTestData_courses").hide(); $(".PracticeandRevisecrshdr").hide(); $(".PracticeandReviseTestData").show(); //$("#unattemptedTest").modal("show") $(".PracticeandReviseTestData").scrollTop(0); $(".PracticeandRevisetst_bck").show(); _HideLoader(); }, error: function (a, b, c) { _HideLoader(); console.log(a + "," + b + "," + c); } }); }; // reviceandpractisepopup = function (courseid, chapterid, IsBaseCoursePurchasedCheck,showloader) { // try { if (showloader != undefined && showloader != null && showloader != "" && showloader == "1") { _ShowLoader(); } $("#PracticeandReviseTest").modal("hide"); } catch (e) { } var pracrevicetest = "0"; var remainingtest = "0"; var urltomove = "/subscription?course=" + courseid + "&courseId=" + courseid; var bundlehiddenid = $("#bundlehiddenid").val(); if (bundlehiddenid != undefined && bundlehiddenid != null && bundlehiddenid != "") { urltomove = "/subscription?bundleId=" + bundlehiddenid + "&course=" + courseid + "&courseId=" + courseid; } if (IsBaseCoursePurchasedCheck == "True" || IsBaseCoursePurchasedCheck == "true" || IsBaseCoursePurchasedCheck == true || IsBaseCoursePurchasedCheck == "1") { urltomove = "/course/quiz/attempt/-1_test/1?pracrevise=1&courseId=" + courseid + "&topicId=" + chapterid; } else { pracrevicetest = getCookiejavascript("pracrevicetest"); if (pracrevicetest == undefined || pracrevicetest == null || pracrevicetest == "") { pracrevicetest = "0"; } if (parseInt(pracrevicetest) < 5) { urltomove = "/course/quiz/attempt/-1_test/1?pracrevise=1&courseId=" + courseid + "&topicId=" + chapterid; } remainingtest = parseInt(5) - parseInt(pracrevicetest); if (parseInt(remainingtest) < 0) { remainingtest = 0; } } //var headinghtml = ""; //headinghtml += "
"; //if (IsBaseCoursePurchasedCheck == "True" || IsBaseCoursePurchasedCheck == "true" || IsBaseCoursePurchasedCheck == true || IsBaseCoursePurchasedCheck == "1") { //} //else { // headinghtml += "
" + remainingtest + " Free attempts left
"; //} //headinghtml += "
How Practice Question Bank works?
"; //headinghtml += "
"; var html = ""; html += "
"; html += "
"; if (IsBaseCoursePurchasedCheck == "True" || IsBaseCoursePurchasedCheck == "true" || IsBaseCoursePurchasedCheck == true || IsBaseCoursePurchasedCheck == "1") { } else { html += "
" + remainingtest + " Free attempts left
"; } html += "
How Practice & Revise works?
"; html += "
"; html += "
"; html += "
"; // desc html += "
"; html += "
| Practice & revise questions from all tests of this topic. |
"; html += "
| Learn at your pace without any timer or test submission. |
"; html += "
| Some questions might repeat from the tests you have already given of this topic. |
"; html += "
"; html += "
"; // buttons html += "
"; html += "
Start Practice
"; html += "
"; html += "
"; html += "
"; $(".ER_Model_Header").html(""); $(".modal-header").hide(); $(".ER_Model_Header").css("padding-bottom", "0px"); $("#ER_Model .modal-content").css("max-width", "420px"); $("#ER_Model .modal-content").css("margin", "0 auto"); $("#ER_Model .modal-content").css("padding-top", "0px"); $(".ER_Model_Content").html(html); $(".ER_Model_Footer").hide(); $(".ER_Model").modal({ animation: true, /* backdrop: 'static',*/ /*keyboard: false,*/ show: true }).addClass("mdl_pp_cmn"); setTimeout(function () { $(".ER_Model_Header").html(""); $(".modal-header").hide(); $(".ER_Model_Header").css("padding-bottom", "0px"); $("#ER_Model .modal-content").css("max-width", "420px"); $("#ER_Model .modal-content").css("margin", "0 auto"); $("#ER_Model .modal-content").css("padding-top", "0px"); $(".ER_Model_Footer").hide(); _HideLoader(); }, 500); } gototestattemptpage = function (url) { _ShowLoader(); $(".ER_Model").modal("hide"); window.location.href = url; } UnAttemptedTestList_pp = function () { $(".unattdtst_bck").hide(); try { closeNav(); } catch (e) { } var ht_cr = $(".unattepmtedTestData_courses").html().trim("\n"); if (ht_cr == "") { purchasedCourses('unattempted'); } $("#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]["title"] + "\ \ "+ 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 += " | |
"; // row += "
\ //
\ //
\ //
\ // \ // \ // \ //
\ //
\ //
\ //
\ // " + data[j]["testList"][i]["title"] + "\ //
\ // "+ 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 (callingfrom) { 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) { var enrolledCoursesHTMLforunattempted = ""; var enrolledCoursesHTMLforpractice = ""; 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 = 12; 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 = ""; enrolledCoursesHTMLforunattempted = "
" + DataJson.purchasedCourses[i]["Title"] + " | "; mobileViewHtml += ""; mobileViewHtml += ""; mobileViewHtml += " | |
" + DataJson.purchasedCourses[i]["Title"] + " | ||
" + DataJson.purchasedCourses[i]["Title"] + " |
"; } $("#hiddenuserhascoursewithtest").val(hasCourseWithQuiz); if (hasCourseWithQuiz > 0) { $(".unattepmtedTestData_courses").html(enrolledCoursesHTMLforunattempted); $(".unattepmtedTestData_courses").show(); $(".unatdtstcrshdr").show(); $(".unattdtst_bck").hide(); $(".PracticeandReviseTestData_courses").html(enrolledCoursesHTMLforpractice); $(".PracticeandReviseTestData_courses").show(); $(".PracticeandRevisecrshdr").show(); $(".PracticeandRevisetst_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 (callingfrom != null && callingfrom != undefined && callingfrom != "" && (callingfrom == 'unattempted' || callingfrom == 'practiceandrevise')) { } 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); setvaluesfordata(); } 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 + "')"); } DeleteCookie = function (name) { try { setCookiejavascript(name, "", -1, 1); } catch (e) { } try { document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; } catch (e) { } };