mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Forum language fixes, and addition of help for separate/connected knowing
This commit is contained in:
parent
f58d18bc83
commit
31d160d3b9
7 changed files with 129 additions and 36 deletions
|
@ -946,7 +946,9 @@ function forum_print_discussion($course, $forum, $discussion, $post, $mode) {
|
|||
}
|
||||
|
||||
if ($ratingform) {
|
||||
echo "<CENTER><P ALIGN=center><INPUT TYPE=submit VALUE=\"".get_string("sendinratings", "forum")."\"></P></CENTER>";
|
||||
echo "<CENTER><P ALIGN=center><INPUT TYPE=submit VALUE=\"".get_string("sendinratings", "forum")."\">";
|
||||
helpbutton("waysofknowing", get_string("separateandconnected"));
|
||||
echo "</P></CENTER>";
|
||||
echo "</FORM>";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
<table cellpadding=5>
|
||||
<tr>
|
||||
<tr valign=top>
|
||||
<td align=right><P><B>Forum Name:</B></P></TD>
|
||||
<td align=right><P><B><? print_string("forumname", "forum")?>:</B></P></TD>
|
||||
<td>
|
||||
<input type="text" name="name" size=30 value="<? p($form->name) ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td align=right><P><B>Type of Forum:</B></P></TD>
|
||||
<td align=right><P><B><? print_string("forumtype", "forum")?>:</B></P></TD>
|
||||
<td>
|
||||
<?
|
||||
$student = strtolower($course->student);
|
||||
|
@ -20,31 +20,34 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td align=right><P><B>Forum Introduction:</B></P></TD>
|
||||
<td align=right><P><B><? print_string("forumintro", "forum")?>:</B></P></TD>
|
||||
<td>
|
||||
<textarea name="intro" rows=4 cols=50 wrap="virtual"><? p($form->intro) ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign=top>
|
||||
<td align=right><P><B>Can <?=$course->student?>s start new discussions?:</B></P></TD>
|
||||
<td align=right><P><B><? print_string("allowdiscussions", "forum", "$course->student") ?>:</B></P></TD>
|
||||
<td>
|
||||
<input type=radio name=open value=1 <? if ($form->open == 1) echo "CHECKED"; ?> >Yes
|
||||
<input type=radio name=open value=0 <? if ($form->open == 0) echo "CHECKED"; ?> >No
|
||||
<? $stryes = get_string("yes"); $strno = get_string("no"); ?>
|
||||
<input type=radio name=open value=1 <? if ($form->open == 1) echo "CHECKED"; ?> ><?=$stryes ?>
|
||||
<input type=radio name=open value=0 <? if ($form->open == 0) echo "CHECKED"; ?> ><?=$strno ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right><P><B>Will this forum contain assessments?:</B></P></TD>
|
||||
<td align=right><P><B><? print_string("allowratings", "forum") ?>
|
||||
<? helpbutton("waysofknowing", get_string("separateandconnected")) ?>
|
||||
:</B></P></TD>
|
||||
<td>
|
||||
<input type=radio name=assessed value=1 <? if ($form->assessed == 1) echo "CHECKED"; ?> >Yes
|
||||
<input type=radio name=assessed value=0 <? if ($form->assessed == 0) echo "CHECKED"; ?> >No
|
||||
<input type=radio name=assessed value=1 <? if ($form->assessed == 1) echo "CHECKED"; ?> ><?=$stryes ?>
|
||||
<input type=radio name=assessed value=0 <? if ($form->assessed == 0) echo "CHECKED"; ?> ><?=$strno ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right><P><B>Force everyone to be subscribed to this forum?:</B></P></TD>
|
||||
<td align=right><P><B><? print_string("forcesubscribeq", "forum") ?>:</B></P></TD>
|
||||
<td>
|
||||
<input type=radio name=forcesubscribe value=1 <? if ($form->forcesubscribe == 1) echo "CHECKED"; ?> >Yes
|
||||
<input type=radio name=forcesubscribe value=0 <? if ($form->forcesubscribe == 0) echo "CHECKED"; ?> >No
|
||||
<input type=radio name=forcesubscribe value=1 <? if ($form->forcesubscribe == 1) echo "CHECKED"; ?> ><?=$stryes ?>
|
||||
<input type=radio name=forcesubscribe value=0 <? if ($form->forcesubscribe == 0) echo "CHECKED"; ?> ><?=$strno ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -56,6 +59,6 @@
|
|||
<input type="hidden" name=modulename value="<? p($form->modulename) ?>">
|
||||
<input type="hidden" name=instance value="<? p($form->instance) ?>">
|
||||
<input type="hidden" name=mode value="<? p($form->mode) ?>">
|
||||
<input type="submit" value="Save these settings">
|
||||
<input type="submit" value="<? print_string("savechanges") ?>">
|
||||
</CENTER>
|
||||
</FORM>
|
||||
|
|
|
@ -37,21 +37,21 @@
|
|||
if ($force and isteacher($course->id)) {
|
||||
if (forum_is_forcesubscribed($forum->id)) {
|
||||
forum_forcesubscribe($forum->id, 0);
|
||||
redirect($returnto, "Everyone can choose their own subscription to this forum", 1);
|
||||
redirect($returnto, get_string("everyonecanchoose", "forum"), 1);
|
||||
} else {
|
||||
forum_forcesubscribe($forum->id, 1);
|
||||
redirect($returnto, "Everyone is now subscribed to this forum", 1);
|
||||
redirect($returnto, get_string("everyoneissubscribed", "forum"), 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (forum_is_forcesubscribed($forum->id)) {
|
||||
redirect($returnto, "Everyone is subscribed to this forum", 1);
|
||||
redirect($returnto, get_string("everyoneissubscribed", "forum"), 1);
|
||||
}
|
||||
|
||||
if ( forum_is_subscribed($USER->id, $forum->id) ) {
|
||||
if (forum_unsubscribe($USER->id, $forum->id) ) {
|
||||
add_to_log($course->id, "forum", "unsubscribe", "view.php?f=$forum->id", "$forum->id");
|
||||
redirect($returnto, "You are now NOT subscribed to receive '$forum->name' by email.", 1);
|
||||
redirect($returnto, get_string("nownotsubscribed", "forum", "$forum->name"), 1);
|
||||
} else {
|
||||
error("Could not unsubscribe you from that forum", "$HTTP_REFERER");
|
||||
}
|
||||
|
@ -59,7 +59,7 @@
|
|||
} else { // subscribe
|
||||
if (forum_subscribe($USER->id, $forum->id) ) {
|
||||
add_to_log($course->id, "forum", "subscribe", "view.php?f=$forum->id", "$forum->id");
|
||||
redirect($returnto, "You are now subscribed to recieve '$forum->name' by email.", 1);
|
||||
redirect($returnto, get_string("nowsubscribed", "forum", "$forum->name"), 1);
|
||||
} else {
|
||||
error("Could not subscribe you to that forum", "$HTTP_REFERER");
|
||||
}
|
||||
|
|
|
@ -37,12 +37,14 @@
|
|||
error("Must specify a course module or a forum ID");
|
||||
}
|
||||
|
||||
$strforums = get_string("modulenameplural", "forum");
|
||||
|
||||
if ($course->category) {
|
||||
require_login($course->id);
|
||||
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->
|
||||
<A HREF=\"index.php?id=$course->id\">Forums</A> ->";
|
||||
<A HREF=\"index.php?id=$course->id\">$strforums</A> ->";
|
||||
} else {
|
||||
$navigation = "<A HREF=\"index.php?id=$course->id\">Forums</A> ->";
|
||||
$navigation = "<A HREF=\"index.php?id=$course->id\">$strforums</A> ->";
|
||||
}
|
||||
|
||||
if ($forum->type == "teacher") {
|
||||
|
@ -60,32 +62,35 @@
|
|||
$SESSION->fromdiscussion = "$FULLME";
|
||||
save_session("SESSION");
|
||||
if (forum_is_forcesubscribed($forum->id)) {
|
||||
$subtext = "Everyone is subscribed to this forum";
|
||||
$streveryoneissubscribed = get_string("everyoneissubscribed", "forum");
|
||||
$strallowchoice = get_string("allowchoice", "forum");
|
||||
if (isteacher($course->id)) {
|
||||
echo "<DIV ALIGN=RIGHT><FONT SIZE=1>";
|
||||
echo "<A TITLE=\"Allow people to choose\" HREF=\"subscribe.php?id=$forum->id&force=no\">$subtext</A>";
|
||||
echo "<A TITLE=\"$strallowchoice\" HREF=\"subscribe.php?id=$forum->id&force=no\">$streveryoneissubscribed</A>";
|
||||
echo "</FONT></DIV>";
|
||||
} else {
|
||||
echo "<DIV ALIGN=RIGHT><FONT SIZE=1>$subtext</FONT></DIV>";
|
||||
echo "<DIV ALIGN=RIGHT><FONT SIZE=1>$streveryoneissubscribed</FONT></DIV>";
|
||||
}
|
||||
|
||||
} else {
|
||||
$subtext = "Everyone can choose to be subscribed";
|
||||
$streveryonecanchoose = get_string("everyonecanchoose", "forum");
|
||||
$strforcesubscribe = get_string("forcesubscribe", "forum");
|
||||
$strshowsubscribers = get_string("showsubscribers", "forum");
|
||||
if (isteacher($course->id)) {
|
||||
echo "<DIV ALIGN=RIGHT><FONT SIZE=1>";
|
||||
echo "<A TITLE=\"Force everyone to subscribe\" HREF=\"subscribe.php?id=$forum->id&force=yes\">$subtext</A>";
|
||||
echo "<A TITLE=\"$strforcesubscribe\" HREF=\"subscribe.php?id=$forum->id&force=yes\">$streveryonecanchoose</A>";
|
||||
echo "</FONT></DIV>";
|
||||
$subtext = "<A HREF=\"subscribers.php?id=$forum->id\">Show subscribers</A>";
|
||||
$subtext = "<A HREF=\"subscribers.php?id=$forum->id\">$strshowsubscribers</A>";
|
||||
echo "<DIV ALIGN=RIGHT><FONT SIZE=1>$subtext</FONT></DIV>";
|
||||
} else {
|
||||
echo "<DIV ALIGN=RIGHT><FONT SIZE=1>$subtext</FONT></DIV>";
|
||||
echo "<DIV ALIGN=RIGHT><FONT SIZE=1>$streveryonecanchoose</FONT></DIV>";
|
||||
}
|
||||
if (forum_is_subscribed($USER->id, $forum->id)) {
|
||||
$subtext = "Unsubscribe me";
|
||||
$subtext = get_string("unsubscribe", "forum");
|
||||
} else {
|
||||
$subtext = "Subscribe me";
|
||||
$subtext = get_string("subscribe", "forum");
|
||||
}
|
||||
$subtext = "<A TITLE=\"...this forum only\" HREF=\"subscribe.php?id=$forum->id\">$subtext</A>";
|
||||
$subtext = "<A HREF=\"subscribe.php?id=$forum->id\">$subtext</A>";
|
||||
echo "<DIV ALIGN=RIGHT><FONT SIZE=1>$subtext</FONT></DIV>";
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +117,7 @@
|
|||
print_simple_box(text_to_html($forum->intro), "CENTER");
|
||||
echo "<P ALIGN=CENTER>";
|
||||
if (forum_user_can_post_discussion($forum)) {
|
||||
echo "This forum allows each person to start one discussion topic.";
|
||||
print_string("allowsdiscussions", "forum");
|
||||
} else {
|
||||
echo " ";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue