How to Create a Learning Management Plugin in WordPress to Manage Courses [LMS]

I’m looking to build a small learning management plugin to manage courses

The first feature that i want to implement is the front-end course builder Meaning that after designing a course page (using it as a default canvas)

enter image description here

This course builder will do the following:

[Button] -> Create new Course – Add Course title: – Add Course Picture: – Add Sections: – Add Lectures: [Button] -> Publish Course

After hitting ‘Publish’ a course page will be created automatically and added to the database

Any help, tips, assistannce will be greatly appreciated.. I’m stuck for several weeks now

How to create custom search form function including post “tags”

This is my HTML:

<input type="text" class="keyword" name="keyword" id="keyword" placeholder="Search video..."> <button id="search-keyword">Search</button> 

When I click the “Search” button start a script like this:

if($  ('.current').hasClass('search-select')){     action = 'my_create_posts_search'; //php function to do      ab = document.getElementsByClassName('keyword')[0].value; //get the value of input } 

Then an Ajax function starts:

 $  .ajax({     type: "POST",     url: ajax_params.ajax_url, //wordpress ajax     data: {      'action': action, //php function to do        'ab': ab, //value of input }, 

Then the action start and the code excecuted is this:

function my_create_posts_search($  name) {  //Pagination for posts  $  response = '';  $  paged = (int) (!is_null($  _POST['clicked_times'])) ? $  _POST['clicked_times'] : 0;   $  postsPerPage = 18;  $  postOffset = $  paged * $  postsPerPage;   $  args = array(     'posts_per_page'  => $  postsPerPage, //pagination     'offset'          => $  postOffset, //pagination     'category'        => 42, //post category     's'               => $  name, //value of input     'orderby'         => 'date',     'order'           => 'DESC',  );  ... other things... } 

Everything works perfectly expcet when I would like to search by Post Tags.

How can I implement this feature?

I hope my code will help you. Thanks!

Create flowsheet-like graph

I’d like to create a graph that resembles a flowsheet in process simulation applications. A concrete example would be this graph:

enter image description here

I was able to recreate it by manually specifying the vertex coordinates:

streams = {"feed" -> <|{"From" -> "RefineryFeed", "To" -> "Mix"},       "Class" -> "Product"|>,    "mixedFeed" -> <|{"From" -> "Mix", "To" -> "Flash"},       "Class" -> "Product"|>,    "flashVapour" -> <|{"From" -> "Flash", "To" -> "RefineryProduct"},       "Class" -> "Product"|>,    "flashLiquid" -> <|{"From" -> "Flash", "To" -> "Split"},       "Class" -> "Product"|>,    "splitProduct" -> <|{"From" -> "Split", "To" -> "RefineryProduct"},       "Class" -> "Product"|>,    "splitRecycle" -> <|{"From" -> "Split", "To" -> "Pump"},       "Class" -> "Product"|>,    "pumpRecycle" -> <|{"From" -> "Pump", "To" -> "Recycle"},       "Class" -> "Product"|>,    "recycleFeed" -> <|{"From" -> "Recycle", "To" -> "Mix"},       "Class" -> "Product"|>    };  flowsheetGraph =   Graph[Labeled[streams[[#, 2]]["From"] -> streams[[#, 2]]["To"],       streams[[#, 1]]] & /@ Range [Length[streams]],    VertexShapeFunction -> "Square", VertexSize -> Large,    VertexLabels -> Placed["Name", Center],    VertexCoordinates -> {{0, 0}, {1, 0}, {2, 0}, {3, -1}, {3, 0}, {3,       1}, {1, 1}}, DirectedEdges -> True] 

enter image description here

Now I was wondering if there was a way to create a similar graph without manually specifying the coordinates. If I omit the VertexCoordinates Mathematica does a good job at selecting coordinates for the vertices, but it would be great if the appearance would be more “grid-like” like in the graph above.

enter image description here

Using WITH together with CREATE TEMPORARY TABLE AS SELECT … in Postgres?

I would like to create a temporary table using a select statement that uses temporary views specified in a WITH statement (not the WITH statement of CREATE TEMPORARY TABLE).

e.g. something along the lines of

WITH a AS ( SELECT 1 foo, 2 bar  ), b AS ( SELECT 4 bar, 5 baz ) CREATE TEMPORARY TABLE foo AS SELECT * from a JOIN b ON (a.bar=b.bar) 

If I comment out the CREATE TEMPORARY TABLE line, this works. How to create a temporary table using the query result of the SELECT, without rewriting the temporary views into a single query?

Create New Author Page

My site creates only 1 automaticall “profile” page (CPT) for new registered user (default author role for new user) and for each new profile page title is ID. com/profile/ID-1 , ID-2, ID-3 etc. Also my member can create unlimited wp-posts and members posts display under this profile page. Such as you registered site create profile/ID-4 url and this page shows only your posts.

But, when anyone click author name displayed in posts, URL goes to wp author archive author/author_slug.

My question is, in site-wide, all author profile link will go to his/her author profile (CPT) page.

Sorry bad english. Thanks

WordPress Post ID overwritten when I create a new post?

OK, this is very odd and I am totally unsure how to problem-solve this.

I am using WordPress Pods Custom Post Types.

For the last two years it has been working great.

This is the error:

1 > I “Add New” post, and WP as you’d expect, gives it an ID of let’s say 1234.

2 > I then “Add New” for another post and save it as draft, and it OVERWRITES the last ID of 1234 rather than create a new ID.

It feels like there’s strict caching? I’ve deleted cookies, etc etc but still this happens.

I also often get this error:

Sorry, you are not allowed to edit this post.

Any idea what else I can do here?