|
Replies:
12
-
Pages:
1
-
Last Post:
Apr 9, 2009 7:26 AM
Last Post By: user634694
|
|
|
Posts:
83
Registered:
05/05/08
|
|
|
|
Rating Option or Ranking Option
Posted:
Apr 7, 2009 5:43 AM
|
|
|
|
Hi all,
I have a new challange, In my Report i have column called as Rating so i want to implement in my Report this Ratings are given by the users depending on their visit to Link as the Rating will be rated as STAR IMAGE'S like 5 Stars or 4Stars
3 or 2 or 1, depending on the number of users visited the link. I want is this feature available in Apex Tool or anybody is aware of it would like to share by any other method....
Example
======
User1=4
User2=5
Total Users=(User1+User2)=2
Total Rating=(4+5)=9
Ranking=Total Rating/(Total Users)=9/2=4.5 Then the Final Ranking=4.5
so we can display 4 or 5 Stars Images Glowing like
Hoping for some positive responce regarding the same from all the forum experts....
Thanking and Regards,
Suri
|
|
|
Posts:
1,821
Registered:
05/04/99
|
|
|
|
Re: Rating Option or Ranking Option
Posted:
Apr 7, 2009 6:02 AM
in response to: user634694
|
 |
Helpful |
|
|
Hello Suri,
Start with the APEX_WORKSPACE_ACTIVITY_LOG....
Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this reply by marking it as either Helpful or Correct 
|
|
|
Posts:
83
Registered:
05/05/08
|
|
|
|
Re: Rating Option or Ranking Option
Posted:
Apr 8, 2009 2:25 AM
in response to: Roel
|
|
|
|
Hi Roel,
Can you please elaborate regarding APEX_WORKSPACE_ACTIVITY_LOG, how to start with and all.....
Thanking and Regards,
Suri
|
|
|
Posts:
1,821
Registered:
05/04/99
|
|
|
|
Re: Rating Option or Ranking Option
Posted:
Apr 8, 2009 2:31 AM
in response to: user634694
|
|
|
Hello Suri,
Did you take a look at that view? It contains per user the number of times a page is accessed. If you want a real rating (like 'Excellent', 'Bad' etc) than you have to create your own tables and functions. But I guess this view gives you a start. You can spot the popular pages. You can even write queries like: Users that visited this page, visited these other pages also (like a Amazon recommendation type of functionality).
Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this reply by marking it as either Helpful or Correct 
|
|
|
Posts:
83
Registered:
05/05/08
|
|
|
|
Re: Rating Option or Ranking Option
Posted:
Apr 8, 2009 3:30 AM
in response to: Roel
|
|
|
Thanks a lot Roel,
But how it possible to embedded that star images and make it dynamic alter, like we see in Amazon recommendation
the progess Bars alter according to the Ratings
can you share some thoughts on this..
Thanking and Regards,
Suri
|
|
|
Posts:
1,821
Registered:
05/04/99
|
|
|
|
Re: Rating Option or Ranking Option
Posted:
Apr 8, 2009 4:12 AM
in response to: user634694
|
|
|
Depends on when you want to give something a 3, 4, or 5 star rating.
But to give you an idea:
select page_name, perc
, case
when perc > 50 then '<img src="/i/stars5.gif" />'
when perc > 40 then '<img src="/i/stars4.gif" />'
when perc > 30 then '<img src="/i/stars3.gif" />'
when perc > 20 then '<img src="/i/stars2.gif" />'
when perc > 10 then '<img src="/i/stars1.gif" />'
else '<img src="/i/white_boxbr.gif" />'
end rating
from
( select page_name
, round(100*hits/total) perc
from
( select distinct page_id
, page_name
, count(*) over (partition by page_id, page_name) hits
, count(*) over (partition by 1) total
from APEX_WORKSPACE_ACTIVITY_LOG
where application_id = :APP_ID
order by 3 desc
)
)
There is an example on : apex.oracle.com...but it is rather slow on that multi-multi-workspace instance. On my laptop it runs fine..
|
|
|
Posts:
83
Registered:
05/05/08
|
|
|
|
Re: Rating Option or Ranking Option
Posted:
Apr 8, 2009 7:18 AM
in response to: Roel
|
|
|
Hi Role,
Thanks a lot for quick response and helpful reply, can we have the Rating Like which we have in this link
http://my.oracle.com/portal/page/myo/North%20America%20Sales%20and%20Consulting%20Website/NAOrganizations/NAOverlay/TBU/NA%20TBU%20Home
then click on the Retriver
after search like CRM when the user clicks on the links he give his inadvisable ratings manually by clicking, so that the record is tracked in the backbend Total Ratings=10 for link=Doc1 and Total Users=5
Then the Avg(Rating)=20/5=4 form the user for the link Doc1
Its very difficult to convince, but if go by the URL what i have given then i think you can put some thoughts on it or if you are aware of some helpful url or links it will be really helpful....
Hoping for some positive responce....
Thanks and Regards,
Suri
|
|
|
Posts:
1,821
Registered:
05/04/99
|
|
|
|
Re: Rating Option or Ranking Option
Posted:
Apr 8, 2009 7:25 AM
in response to: user634694
|
|
|
|
Suri,
I can't get to the link you provided. Is it an internal Oracle thing?
Roel
|
|
|
Posts:
83
Registered:
05/05/08
|
|
|
Posts:
1,821
Registered:
05/04/99
|
|
|
|
Re: Rating Option or Ranking Option
Posted:
Apr 8, 2009 7:43 AM
in response to: user634694
|
|
|
|
That's also "Oracle only"...
|
|
|
Posts:
83
Registered:
05/05/08
|
|
|
|
Re: Rating Option or Ranking Option
Posted:
Apr 9, 2009 12:11 AM
in response to: Roel
|
|
|
|
Hi Roel,
I have sent some snapshots to your mail id...
Thanks in Advance
Regards,
Suri
|
|
|
Posts:
1,821
Registered:
05/04/99
|
|
|
|
Re: Rating Option or Ranking Option
Posted:
Apr 9, 2009 12:27 AM
in response to: user634694
|
|
|
Suri,
At Amazon they're using the AREA tag. An AREA is a part of an image (look here for more info). On an AREA they defined onmouseover and onclick events. The onmouseover changes the color of the image and the onclick saves the value.
The code for the 3th star is:
<area onclick="amz_js_saveRating(3, 'rating', savedRatingrating); amz_js_swapStars(3, 'rating');" onmouseover="amz_js_swapStars(3, 'rating');" coords="24,0,36,12" alt="3 stars" href="#" shape="rect"/>
And the functions that are used are:
function amz_js_saveRating(rating, formName, variableName) {
variableName.value = rating;
document.getElementById(formName).value = rating;
document.getElementById(formName).savedValue.value = rating;
amz_js_updateAltText(rating, formName);
}
function amz_js_swapStars(rating, formName) {
imageName = "stars" + formName;
imageObj = document.getElementById(imageName);
imageObj.src = getStarsImage(rating).src;
}
function amz_js_updateAltText(rating, formName) {
imageName = "stars" + formName;
ratingString = getSelectedRatingString(rating);
imageObj = document.getElementById(imageName);
imageObj.setAttribute("alt", ratingString);
}
So maybe this gives you an idea how that can be done!
HTH Roel
|
|
|
Posts:
83
Registered:
05/05/08
|
|
|
|
Re: Rating Option or Ranking Option
Posted:
Apr 9, 2009 4:52 AM
in response to: Roel
|
|
|
Hi Roel,
Thanks for speedy response, can you please give me hints how we can implement in Apex and where and may i know whats this parameter stands for formName is this the name of the link(doc) the user click and also abt variableName ratingString if you dont mind can you please share your thoughts....
Thanks in Advance..........
And got one link it may be helpfull you can have a look
Link is http://apex.oracle.com/pls/otn/f?p=11933:122
Thanking and Regards,
Suri
Edited by: user634694 on Apr 9, 2009 4:53 AM
|
|
|
|
Legend
|
|
Guru : 2500
- 1000000
pts
|
|
Expert : 1000
- 2499
pts
|
|
Pro : 500
- 999
pts
|
|
Journeyman : 200
- 499
pts
|
|
Newbie : 0
- 199
pts
|
|
Oracle ACE Director
|
|
Oracle ACE Member
|
|
Oracle Employee ACE
|
|
Helpful Answer
(5 pts)
|
|
Correct Answer
(10 pts)
|
|