Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plugins bot
moodle-plugins-snapshots
Commits
56882be6
Commit
56882be6
authored
Dec 29, 2016
by
Dan Poltawski
Browse files
MDL-57550 forum: remove legacy js file
parent
22526ad9
Changes
2
Hide whitespace changes
Inline
Side-by-side
mod/forum/forum.js
deleted
100644 → 0
View file @
22526ad9
var
timefromitems
=
[
'
fromday
'
,
'
frommonth
'
,
'
fromyear
'
,
'
fromhour
'
,
'
fromminute
'
];
var
timetoitems
=
[
'
today
'
,
'
tomonth
'
,
'
toyear
'
,
'
tohour
'
,
'
tominute
'
];
function
forum_produce_subscribe_link
(
forumid
,
backtoindex
,
ltext
,
ltitle
)
{
var
elementid
=
"
subscriptionlink
"
;
var
subs_link
=
document
.
getElementById
(
elementid
);
if
(
subs_link
){
subs_link
.
innerHTML
=
"
<a title='
"
+
ltitle
+
"
' href='
"
+
M
.
cfg
.
wwwroot
+
"
/mod/forum/subscribe.php?id=
"
+
forumid
+
backtoindex
+
"
&sesskey=
"
+
M
.
cfg
.
sesskey
+
"
'>
"
+
ltext
+
"
<
\
/a>
"
;
}
}
function
forum_produce_tracking_link
(
forumid
,
ltext
,
ltitle
)
{
var
elementid
=
"
trackinglink
"
;
var
subs_link
=
document
.
getElementById
(
elementid
);
if
(
subs_link
){
subs_link
.
innerHTML
=
"
<a title='
"
+
ltitle
+
"
' href='
"
+
M
.
cfg
.
wwwroot
+
"
/mod/forum/settracking.php?id=
"
+
forumid
+
"
&sesskey=
"
+
M
.
cfg
.
sesskey
+
"
'>
"
+
ltext
+
"
<
\
/a>
"
;
}
}
function
lockoptions_timetoitems
()
{
lockoptions
(
'
searchform
'
,
'
timefromrestrict
'
,
timefromitems
);
}
function
lockoptions_timefromitems
()
{
lockoptions
(
'
searchform
'
,
'
timetorestrict
'
,
timetoitems
);
}
function
lockoptions
(
formid
,
master
,
subitems
)
{
// Subitems is an array of names of sub items.
// Optionally, each item in subitems may have a
// companion hidden item in the form with the
// same name but prefixed by "h".
var
form
=
document
.
forms
[
formid
],
i
;
if
(
form
[
master
].
checked
)
{
for
(
i
=
0
;
i
<
subitems
.
length
;
i
++
)
{
unlockoption
(
form
,
subitems
[
i
]);
}
}
else
{
for
(
i
=
0
;
i
<
subitems
.
length
;
i
++
)
{
lockoption
(
form
,
subitems
[
i
]);
}
}
return
(
true
);
}
function
lockoption
(
form
,
item
)
{
form
[
item
].
setAttribute
(
'
disabled
'
,
'
disabled
'
);
if
(
form
.
elements
[
'
h
'
+
item
])
{
form
.
elements
[
'
h
'
+
item
].
value
=
1
;
}
}
function
unlockoption
(
form
,
item
)
{
form
[
item
].
removeAttribute
(
'
disabled
'
);
if
(
form
.
elements
[
'
h
'
+
item
])
{
form
.
elements
[
'
h
'
+
item
].
value
=
0
;
}
}
mod/forum/upgrade.txt
View file @
56882be6
...
...
@@ -4,6 +4,9 @@ information provided here is intended especially for developers.
=== 3.3 ===
* External function get_forums_by_courses now returns and additional field "istracked" that indicates if the user
is tracking the related forum.
* The legacy forum.js file has been removed, this includes the js functions:
forum_produce_subscribe_link, forum_produce_tracking_link, lockoptions_timetoitems,
lockoptions_timefromitems, lockoptions, lockoption, unlockoption
=== 3.2 ===
* The setting $CFG->forum_replytouser has been removed in favour of a centralized noreplyaddress setting.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment