 * @uses parseIni() <-- note for phpdoc, you can use @uses function() notation! great for deprecated functions and functions that are wrappers for functions with different args, etc. Also use the @deprecated keyword on some of those.


MEETING NOTES:

Need to convert api.php, archive.php and index.php, blogEntry.class and anything else over to use the new uniquehash as the blog entry identifier rather than blogid/postid combination.

EDIT: Did I include the bit about messaging? If a student is moderated and they change their publish state they should be prompted to enter a message as to what they are changing the publish state for (teacher review, show the class because it's done, etc) and then a moodle message is generated to the teacher.

New course formatting - tabbed interface which has "Course", "Blog", "etc". (Done)
In the blog tab of course use table class to place User picture/name/last blog entry mod date/latest blog entries (see more link) sorted by default by most recent entry. Need "sort by" in this section.

User profile tabs - add a new tab "My Blog" (if you come to the user profile from a course you see course posts, from site you see site posts - though a drop down selection would be nice)

Categories should have the same tinyurl hash as a unique id for backup and restore. (similar to the way that the quiz module currently handles quiz questions. eg?  www.mysite.com.63AB6VD. I'm thinking md5($ownerid.$CFG->wwwroot.$categoryid))

Grading feature will have to be available early on. Maybe add a third table for blog grades/courseid. The teacher viewing the course entries would have the ability to set the grades for those entries. Teacher would set the scales for their course. Note: Grades in most places in moodle are done using an integer, if negative then refers to scale id.

Anonymous comments are not to be allowed at all. remove the ability for guest users to post comments to blog entries entirely. Remove comments on posts entirely. Instead of comments the options should be to "Send a private message" or blog a reference ("blog this!"), or add a forum post referencing the entry.
no anonymous comments, trackback and pingback optional, little finger with string tied icon to "blog this post", internal trackback style.
Trackback/pingback from remote sites should not be allowed at all I guess (even on publicly published entries) since they're a form of anonymous comment. 
Trackbacks should not use blog id/post id - they should use a unique field like quiz does with a "tinyurl" or random number/hash which will better allow backup and restore.

Default blog template 'moodle' (for layout) needs to look exactly like forum posts, including extra space under user picture. Modify 'moodle' template!

In the People block perhaps add a "This user's blog". List all of the class faces with their most recent blog entries, sorted by most recent entries.

"everything I have ever said to this person" would be a useful bit of information.

Post table:
  - id
  - author (userid)
  - reader (userid) 
  - courseid
  - moduleid
  - coursemoduleid
  - groupid
  - subject (text)
  - summary (text)
  - content (text)
  - uniquehash  (similar to the way that the quiz module currently handles quiz questions. eg?  www.mysite.com.63AB6VD)
  check to see if the int id for blog api will accepts an md5(string) value. use marsedit and hack api.php to test. (-UPDATE- Looks good! Blogger api uses string values for blogid and postid)

 post->id == blog_entries->id
 post->author == blog_entries->userid
 post->reader == ?
 post->courseid == blog_entries->courseid
 post->moduleid == ?
 post->coursemoduleid == ?
 post->groupid ==== blog_entries->groupid (unused by blog so far)
 post->subject == blog_entries->title
 post->summary == blog_entries->body
 post->content == blog_entries->extendedbody
 post->uniquehash  == md5($post->author.$CFG->wwwroot.$post->id) (fair?)
(similar to the way that the quiz module currently handles quiz questions. eg?  www.mysite.com.63AB6VD)


New course formatting - tabbed interface which has "Course", "Blog", "etc". (Done)
no comments, remove comments from blog entries. (Done)
Remove the use of blogid completely. The blogid IS the userid - just refer the the moodle userid. 1 user == 1 blog, period. - DONE (api.php still uses 'blogid' in a few places internally)
For blog entries change the publish to text of No one (draft) to 'publish to: "just for myself"' - DONE
Remove class.BlogServer.php file completely. - DONE
By removing blog_list and blog_acl we now have to store user preferences for their blog title and tagline, useextendedbody as well as potentially theme choice. It appears typeid was never used. - DONE
The blog_acl table and all references to it can be completly removed. we have wikis for shared documents and other tools. - DONE
RSS lib has gotten some work recently. Moodle still uses RSS2 only, no selection, so remove rss 0.9 and Atom options entirely. - DONE
From Daryl: Remove all search references. If forum uses the POST table in the future then searching forum vs. blog entries becomes irrelevent. - DONE


NOTE: blog preferences have (finally) been moved to user preferences
set_user_preference($name, $value, $otheruser=NULL);
get_user_preferences($name=NULL, $default=NULL, $userid=NULL);
preference keys for blog:
blogtitle
blogtagline
bloguseextendedbody
blogtheme
bloglastmodified


__________
REGULAR TODO:

                        MOODLE BLOG TODO
=================================================
NEEDS TESTING
 (NOTE: If you decide to test these items please
send your detailed observations to dhawes@mac.com
so they can either be cleared out or added back
to active bug tracking. Thanks!)
=================================================

----- New blog moderation/permissions model added -----

The default is current permission model
Current permission model can be defined as
    1) All users have the same publish abilities - no moderation, no restrictions
    2) When posting an entry users can publish as a draft, to teachers in a given course, to all users in a given course, to all site members or to the world.

