@@ -4252,6 +4252,7 @@ function hsuforum_add_new_post($post, $mform, $unused=null, \mod_hsuforum\upload
4252
4252
$ post ->mailed = HSUFORUM_MAILED_PENDING ;
4253
4253
$ post ->userid = $ USER ->id ;
4254
4254
$ post ->attachment = 0 ;
4255
+ $ post ->privatereplyto = 0 ;
4255
4256
if (!isset ($ post ->totalscore )) {
4256
4257
$ post ->totalscore = 0 ;
4257
4258
}
@@ -4267,6 +4268,8 @@ function hsuforum_add_new_post($post, $mform, $unused=null, \mod_hsuforum\upload
4267
4268
$ post ->id = $ DB ->insert_record ("hsuforum_posts " , $ post );
4268
4269
$ post ->message = file_save_draft_area_files ($ draftid , $ context ->id , 'mod_hsuforum ' , 'post ' , $ post ->id ,
4269
4270
mod_hsuforum_post_form::editor_options ($ context , $ post ->id ), $ post ->message );
4271
+ $ post ->wordcount = count_words ($ post ->message , $ post ->messageformat );
4272
+ $ post ->charcount = count_letters ($ post ->message , $ post ->messageformat );
4270
4273
$ DB ->update_record ('hsuforum_posts ' , $ post );
4271
4274
hsuforum_add_attachment ($ post , $ forum , $ cm , $ mform , null , $ uploader );
4272
4275
@@ -4436,6 +4439,7 @@ function hsuforum_add_discussion($discussion, $mform=null, $unused=null, $userid
4436
4439
$ discussion ->usermodified = $ post ->userid ;
4437
4440
$ discussion ->userid = $ userid ;
4438
4441
$ discussion ->assessed = 0 ;
4442
+ $ discussion ->timelocked = 0 ;
4439
4443
4440
4444
$ post ->discussion = $ DB ->insert_record ("hsuforum_discussions " , $ discussion );
4441
4445
0 commit comments