Fixing agenda and work tool see #3765

skala
Julio Montoya 15 years ago
parent 7fff4be591
commit b9afc46989
  1. 4
      main/calendar/agenda.php
  2. 21
      main/calendar/print.php
  3. 721
      main/work/work.lib.php
  4. 5
      main/work/work.php

@ -358,7 +358,7 @@ if (api_is_allowed_to_edit(false,true) OR (api_get_course_setting('allow_user_ed
// this is for students and whenever the courseaministrator has not chosen any action. It is in fact the default behaviour
//if ($action == "view") {
if ($action == "view" || empty($action)) {
if ($origin != 'learnpath') {
if ($_SESSION['view'] == 'month') {
display_monthcalendar($select_month, $select_year, $agenda_items);
@ -372,7 +372,7 @@ if (api_is_allowed_to_edit(false,true) OR (api_get_course_setting('allow_user_ed
}
}
}
//}
}
echo '</td></tr></table>';

@ -44,32 +44,23 @@ $result = Database::query($sql);
<input type="button" value="<?php echo api_htmlentities(get_lang('Print'),ENT_QUOTES,$charset); ?>" onClick="javascript:window.print();" />
</center>
<br /><br />
<?php
while($row=Database::fetch_array($result))
{
while($row=Database::fetch_array($result)) {
$row['content'] = $row['content'];
$row['content'] = make_clickable($row['content']);
$row['content'] = text_filter($row['content']);
$row['content'] = str_replace('<a ','<a target="_blank" ',$row['content']);
if(!empty($row['title']))
{
echo '<b>'.$row['title'].'</b><br /><br />';
if(!empty($row['title'])) {
echo '<h2>'.$row['title'].'</h2><br />';
}
echo get_lang('StartTime').' : ';
echo api_convert_and_format_date($row["start_date"], null, date_default_timezone_get());
echo api_convert_and_format_date($row["start_date"]);
echo '<br />';
echo get_lang('EndTime').' : ';
echo api_convert_and_format_date($row["end_date"], null, date_default_timezone_get());
echo api_convert_and_format_date($row["end_date"]);
echo '<br /><br />';
echo $row['content'].'<hr size="1" noshade="noshade" />';
}
?>
@ -78,4 +69,4 @@ while($row=Database::fetch_array($result))
<input type="button" value="<?php echo api_htmlentities(get_lang('Print'), ENT_QUOTES); ?>" onClick="javascript: window.print();" />
</center>
</body>
</html>
</html>

File diff suppressed because it is too large Load Diff

@ -7,8 +7,9 @@
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default.
* @author Roan Embrechts, code refactoring and virtual course support
* @author Frederic Vauthier, directories management
* @author Julio Montoya <gugli100@gmail.com> BeezNest 2011 LOTS of bug fixes
*
* @todo refactor more code into functions, use quickforms, coding standards, ...
* @todo refactor more code into functions, use quickforms, coding standards, ... jm
*/
/**
@ -974,7 +975,7 @@ if (isset($_POST['sec_token']) && $ctok == $_POST['sec_token']) { //check the to
SET title = '" . Database::escape_string($title) . "',
description = '" . Database::escape_string($description) . "'
".$add_to_update."
WHERE id = $item_to_edit_id";
WHERE id = $item_to_edit_id";
Database::query($sql);
}
api_item_property_update($_course, 'work', $item_to_edit_id, 'DocumentUpdated', $user_id);

Loading…
Cancel
Save