I have now added an admin toggle to enable/disable blog moderation.
Blog moderation is now defined as
    1) Admin users have current permission model
    2) Teachers posting an entry associated with a course that they teach in can publish to any option.
    3) all other posts must be associated with a course! When moderation is on there are no "personal" blog entries.
    4) all other posts are sent to draft by default. student users can publish to teacher only (or draft of course). 
    5) Teachers will see posts "published to teacher" by students in their class (later perhaps also notified by moodle message - right now they will see the entries on the blog index page only)
    6) Only a teacher can promote an entry from draft/teacher to class view, site view, or world view
    7) Once promoted/published the student can no longer edit that entry. To edit the teacher will have to first demote the entry back to draft.
    8 ) Batch publishing now available to all users on index page - Teachers' interface  has a "publish all" option as well as a per message publish option

    
=================================================
ACTIVE WORK / TO BE COMPLETED
   (bug fixes and other things targeted for first release)
=================================================

�rss_client - during upgrade check for fopen() (or whatever is required) and disable the block if it cannot function on the server? How to properly introspect this functionality?

� Elimiate admin.php file - move one remaining function into category block

� Calendar Block Bug: Cal is showing link to dates with blog entries which are not found in the current blog! It should only show links to dates that have entries which the user can see given their blogFilter constraints. (Odd - in testing on my local site I cannot reproduce this error).

� Martin suggested that the "Enable blog" step should occur on first attempt at new entry - eliminating one step. I'm not thoroughly convinced that this is the best, it needs more discussion. If you enable the blog just because they click "post new entry" then you are adding extra blogs for the curious who may not use it after first investigation. The best compromise is to show the'learning text' on the edit form itself and enable the blog when they submit their first entry, but the edit form doesn't lend itself well to this approach and the edit form would be pretty far down the page.
(One possible solution is to add a bool column to the blog_list table enabled/disabled. If the user hits the edit page and they have no blog then create one in the db for them and use that blogid for the remainder of the page. If their blog is disabled (default) then add a link to the top of the page suggesting that they read the help file on "About Blogs" before posting.)

� Martin makes a good point about eliminating jargon for the end user experience. Look through blocks and links and comb out overly cryptic wording.

� Continue work on help pages for trackback and pingback. Explain what they are and why you would want to send or not send them from a post. (posted discussion topic requesting assistance with this text on using moodle blog forum)

� phase out the use of BlogEntry->entryCategoryIds since BlogEntry->entryCategories now contains both the id and name in a single associative array.

RSS (server): feeds NOW support args of blogid=# or catid=#. As we integrate further with moodle we may want a courseid=# option. This applies to rss, rss2 and atom.php. Courseid may not be useful except on courses which allow guest access. 
I do not know for sure that rss feeds can be authenticated. The current rss feeds do not do any form of authentication. How would a news reader client handle authentication of the feed? Page re: authenticated feeds: http://labs.silverorange.com/archives/2003/july/privaterss

