took out courseid and groupid

This commit is contained in:
toyomoyo
2006-03-15 08:49:33 +00:00
parent 540f964d92
commit 20fc0f2655
3 changed files with 2 additions and 28 deletions
+1 -18
View File
@@ -39,13 +39,9 @@ class BlogEntry {
// member variables
var $entryId; // post.id
var $entryBody; // post.summary
var $entryExtendedBody; // post.content
var $entryTitle; // post.subject
var $entryKarma; // post.rating
var $entryFormat; // post.format
var $entryuserid; // post.author
var $entryGroupId; // post.groupid
var $entryCourseId; // post.courseid
var $entryPublishState; // post.publishstate
var $entryAuthorName; // blog_users.name
var $entryAuthorEmail; // blog_users.email
@@ -100,11 +96,6 @@ class BlogEntry {
// print_object($this->entryCategoryIds); //debug
$this->entryBody = ereg_replace('<tick>', "'", stripslashes_safe($entrydetails->summary));
if (isset($entrydetails->extendedbody)) {
$this->entryExtendedBody = ereg_replace('<tick>', "'", stripslashes_safe($entrydetails->extendedbody));
} else {
$this->entryExtendedBody = '';
}
$strftimedaydatetime = get_string('strftimedaydatetime');
$this->entryLastModified = $entrydetails->lastmodified;
@@ -122,14 +113,6 @@ class BlogEntry {
$this->entryFormat = $entrydetails->format;
//Daryl Hawes additions: course and group ids
if (isset($entrydetails->groupid) ) {
$this->entryGroupId = $entrydetails->groupid;
}
if (isset($entrydetails->courseid) ) {
$this->entryCourseId = $entrydetails->courseid;
}
if (isset($entrydetails->publishstate) ) {
$this->entryPublishState = $entrydetails->publishstate;
} else {
@@ -377,7 +360,7 @@ class BlogEntry {
$menu = '';
if ($this->user_can_change_publish_state() && blog_isediting() ) {
$menu .= '<div class="publishto">'. get_string('publishto', 'blog').': ';
$options = blog_applicable_publish_states($this->entryCourseId);
$options = blog_applicable_publish_states();
$menu .= choose_from_menu($options, $this->entryuserid .'-'. $this->entryId, $this->entryPublishState, '', '', '0', true);
$menu .= "\n".'</div>'."\n";
if ($includehelp) {
-2
View File
@@ -139,8 +139,6 @@ if ($editid != '') { // User is editing a post
$post->categoryid = $blogEntry->entryCategoryIds;
$post->format = $blogEntry->entryFormat;
$post->publishstate = $blogEntry->entryPublishState;
$post->courseid = $blogEntry->entryCourseId;
$post->groupid = (int)$blogEntry->entryGroupId;
}
if (isset($post->postid) && ($post->postid != -1) ) {
+1 -8
View File
@@ -384,13 +384,11 @@ function blog_print_entry(&$blogEntry, $viewtype='full', $filtertype='', $filter
$template['title'] .= '</span>';
// add editing controls if allowed
$template['courseid'] = $blogEntry->entryCourseId;
$template['userid'] = $blogEntry->entryuserid;
$template['author'] = $blogEntry->entryAuthorName;
$template['lastmod'] = $blogEntry->formattedEntryLastModified;
$template['created'] = $blogEntry->formattedEntryCreated;
$template['publishtomenu'] = $blogEntry->get_publish_to_menu(true, true);
$template['groupid'] = $blogEntry->entryGroupId;
//forum style printing of blogs
blog_print_entry_content ($template, $blogEntry->entryId, $filtertype, $filterselect);
@@ -408,7 +406,7 @@ function blog_print_entry_content ($template, $entryid, $filtertype='', $filters
echo '<div align="center"><table cellspacing="0" class="forumpost" width="100%">';
echo '<tr class="header"><td class="picture left">';
print_user_picture($template['userid'], $template['courseid'], $user->picture);
print_user_picture($template['userid'], SITEID, $user->picture);
echo '</td>';
echo '<td class="topic starter"><div class="subject">'.$template['title'].'</div><div class="author">';
@@ -420,11 +418,6 @@ function blog_print_entry_content ($template, $entryid, $filtertype='', $filters
echo '</div></td></tr>';
echo '<tr><td class="left side">';
if ($group = get_record('groups','id',$template['groupid'])) {
print_group_picture($group, $course->id, false, false, true);
} else {
echo '&nbsp;';
}
/// Actual content