Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #41

Merged
merged 16 commits into from
Oct 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ npm-debug.log

#ignore osx DS_Store file
.DS_Store

.idea/*
315 changes: 0 additions & 315 deletions .idea/workspace.xml

This file was deleted.

21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@ LIFTER LMS

CHANGELOG
=========
v1.4.0 - 2015/10/29
-------------------
+ Feature: Free lessons - demo lessons that can be taken at any time by any user
+ Feature: Guest lessons - demo lessons that can be taken by a non-logged in user
+ Feature: Random quiz question - quiz questions can now be set to be in user set order or random order
+ Updates: Automatically registers appropriate sidebars for Genesis theme
+ Updates: Backend file cleanup
+ Updates: Text cleanup
+ Updates: Adds greater localization support (more strings to translate! yay!)
+ Updates: Cleans up some unneccessary console.log() calls
+ Updates: Removes mass of commented out code (cleaner reading)
+ Updates: 'Next Lesson' button added after successful completion of quiz
+ Updates: 'Next Lesson' button at bottom of lesson properly gets starting lesson of next section at the end of the previous section
+ Updates: 'Previous Lesson' button at bottom of lesson will now properly get last lesson of previous section (if applicable)
+ Updates: Move Registration Form to global templates to allow users to disable registration on login page but use registration form on custom page.
+ BugFixes: WordPress pages are now properly restricted by memberships
+ BugFixes: Fixes bug that caused order screen to act up if user was deleted
+ BugFixes: Resolves nastly little bug that caused syllabus numbers to be out of whack
+ BugFixes: Resolved error with WooCommerce integration where courses would not always register the user
+ BugFixes: Corrected CSS conflict with Bridge theme settings page

v1.3.10 - 2015/10/15
-------------------
+ Updates: Clarifies some prerequisite text
Expand Down
51 changes: 0 additions & 51 deletions _private/js/app/llms-metabox-course-outline.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ LLMS.MB_Course_Outline = {

$('#llms-outline-add').click(function(e) {
e.preventDefault();
console.log('button clicked');
var popover = $('#llms-outline-menu');
if ($(this).hasClass('bt')) {
if($(this).offset().top - $(window).scrollTop() < 200) {
Expand Down Expand Up @@ -199,22 +198,19 @@ LLMS.MB_Course_Outline = {

//section form submit
$( '#llms_create_section' ).on( 'submit', function(e) {
console.log('section form submitted');
e.preventDefault();
var values = {};
$.each($(this).serializeArray(), function (i, field) {
values[field.name] = field.value;
});
if(_this.alreadySubmitted === false) {
console.log('alreadySubmitted is false');
_this.alreadySubmitted = true;
_this.createSection( values );
}
});

//new lesson form submit
$( '#llms_create_lesson' ).on( 'submit', function(e) {
console.log('form submitted');
e.preventDefault();
var values = {};
$.each($(this).serializeArray(), function (i, field) {
Expand All @@ -229,7 +225,6 @@ LLMS.MB_Course_Outline = {

//add existing lesson form submit
$( '#llms_add_existing_lesson' ).on( 'submit', function(e) {
console.log('form submitted');
e.preventDefault();

var values = {};
Expand All @@ -245,7 +240,6 @@ LLMS.MB_Course_Outline = {

//update lesson title
$( '#llms_edit_lesson' ).on( 'submit', function(e) {
console.log('form submitted');
e.preventDefault();

var values = {};
Expand All @@ -259,7 +253,6 @@ LLMS.MB_Course_Outline = {

//update section title
$( '#llms_edit_section' ).on( 'submit', function(e) {
console.log('form submitted');
e.preventDefault();

var values = {};
Expand All @@ -273,7 +266,6 @@ LLMS.MB_Course_Outline = {

//update lesson title
$( '#llms_delete_section' ).on( 'submit', function(e) {
console.log('form submitted');
e.preventDefault();

var values = {};
Expand Down Expand Up @@ -315,12 +307,10 @@ LLMS.MB_Course_Outline = {
sections: section_tree
},
beforeSend: function() {
console.log('hell ya! i just did a before send');
},
success: function(r) {
console.log(r);
if ( r.success === true ) {
console.log('WOOOOOO total success!!!!!');
}
}
});
Expand All @@ -334,13 +324,11 @@ LLMS.MB_Course_Outline = {
lessons: lesson_tree
},
beforeSend: function() {
console.log('hell ya! i just did a before send');
},
success: function(r) {
console.log(r);

if ( r.success === true ) {
console.log('udpate lesson success!');
}
}
});
Expand Down Expand Up @@ -381,24 +369,18 @@ LLMS.MB_Course_Outline = {
},

createSection: function( values ) {

console.log( values.llms_section_name );

console.log('about to do an ajax call');
LLMS.Ajax.call({
data: {
action: 'create_section',
title: values.llms_section_name

},
beforeSend: function() {
console.log('hell ya! i just did a before send');
},
success: function(r) {
console.log(r);

if ( r.success === true ) {
console.log('WOOOOOO total success!!!!!');

$('#llms_course_outline_sort').append(r.data);
$(window).trigger('build');
Expand Down Expand Up @@ -482,7 +464,6 @@ LLMS.MB_Course_Outline = {

//update lesson title
$( '.llms-remove-lesson-link' ).on( 'click', function(e) {
console.log('remove link clicked');
e.preventDefault();

var lesson_id = $(this).parent().parent().parent().find('[name="llms_lesson_id[]"]').val();
Expand All @@ -492,7 +473,6 @@ LLMS.MB_Course_Outline = {
},

createLesson: function( values ) {
console.log('about to do an ajax call');
LLMS.Ajax.call({
data: {
action: 'create_lesson',
Expand All @@ -501,13 +481,11 @@ LLMS.MB_Course_Outline = {
section_id: values.llms_section
},
beforeSend: function() {
console.log('hell ya! i just did a before send');
},
success: function(r) {
console.log(r);

if ( r.success === true ) {
console.log('WOOOOOO total success!!!!!');

//find the correct section and attach lesson
$( '.llms-section' ).each( function() {
Expand Down Expand Up @@ -538,29 +516,23 @@ LLMS.MB_Course_Outline = {

addExistingLesson: function( values ) {

console.log('about to do an ajax call');
LLMS.Ajax.call({
data: {
action: 'add_lesson_to_course',
lesson_id: values.llms_lesson,
section_id: values.llms_section
},
beforeSend: function() {
console.log('hell ya! i just did a before send');
},
success: function(r) {
console.log(r);

if ( r.success === true ) {
console.log('WOOOOOO total success!!!!!');

$( '.llms-section' ).each( function() {

var input_value = $(this).find('[name="llms_section_id[]"]').val();
console.log(input_value);
if ( input_value === values.llms_section ) {
console.log('found one');
console.log($(this));
$(this).find( '#llms_section_tree_' + values.llms_section ).append(r.data);
}

Expand All @@ -585,11 +557,8 @@ LLMS.MB_Course_Outline = {
action: 'get_course_sections',
},
success: function(r) {
console.log('success came back');
console.log(r);

if ( r.success === true ) {
console.log('WOOOOOO total success!!!!!');

$('#llms-section-select').empty();

Expand All @@ -614,11 +583,8 @@ LLMS.MB_Course_Outline = {
section_id: section_id
},
success: function(r) {
console.log('success came back');
console.log(r);

if ( r.success === true ) {
console.log('WOOOOOO section total success!!!!!');

$('#llms-section-edit-name').val(r.data.post.post_title);
$('#llms-section-edit-id').val(r.data.id);
Expand All @@ -635,11 +601,8 @@ console.log(lesson_id);
lesson_id: lesson_id
},
success: function(r) {
console.log('success came back');
console.log(r);

if ( r.success === true ) {
console.log('WOOOOOO section total success!!!!!');

$('#llms-lesson-edit-name').val(r.data.post.post_title);
$('#llms-lesson-edit-excerpt').val(r.data.post.post_excerpt);
Expand All @@ -658,11 +621,8 @@ console.log(lesson_id);
title: values.llms_section_edit_name
},
success: function(r) {
console.log('success came back');
console.log(r);

if ( r.success === true ) {
console.log('WOOOOOO section total success!!!!!');

//find and update section title in tree
//find the correct section and attach lesson
Expand Down Expand Up @@ -700,11 +660,8 @@ console.log(lesson_id);
excerpt: values.llms_lesson_edit_excerpt
},
success: function(r) {
console.log('success came back');
console.log(r);

if ( r.success === true ) {
console.log('WOOOOOO section total success!!!!!');

//find the correct lesson and update the title and description
$( '.llms-lesson' ).each( function() {
Expand Down Expand Up @@ -736,11 +693,8 @@ console.log(lesson_id);
lesson_id: lesson_id,
},
success: function(r) {
console.log('success came back');
console.log(r);

if ( r.success === true ) {
console.log('WOOOOOO section total success!!!!!');

//find the correct lesson and remove it
$( '.llms-lesson' ).each( function() {
Expand All @@ -766,11 +720,8 @@ console.log(lesson_id);
section_id: values.llms_section_delete_id,
},
success: function(r) {
console.log('success came back');
console.log(r);

if ( r.success === true ) {
console.log('WOOOOOO section total success!!!!!');

//find the correct lesson and remove it
$( '.llms-section' ).each( function() {
Expand All @@ -797,8 +748,6 @@ console.log(lesson_id);
action: 'get_lesson_options_for_select',
},
success: function(r) {
console.log('success came back');
console.log(r);

if ( r.success === true ) {
$('#llms-lesson-select').empty();
Expand Down
2 changes: 0 additions & 2 deletions _private/js/llms-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jQuery(document).ready(function($) {


var query_vars = get_query_var();
console.log( query_vars );
if ( ( query_vars.page === 'llms-analytics' && query_vars.tab === 'sales' ) ||
( query_vars.page === 'llms-analytics' && ! ( 'tab' in query_vars ) ) ) {

Expand Down Expand Up @@ -181,7 +180,6 @@ get_query_var = function() {


function drawTable() {
console.log(students_result_large);
var data = new google.visualization.DataTable();
data.addColumn('string', 'Last');
data.addColumn('string', 'First');
Expand Down
2 changes: 0 additions & 2 deletions _private/js/llms-metabox-quiz-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ llms_total_points = function() {
* Generate single choice question template
*/
single_question_template = function (response) {
console.log('single_course_template_called');
var order = (jQuery("#llms-single-options tr").length);
console.log(response);
var questions = response;

jQuery('<tr class="list_item" id="question_' + order + '" data-order="' + order + '" style="display: table-row;"><td class="llms-table-select"> \
Expand Down
2 changes: 0 additions & 2 deletions _private/js/llms-metabox-syllabus.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,12 @@ catch_blanks = function (){
alert( 'Unable to save. Please make sure all of your sections are assigned.' );
}
else {
console.log('catch_blanks update called');
update_syllabus();
}
});
}