� On edit.php indent the send trackback option and make it dependent on pingback being enabled
for reference on how to do this see  code for "when adding a Resource" (I'm not positive that tb/pb are quite this neatly related with tb dependant on pb being enabled. I believe that tb could be enabled without pb and it will work. This requires more research and better help file explanations of feature functionality. It might seem appropriate to simply allow trackback as it seems to be built on top of pb, but I believe pb is supported because some remote servers do not support tb.)

� SECURITY - ADMIN CONFIG OPTION - I'm thinking lately that it might be nice during install time (and as an admin blog config option) to present the user with a choice - "use blogs" <yes/no> -  that way any "security" concerns are negated since it can be completely disabled.

� Check to see if guest users who have joined the course with an enrollment key can post comments when anon comments disabled/enabled - maybe extra setting in config - "allow guests who enter with enrolment key to post comments"

� Convert archive.php into view.php which will be a permalink page for viewing single entries only.

=================================================
ONGOING / STYLE
=================================================
� Examine database usage and attempt to optimize: (note from Jon: you can say "EXPLAIN (your query here)" and MySQL will tell you what it's doing to execute the query for example, how many rows it will have to consider, what indexes it will be using and stuff)

� if you're worried about memory bloat - just don't keep the objects around any longer than you need to -  e.g. after done with it call "unset($page)"

� Add phpdoc comments to files, classes and functions.

� SQL: Convert more sql calls to moodle functions rather than raw sql.

� LOCALIZATION: Review code occasionally to localize any hard coded text

� MOODLE INTEGRATION/CLEANUP: enforce integer values before using them in db calls:     
// Make sure that the GET variables are correct
    $day = intval($_GET['cal_d']);

� MOODLE INTEGRATION/CLEANUP: Use p() when showing vars in html forms
<input name="block_online_users_timetosee" type="text" size="5" value="<?php if(isset($CFG->block_online_users_timetosee)) {p($CFG->block_online_users_timetosee);} else {p(5);} ?>"
actually p(0 and s() just pass the argument though strip_chars and htmlspecialchars to remove < > special characters - making sure it's just text.

� from Jon: $motto = "always use empty() UNLESS there is a specific reason not to"
and the specific reasons may be two:
1) you care to differentiate between NULL and ''
2) you want to see if an object exists before starting to pull out its properties

=======================================================================
FEATURE REQUESTS (not targeted for first release, order means nothing)
=======================================================================
� http://wordpress.org/about/shots/1.5/moderation.png - comment moderation for the blog owner themselves

� RSS 2.0's enclosure capabilities would be a nice addition for podcasting.

� From Martin's bug regarding blogging:
"3) Blog entries appear as usual, and can have a discussion attached to them for feedback and comments. Each entry can also have a "grade", which is the average of a number of ratings. Normally this might just be the teacher, but it could be the whole class rating each other's entries."

� find a way to moderate based on the category and course rather than the site. Would allow one teacher to moderate their own course entries while another chooses not to

� RSS_CLIENT: 
define('MAGPIE_CACHE_FRESH_ONLY', false); //should be exposed as an admin config option - if true then it will not display stale cache contents when remote feed cannot be refreshed.

� PINGBACK/TRACKBACK: PingBacks and TrackBacks should be logged in moodle logs as they are saved/executed.

� Handle deletion of user
   BlogServer class has function deleteBlogById($blogid). This is not currently called by any blog code. It might be a good function to be used by moodle. However, moodle's delete user simply marks the user as deleted - allowing the user to be easily reactivated. Should we be checking for ($user->deleted != 1) before displaying blog information?
   
� Possibly re-enable weblogs.com RPC option
//below is a section removed from edit.php.
<?php
if($CFG->blog_useweblog_rpc) {
echo "<input type=checkbox name=weblogrpc value=\"1\" />Send update notice to weblogs.com<br>(may cause longer load time)&nbsp;";
}?>

� DH - RSS - All rss/atom scripts should use a blogFilter with arguments passed in to be used in loading correct blogEntries. Either the news page or a new function in BlogFilter should build the cache filename. Create a new page that has full drop down menu options to select a specific feed type (filter news feeds by category, user, date to start with)

� RSS: Single page where users can go to access rss links (xml image and link) which are available to them on the moodle server - instead of only being available in blocks. When working with our own published feeds add links for administrator to "Validate" remote feed. Should integrate with new news page that lists all available local feeds. ( http://feeds.archive.org/validator/check?url=<BLOGRSSURL>) (NEWS/RSS: add new index_news.php file. should list all possible feeds for the site. including blogids, catids and moodle links. At the top should be "My RSS Feeds" for logged in users to quickly find their own links. RSS Feeds side block and the user admin section should have links to this new page.)

� API.PHP: Add support for media upload api metaweblog call. Would allow a user to post a blog entry complete with pictures. "Finally, the ability of students to include pictures and other media is very useful." Should target this ASAP. Right now I'm waiting for moodle to have a comprehensive file management system that would allow a student to upload their own files to the server.

� Add entry/comment view counters
    COUNTERS: Add view counters to simplog tables (or create blog_log table). How many times has the full body of an entry been viewed, how many times have comments on an entry been viewed? (member vs. guest views should be counted) Should be a new template markup option --showguestviews-- --showmemberviews-- --showtotalviews--. 


INDEX_MORE.PHP: Column headers should be linked to allow column sorting. Clicking a column header would cause the sort order to be changed to be by that column and paging would be reset back to start=0.

TRACKBACK/PINGBACK: Add ability to blacklist remote URLs so that specific incoming tb/pbs can be rejected on a site level

=================================================
ADDITIONAL NOTES / UNCATEGORIZED NOTES
=================================================

CALENDAR: It would be nice if Blog entries that have been marked 'published' appear on the calendar as EVENTS! The first publish it'll appear as 'entry created', changing status and then republishing will make it show on the calendar as 'entry status modified'. When an entry is edited it'll show on the calendar as 'entry modified'. These event entries should not be editable by the user.
From email with Jon P. :
    Is it possible to create an event in the calendar programmatically
that
    1) is NOT tied to a courseid, an event for the user, not for a course
they are in
    2) is not editable by the user

"OK, your question has two parts and a two-sided answer. First of all, you
could add fields to mdl_event that make the recognition of a fifth type of
event possible, and change the code to make use of that. But this is a
solution I would advise against, not to mention that you would have to make
the changes mentioned for the "other solution" below.

Another thing you could do is fiddle with the calendar_edit_event_allowed()
function (or something like that). I think it's located at about the end
of calendar/view.php[...]. That one decides whether you can edit the event or not,
so your best bet is to add code there to achieve your desired effect. For
example, add another column to mdl_event and make that function return
false if it's set to 1.

A third solution just came to mind. You can always change the link 
for the edit icon. That's what Martin did for activity events; they don't
allow you to change the event details, but take you to the corresponding
activity which "controls" the event."

MOODLE INTEGRATION/CALENDAR: Convert existing simplog calendar code to use Moodle calendar. This is terribly involved unfortunately.

BLOG_ENTRIES: blog entries should track their modification date info and note the most recent update in the listing. Would be a nice addition if it also listed all modifications dates in the full single entry view (archive.php). Users who make updates should be able to enter a comment about what the update was. Now that we have publish states perhaps a new table should have a list of all modifications made to non-draft entries. when entries were returned to draft status, republished, edited, etc.
Additionally, perhaps a modification can only ADD extra text rather than editing the original post (this would be a site wide setting and would make published blog posts more moodle like)

WEBLOGRPC.php: use as a template to create a blog entry publishing system for other blogs? Refer to other open source blog systems to see if others do this already. They might have useful code to use as a reference or starting point.
 
LONG TERM:(Tom note)Teachers down the road might want to attach scales and grades to individual blog instances, entries, or categories...



Posted By: vik 
Date: 9:56 AM 31-Mar-2004

Having used blogs at my school for a few months, I'd like to add these observations. 

We used blogs in two ways; one for personal reflection, the other for text-responses. In the latter, the students were directed by questions from the teacher, and as I understand, had much the same functionality of the journal module. The personal blogs on the other hand, have completely different requirements:

Firstly, students need ownership of the blog. This means the blog would have to be assigned to the *student*, not any course. This might be 'worked around' by using form groups or year groups or similar as courses, but ownership is one of the concepts we identified that makes blogs so appealing to students. 

Further to this, I think that having the structure and layout of the blog customisable is very beneficial. How possible would this be (to have the students modify html and css for their own instances of such a module)? 

______________________________


RSS:
Notes from: http://www.learningcircuits.org/2004/may2004/0405_trends.htm

And what about other technologies? Could RSS be integrated with other new tools, such as the ones described in �We Learning�, parts I and II? Consider
� a social networking tool that sends you a feed informing you of the new people who just joined the network
� an expert management system that uses feeds to tell you when a new expert is added to the system in your area of interest, or when an expert has created a new document you might be interested in
� collaborative workspaces that use feeds to bring in information people in the group need to complete a project
� a problem-based RSS feed integrated with a social networking or expert management tool in which you could subscribe to a problem, for example �reluctant learners,� and then receive updates whenever someone writes on that topic.

   � RSS Server: Create RSS feed of member joins for each course.