Saturday, 23 August 2014

Hosting AContent

I have hosted AContent at http://acontent.j.layershift.co.uk/home/index.php
and presently i have linked it to master branch of my github.

Now, whatever changes i will commit on github this will automatically reflect on the website.

Friday, 22 August 2014

Technical Documentation

Technical Documentation:

https://docs.google.com/document/d/1h4A1QpTYb3zq5OBPB5HMXjXP1NSgIuNk5PdEDgUDnUY/edit?usp=sharing

Looking forwards towards continuing to work on AContent !!!

Sunday, 17 August 2014

Debugging

06/08/2014

The major implementation work was finished today. From today onwards I'll start testing the implemented functionalities and remove the existing bugs.

The major issues that I have seen is in the Admin and the Author permissions. Since the admin has sudo permissions to do anything, therefore, it is important to see that the admin is given those permissions.

Difference Engine

04/08/2014


The Difference Engine was imported from DokuWiki and the differences between any two versions can be seen successfully.

There are four types of views possible in difference engine.

Inline view (HTML):-


Tabular view (HTML):-


Inline View (TEXT):-





Tabular View (TEXT):-


These are the four possible views in Difference Engine.

Thursday, 31 July 2014

Versioning

In order to implement versioning the best method would be to implement it again, as it would be quiet difficult to import whole DokuWiki into AContent as a single module. Even simulating DokuWiki externally from AContent was not an easy task and involved a large number of complications.

Therefore, I have decided to implement versioning from scratch and later use the difference engine in DokuWiki for showing the differences or changes in various documents.


02/08/2014

I was able to implement versioning from scratch and used similar functions used by Dokuwiki for maintaining versions of various content pages in AContent.

I have created two folders in the content directory of AContent :- attic and meta

The attic folder contains the older revisions of the document and the document is compressed as a tar file to save space.

The meta folder contains the user information corresponding to each content, such as who created the document, who reverted the document and what the lastest version of the document is.

Sample data of meta file for random content id:-

version_id       user_id   action revision_id
1408297143 2      A
1408297167 2      E
1408297170 2      E
1408297173 2      E
1408297184 2      R   1408297170

"A" tells the revision number and user who first created the document.
"E" tells the new version of the document and the user_id who created it.
"R" tells whether the version was reverted from an older revision and if it is reverted then the revision id from which it was reverted is displayed to the user.


From tomorrow onwards I'll start with the Difference Engine.


Sunday, 20 July 2014

Locking Implementation Refined Ideas

A new database containing the following information would be created in the database:-

(Content_id, User_id, Last login/edit time)

In this the content_id would be the primary key, hence only one entry for each content_id would be possible and necessary. Whenever, a shared content is edited, it's corresponding entry would be added in the database.

1. Suppose User “A” wants to edit a page “p1”, and currently no one hold the lock on “p1”  i.e., there is no entry in the database for page “p1”, then “A” gets the lock for “p1” and a row is inserted in database for “A”.

2. Now if “A” remains inactive for 14 min, then a notification pop up is shown to “A”, warning him that his lock would expire in a minute if he remains inactive and could be given to any other user requesting the lock.

3. If another user “B” asks for lock held by “A”, then we check:-
If (Present_time – Last_edited_time(from DB) by A > 15 min), then{
“B” is given the lock of “p1” and database is updated. Now if “A” tries to edit after he has lost his lock then he would not be able to do so and would be notified that some other user has the lock now and he should request for lock again.
}
else {
“B” would wait for the session of “A” to end.
}

4. If “A” completes the editing and clicks on save button then the row from database corresponding to “A” and “p1” is removed. This is important so that any other user could get the lock even before 15 minutes.

5. If two or more users are waiting for lock held by “A”, then the user who would refresh first or send the request for the lock first after expiration of time would receive the lock. In this way no priority is given to user who comes first and demands for the lock, but is given to the user who demands for the lock once the lock is released.

Tab Positioning in Shared Content

There are two different types of tabs for Shared Content made:-

1. Shared Content With Me :- This tab is available along with Home, Profile and Manage User Groups Tab. This is basically to view the pages which are shared by various other authors with the author currently logged in. This position for tab is selected because it is a general tab and has no link to any course authored by the currently logged in user.

2. Shared Content :- This tab is available when the user clicks on a particular course/lesson, along with various other tabs like Manage Tests. This tab is to share the contents of some particular course. In this tab the whole structure of the course is visible for easy sharing of contents with users. It further has two sub-tabs a) first give editing right to other users b) second to revoke editing rights from users.

The author can also share the hidden content with other users. In this case, a warning will be shown to the user that the content was hidden content and he is trying to share hidden content. In this way two authors can collaboratively edit the content and when the content gains structure it can be made visible to the other users.

The author can also share the content with any type of user (author/non-author/enabled/disabled). Hence the editing rights can also be extended to non-authors.

The Non-authors can then view the shared content with them, but to be able to edit the shared content they need to convert themselves to authors by going to their profile and making the required changes.
This ensures the current work flow that only authors can edit the content and hence make the things possible easily.