catch_duplicates = function(element){
console.log('catch_duplicates update called');
var that = jQuery(this);
var names = [];
var new_value = jQuery(element).val();
Expand Down
6 changes: 3 additions & 3 deletions _private/scss/admin/modules/_mb-tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ul.tabs li.current{
}
}

.tab-content{
.container .tab-content{
display: none;
background: $color-white;
padding: 15px;
Expand Down Expand Up @@ -110,14 +110,14 @@ ul.tabs li.current{

}

}.tab-content.current{
}.container .tab-content.current{
display: inherit;
}
ul.chosen-results li {
border: 0;
}

.tab-content .no-border
.container .tab-content .no-border
{
border-bottom: 0px;
}
10 changes: 9 additions & 1 deletion _private/scss/frontend/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,14 @@
@include absolute(top 15px left 15px);
}

.llms-free-lesson-svg {
@extend .llms-lesson-complete;
fill: currentColor;
width:50px;
height: 50px;
margin-top: -10px;
}

.llms-lesson-title {
padding-right: 60px;
margin: 0 0 .25em 0;
Expand Down Expand Up @@ -511,7 +519,7 @@
margin: 15px 0;
}

.llms-progress .progress-bar {
.llms-progress .llms-progress-bar {
background-color: #f1f2f1;
position: absolute;
height: .4em;
Expand Down
6 changes: 6 additions & 0 deletions _private/svg/llms-icon-free.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading