@@ -334,8 +334,14 @@ protected function render_local_amos_stash(local_amos_stash $stash) {
334334 'class ' => 'my-2 mr-2 d-inline-block ' ,
335335 'size ' => 21 ,
336336 ]);
337- $ output .= html_writer::tag ('div ' , userdate ($ stash ->timecreated , get_string ('strftimedaydatetime ' , 'langconfig ' )),
338- ['class ' => 'timecreated ' ]);
337+
338+ if ($ stash ->timemodified ) {
339+ $ output .= html_writer::tag ('div ' , userdate ($ stash ->timemodified , get_string ('strftimedaydatetime ' , 'langconfig ' )),
340+ ['class ' => 'timemodified ' ]);
341+ } else {
342+ $ output .= html_writer::tag ('div ' , userdate ($ stash ->timecreated , get_string ('strftimedaydatetime ' , 'langconfig ' )),
343+ ['class ' => 'timecreated ' ]);
344+ }
339345 $ output .= html_writer::tag ('div ' , get_string ('stashstrings ' , 'local_amos ' , $ stash ->strings ),
340346 ['class ' => 'strings ' ]);
341347 $ output .= html_writer::tag ('div ' , get_string ('stashlanguages ' , 'local_amos ' , s (implode (', ' , $ stash ->languages ))),
@@ -372,8 +378,15 @@ protected function render_local_amos_contribution(local_amos_contribution $contr
372378 $ output = '' ;
373379 $ output .= $ this ->output ->heading ('# ' .$ contrib ->info ->id .' ' .s ($ contrib ->info ->subject ), 3 , 'subject ' );
374380 $ output .= $ this ->output ->container ($ this ->output ->user_picture ($ contrib ->author ) . fullname ($ contrib ->author ), 'author ' );
375- $ output .= $ this ->output ->container (userdate ($ contrib ->info ->timecreated ,
381+
382+ if ($ contrib ->info ->timemodified ) {
383+ $ output .= $ this ->output ->container (userdate ($ contrib ->info ->timemodified ,
384+ get_string ('strftimedaydatetime ' , 'langconfig ' )), 'timemodified ' );
385+ } else {
386+ $ output .= $ this ->output ->container (userdate ($ contrib ->info ->timecreated ,
376387 get_string ('strftimedaydatetime ' , 'langconfig ' )), 'timecreated ' );
388+ }
389+
377390 $ output .= $ this ->output ->container (format_text ($ contrib ->info ->message ), 'message ' );
378391 $ output = $ this ->box ($ output , 'generalbox source ' );
379392
0 commit comments